VirtualBox

Changeset 91889 in vbox for trunk


Ignore:
Timestamp:
Oct 20, 2021 12:05:47 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Bus/DevPciIch9: Access CFGM API only through the device helper callbacks, bugref:10074

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r91888 r91889  
    33143314    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    33153315
    3316     PDEVPCIBUSCC pBusCC   = PDMINS_2_DATA_CC(pDevIns, PDEVPCIBUSCC);
    3317     PDEVPCIROOT  pPciRoot = PDMINS_2_DATA(pDevIns, PDEVPCIROOT);
    3318     PDEVPCIBUS   pBus     = &pPciRoot->PciBus;
     3316    PDEVPCIBUSCC    pBusCC   = PDMINS_2_DATA_CC(pDevIns, PDEVPCIBUSCC);
     3317    PDEVPCIROOT     pPciRoot = PDMINS_2_DATA(pDevIns, PDEVPCIROOT);
     3318    PCPDMDEVHLPR3   pHlp     = pDevIns->pHlpR3;
     3319    PDEVPCIBUS      pBus     = &pPciRoot->PciBus;
    33193320    Assert(ASMMemIsZero(pPciRoot, sizeof(*pPciRoot))); /* code used to memset it for some funny reason. just temp insurance. */
    33203321
     
    33253326
    33263327    /* query whether we got an IOAPIC */
    3327     int rc = CFGMR3QueryBoolDef(pCfg, "IOAPIC", &pPciRoot->fUseIoApic, false /** @todo default to true? */);
     3328    int rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "IOAPIC", &pPciRoot->fUseIoApic, false /** @todo default to true? */);
    33283329    AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to query boolean value \"IOAPIC\"")));
    33293330
     
    33313332        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Must use IO-APIC with ICH9 chipset"));
    33323333
    3333     rc = CFGMR3QueryU64Def(pCfg, "McfgBase", &pPciRoot->u64PciConfigMMioAddress, 0);
     3334    rc = pHlp->pfnCFGMQueryU64Def(pCfg, "McfgBase", &pPciRoot->u64PciConfigMMioAddress, 0);
    33343335    AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"McfgBase\"")));
    33353336
    3336     rc = CFGMR3QueryU64Def(pCfg, "McfgLength", &pPciRoot->u64PciConfigMMioLength, 0);
     3337    rc = pHlp->pfnCFGMQueryU64Def(pCfg, "McfgLength", &pPciRoot->u64PciConfigMMioLength, 0);
    33373338    AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"McfgLength\"")));
    33383339
     
    36403641{
    36413642    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     3643    PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3;
    36423644
    36433645    /*
     
    36483650    /* check if we're supposed to implement a PCIe bridge. */
    36493651    bool fExpress;
    3650     int rc = CFGMR3QueryBoolDef(pCfg, "ExpressEnabled", &fExpress, false);
     3652    int rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "ExpressEnabled", &fExpress, false);
    36513653    AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to query boolean value \"ExpressEnabled\"")));
    36523654
    36533655    char szExpressPortType[80];
    3654     rc = CFGMR3QueryStringDef(pCfg, "ExpressPortType", szExpressPortType, sizeof(szExpressPortType), "RootCmplxIntEp");
     3656    rc = pHlp->pfnCFGMQueryStringDef(pCfg, "ExpressPortType", szExpressPortType, sizeof(szExpressPortType), "RootCmplxIntEp");
    36553657    AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: failed to read \"ExpressPortType\" as string")));
    36563658
Note: See TracChangeset for help on using the changeset viewer.

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