VirtualBox

Changeset 65820 in vbox


Ignore:
Timestamp:
Feb 20, 2017 5:41:32 PM (8 years ago)
Author:
vboxsync
Message:

DevPciIch9: add a way to get the PDMPCIDEV structure of an ich9pcibridge device (not perfectly clean as this isn't a PDM interface, but bearable as this won't be generally used and all other solutions need a lot more effort)

File:
1 edited

Legend:

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

    r65708 r65820  
    4949#ifdef IN_RING3
    5050# include <iprt/mem.h>
     51# include <iprt/uuid.h>
    5152#endif
    5253
     
    32763277
    32773278/**
     3279 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     3280 */
     3281static DECLCALLBACK(void *) ich9pcibridgeQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     3282{
     3283    PPDMDEVINS pDevIns = RT_FROM_MEMBER(pInterface, PDMDEVINS, IBase);
     3284    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDevIns->IBase);
     3285    /* Special access to the PDMPCIDEV structure of a ich9pcibridge instance. */
     3286    PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS);
     3287    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIICH9BRIDGEPDMPCIDEV, &pBus->PciDev);
     3288    return NULL;
     3289}
     3290
     3291
     3292/**
    32783293 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    32793294 */
     
    33043319                                N_("Configuration error: Failed to query boolean value \"R0Enabled\""));
    33053320    Log(("PCI: fGCEnabled=%RTbool fR0Enabled=%RTbool\n", fGCEnabled, fR0Enabled));
     3321
     3322    pDevIns->IBase.pfnQueryInterface = ich9pcibridgeQueryInterface;
    33063323
    33073324    /*
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