VirtualBox

Changeset 2269 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Apr 20, 2007 12:58:05 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
20629
Message:

Stricter pointer typechecking. (R0 vs R3)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPIC.cpp

    r490 r2269  
    992992        pData->pPicHlpR0 = pData->pPicHlpR3->pfnGetR0Helpers(pDevIns);
    993993
    994         rc = PDMDevHlpIOPortRegisterR0(pDevIns,  0x20, 2, (void *)0, "picIOPortWrite", "picIOPortRead", NULL, NULL, "i8259 PIC #0");
     994        rc = PDMDevHlpIOPortRegisterR0(pDevIns,  0x20, 2, 0, "picIOPortWrite", "picIOPortRead", NULL, NULL, "i8259 PIC #0");
    995995        if (VBOX_FAILURE(rc))
    996996            return rc;
    997         rc = PDMDevHlpIOPortRegisterR0(pDevIns,  0xa0, 2, (void *)1, "picIOPortWrite", "picIOPortRead", NULL, NULL, "i8259 PIC #1");
     997        rc = PDMDevHlpIOPortRegisterR0(pDevIns,  0xa0, 2, 1, "picIOPortWrite", "picIOPortRead", NULL, NULL, "i8259 PIC #1");
    998998        if (VBOX_FAILURE(rc))
    999999            return rc;
     
    10221022    if (fR0Enabled)
    10231023    {
    1024         rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x4d0, 1, &pData->aPics[0],
     1024        RTR0PTR pDataR0 = PDMINS2DATA_R0PTR(pDevIns);
     1025        rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x4d0, 1, pDataR0 + RT_OFFSETOF(DEVPIC, aPics[0]),
    10251026                                       "picIOPortElcrWrite", "picIOPortElcrRead", NULL, NULL, "i8259 PIC #0 - elcr");
    10261027        if (VBOX_FAILURE(rc))
    10271028            return rc;
    1028         rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x4d1, 1, &pData->aPics[1],
     1029        rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x4d1, 1, pDataR0 + RT_OFFSETOF(DEVPIC, aPics[1]),
    10291030                                       "picIOPortElcrWrite", "picIOPortElcrRead", NULL, NULL, "i8259 PIC #1 - elcr");
    10301031        if (VBOX_FAILURE(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette