Changeset 26172 in vbox
- Timestamp:
- Feb 2, 2010 8:41:40 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdev.h
r26169 r26172 59 59 * @param pDevIns The device instance data. If the registration structure 60 60 * is needed, it can be accessed thru pDevIns->pReg. 61 * @param iInstance Instance number. Use this to figure out which registers and such to use. 62 * The instance number is also found in pDevIns->iInstance, but since it's 63 * likely to be freqently used PDM passes it as parameter. 64 * @param pCfgHandle Configuration node handle for the device. Use this to obtain the configuration 65 * of the device instance. It's also found in pDevIns->pCfgHandle, but since it's 66 * primary usage will in this function it's passed as a parameter. 67 */ 68 typedef DECLCALLBACK(int) FNPDMDEVCONSTRUCT(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle); 61 * @param iInstance Instance number. Use this to figure out which registers 62 * and such to use. The instance number is also found in 63 * pDevIns->iInstance, but since it's likely to be 64 * freqently used PDM passes it as parameter. 65 * @param pCfg Configuration node handle for the driver. This is 66 * expected to be in high demand in the constructor and is 67 * therefore passed as an argument. When using it at other 68 * times, it can be found in pDrvIns->pCfg. 69 */ 70 typedef DECLCALLBACK(int) FNPDMDEVCONSTRUCT(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg); 69 71 /** Pointer to a FNPDMDEVCONSTRUCT() function. */ 70 72 typedef FNPDMDEVCONSTRUCT *PFNPDMDEVCONSTRUCT; … … 3492 3494 R3PTRTYPE(PCPDMDEVREG) pReg; 3493 3495 /** Configuration handle. */ 3494 R3PTRTYPE(PCFGMNODE) pCfg Handle;3496 R3PTRTYPE(PCFGMNODE) pCfg; 3495 3497 3496 3498 /** The base interface of the device. -
trunk/include/VBox/pdmdrv.h
r26168 r26172 67 67 * @param pDrvIns The driver instance data. If the registration structure 68 68 * is needed, it can be accessed thru pDrvIns->pReg. 69 * @param pCfg Handle Configuration node handle for the driver. Use this to70 * obtain the configuration of the driver instance. It's71 * also found in pDrvIns->pCfgHandle as it's expected to be72 * used frequently in this function.69 * @param pCfg Configuration node handle for the driver. This is 70 * expected to be in high demand in the constructor and is 71 * therefore passed as an argument. When using it at other 72 * times, it can be accessed via pDrvIns->pCfg. 73 73 * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines. 74 74 */ 75 typedef DECLCALLBACK(int) FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfg Handle, uint32_t fFlags);75 typedef DECLCALLBACK(int) FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 76 76 /** Pointer to a FNPDMDRVCONSTRUCT() function. */ 77 77 typedef FNPDMDRVCONSTRUCT *PFNPDMDRVCONSTRUCT; … … 367 367 R3PTRTYPE(PCPDMDRVREG) pReg; 368 368 /** Configuration handle. */ 369 R3PTRTYPE(PCFGMNODE) pCfg Handle;369 R3PTRTYPE(PCFGMNODE) pCfg; 370 370 371 371 /** Pointer to the base interface of the device/driver instance above. */ -
trunk/include/VBox/pdmusb.h
r26170 r26172 112 112 * pUsbDev->iInstance, but since it's likely to be 113 113 * freqently used PDM passes it as parameter. 114 * @param pCfg Configuration node handle for the device. Use this to115 * obtain the configuration of the device instance. It's116 * also found in pUsbDev->pCfg, but since it 's primary117 * usage will in this function it 's passed as a parameter.118 * @param pCfgGlobal Handle to the global device configuration. Also foundin119 * pUsbDev->pCfgGlobal.114 * @param pCfg Configuration node handle for the device. Use this to 115 * obtain the configuration of the device instance. It is 116 * also found in pUsbDev->pCfg, but since it is primary 117 * usage will in this function it is passed as a parameter. 118 * @param pCfgGlobal Handle to the global device configuration. Also found 119 * in pUsbDev->pCfgGlobal. 120 120 * @remarks This callback is required. 121 121 */ -
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r26165 r26172 426 426 VBOX_DMI_TABLE_SIZE, 427 427 &pThis->aUuid, 428 pDevIns->pCfg Handle,428 pDevIns->pCfg, 429 429 true /* fPutSmbiosHeaders */); 430 430 Assert(RT_SUCCESS(rc)); -
trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
r26115 r26172 66 66 int rc; 67 67 68 rc = CFGMR3QueryU16Def(pDevIns->pCfg Handle, "NumCPUs", &cNumCpus, 1);68 rc = CFGMR3QueryU16Def(pDevIns->pCfg, "NumCPUs", &cNumCpus, 1); 69 69 70 70 if (RT_FAILURE(rc)) … … 73 73 /* Clear CPU objects at all, if needed */ 74 74 bool fShowCpu; 75 rc = CFGMR3QueryBoolDef(pDevIns->pCfg Handle, "ShowCpu", &fShowCpu, false);75 rc = CFGMR3QueryBoolDef(pDevIns->pCfg, "ShowCpu", &fShowCpu, false); 76 76 if (RT_FAILURE(rc)) 77 77 return rc; … … 146 146 size_t cbAmlCode = 0; 147 147 char *pszAmlFilePath = NULL; 148 int rc = CFGMR3QueryStringAlloc(pDevIns->pCfg Handle, "AmlFilePath", &pszAmlFilePath);148 int rc = CFGMR3QueryStringAlloc(pDevIns->pCfg, "AmlFilePath", &pszAmlFilePath); 149 149 if (RT_SUCCESS(rc)) 150 150 { -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r26165 r26172 1958 1958 cbXsdt += cAddr*sizeof(uint64_t); /* each entry: 64 bits phys. address. */ 1959 1959 1960 rc = CFGMR3QueryU64(s->pDevIns->pCfg Handle, "RamSize", &s->u64RamSize);1960 rc = CFGMR3QueryU64(s->pDevIns->pCfg, "RamSize", &s->u64RamSize); 1961 1961 if (RT_FAILURE(rc)) 1962 1962 return PDMDEV_SET_ERROR(s->pDevIns, rc, … … 1964 1964 1965 1965 uint32_t cbRamHole; 1966 rc = CFGMR3QueryU32Def(s->pDevIns->pCfg Handle, "RamHoleSize", &cbRamHole, MM_RAM_HOLE_SIZE_DEFAULT);1966 rc = CFGMR3QueryU32Def(s->pDevIns->pCfg, "RamHoleSize", &cbRamHole, MM_RAM_HOLE_SIZE_DEFAULT); 1967 1967 if (RT_FAILURE(rc)) 1968 1968 return PDMDEV_SET_ERROR(s->pDevIns, rc, -
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r26165 r26172 5776 5776 { 5777 5777 uint32_t iPort; 5778 int rc = CFGMR3QueryU32Def(pDevIns->pCfg Handle, s_apszIdeEmuPortNames[i], &iPort, i);5778 int rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i); 5779 5779 AssertRCReturn(rc, rc); 5780 5780 SSMR3PutU32(pSSM, iPort); … … 5934 5934 { 5935 5935 uint32_t iPort; 5936 rc = CFGMR3QueryU32Def(pDevIns->pCfg Handle, s_apszIdeEmuPortNames[i], &iPort, i);5936 rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i); 5937 5937 AssertRCReturn(rc, rc); 5938 5938 -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
r26169 r26172 108 108 GEN_CHECK_OFF(PDMDEVINS, Internal); 109 109 GEN_CHECK_OFF(PDMDEVINS, pReg); 110 GEN_CHECK_OFF(PDMDEVINS, pCfg Handle);110 GEN_CHECK_OFF(PDMDEVINS, pCfg); 111 111 GEN_CHECK_OFF(PDMDEVINS, iInstance); 112 112 GEN_CHECK_OFF(PDMDEVINS, IBase); -
trunk/src/VBox/VMM/PDMDevice.cpp
r26169 r26172 329 329 pDevIns->pHlpR0 = pHlpR0; 330 330 pDevIns->pReg = paDevs[i].pDev->pReg; 331 pDevIns->pCfg Handle= pConfigNode;331 pDevIns->pCfg = pConfigNode; 332 332 pDevIns->iInstance = paDevs[i].iInstance; 333 333 pDevIns->pvInstanceDataR3 = &pDevIns->achInstanceData[0]; … … 367 367 paDevs[i].pDev->cInstances++; 368 368 Log(("PDM: Constructing device '%s' instance %d...\n", pDevIns->pReg->szName, pDevIns->iInstance)); 369 rc = pDevIns->pReg->pfnConstruct(pDevIns, pDevIns->iInstance, pDevIns->pCfg Handle);369 rc = pDevIns->pReg->pfnConstruct(pDevIns, pDevIns->iInstance, pDevIns->pCfg); 370 370 if (RT_FAILURE(rc)) 371 371 { -
trunk/src/VBox/VMM/PDMDriver.cpp
r26169 r26172 449 449 pNew->Internal.s.pCfgHandle = pNode; 450 450 pNew->pReg = pDrv->pReg; 451 pNew->pCfg Handle= pConfigNode;451 pNew->pCfg = pConfigNode; 452 452 pNew->iInstance = pDrv->iNextInstance; 453 453 pNew->pUpBase = pBaseInterface; … … 490 490 * Invoke the constructor. 491 491 */ 492 rc = pDrv->pReg->pfnConstruct(pNew, pNew->pCfg Handle, 0 /*fFlags*/);492 rc = pDrv->pReg->pfnConstruct(pNew, pNew->pCfg, 0 /*fFlags*/); 493 493 if (RT_SUCCESS(rc)) 494 494 { -
trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp
r26169 r26172 376 376 GEN_CHECK_OFF(PDMDEVINS, pvInstanceDataR3); 377 377 GEN_CHECK_OFF(PDMDEVINS, pReg); 378 GEN_CHECK_OFF(PDMDEVINS, pCfg Handle);378 GEN_CHECK_OFF(PDMDEVINS, pCfg); 379 379 GEN_CHECK_OFF(PDMDEVINS, IBase); 380 380 GEN_CHECK_OFF(PDMDEVINS, Internal); … … 403 403 GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR3); 404 404 GEN_CHECK_OFF(PDMDRVINS, pReg); 405 GEN_CHECK_OFF(PDMDRVINS, pCfg Handle);405 GEN_CHECK_OFF(PDMDRVINS, pCfg); 406 406 GEN_CHECK_OFF(PDMDRVINS, IBase); 407 407 GEN_CHECK_OFF(PDMDRVINS, Internal);
Note:
See TracChangeset
for help on using the changeset viewer.