儲存庫 vbox 的更動 10372
- 時間撮記:
- 2008-7-8 下午02:14:29 (16 年 以前)
- 位置:
- trunk/src/VBox
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r9212 r10372 67 67 #define SYSI_DATA 0x0000404c 68 68 #define ACPI_RESET_BLK 0x00004050 69 #define FDC_STATUS 0x00004054 69 70 70 71 /* PM1x status register bits */ … … 185 186 uint8_t u8IndexShift; 186 187 uint8_t u8UseIOApic; 188 uint8_t u8UseFdc; 187 189 bool fPowerButtonHandled; 188 190 … … 424 426 IO_WRITE_PROTO (acpiBatIndexWrite); 425 427 IO_READ_PROTO (acpiBatDataRead); 428 IO_READ_PROTO (acpiFdcStatusRead); 426 429 IO_READ_PROTO (acpiSysInfoDataRead); 427 430 IO_WRITE_PROTO (acpiSysInfoDataWrite); … … 1081 1084 } 1082 1085 1086 IO_READ_PROTO (acpiFdcStatusRead) 1087 { 1088 ACPIState *s = (ACPIState *)pvUser; 1089 1090 switch (cb) 1091 { 1092 case 4: 1093 *pu32 = s->u8UseFdc 1094 ? STA_DEVICE_PRESENT_MASK /* present */ 1095 | STA_DEVICE_ENABLED_MASK /* enabled and decodes its resources */ 1096 | STA_DEVICE_SHOW_IN_UI_MASK /* should be shown in UI */ 1097 | STA_DEVICE_FUNCTIONING_PROPERLY_MASK /* functioning properly */ 1098 : 0; /* device not present */ 1099 break; 1100 default: 1101 return VERR_IOM_IOPORT_UNUSED; 1102 } 1103 return VINF_SUCCESS; 1104 } 1105 1083 1106 IO_WRITE_PROTO (acpiSysInfoIndexWrite) 1084 1107 { … … 1551 1574 1552 1575 /* Validate and read the configuration. */ 1553 if (!CFGMR3AreValuesValid (pCfgHandle, "RamSize\0IOAPIC\0GCEnabled\0R0Enabled\0 "))1576 if (!CFGMR3AreValuesValid (pCfgHandle, "RamSize\0IOAPIC\0GCEnabled\0R0Enabled\0FdcEnabled\0")) 1554 1577 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 1555 1578 N_("Configuration error: Invalid config key for ACPI device")); … … 1564 1587 return PDMDEV_SET_ERROR(pDevIns, rc, 1565 1588 N_("Configuration error: Failed to read \"IOAPIC\"")); 1589 1590 /* query whether we are supposed to present an FDC controller */ 1591 rc = CFGMR3QueryU8 (pCfgHandle, "FdcEnabled", &s->u8UseFdc); 1592 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 1593 s->u8UseFdc = 1; 1594 else if (VBOX_FAILURE (rc)) 1595 return PDMDEV_SET_ERROR(pDevIns, rc, 1596 N_("Configuration error: Failed to read \"FdcEnabled\"")); 1566 1597 1567 1598 rc = CFGMR3QueryBool (pCfgHandle, "GCEnabled", &fGCEnabled); … … 1615 1646 R (SYSI_INDEX, 1, acpiSysInfoIndexWrite, NULL, "ACPI system info index"); 1616 1647 R (SYSI_DATA, 1, acpiSysInfoDataWrite, acpiSysInfoDataRead, "ACPI system info data"); 1648 R (FDC_STATUS, 1, NULL, acpiFdcStatusRead, "ACPI FDC status index"); 1617 1649 R (GPE0_BLK + L, L, acpiGpe0EnWrite, acpiGpe0EnRead, "ACPI GPE0 Enable"); 1618 1650 R (GPE0_BLK, L, acpiGpe0StsWrite, acpiGpe0StsRead, "ACPI GPE0 Status"); -
trunk/src/VBox/Devices/PC/vbox.dsl
r8207 r10372 378 378 Name (_HID, EisaId ("PNP0700")) 379 379 380 OperationRegion (CFDC, SystemIO, 0x4054, 0x08) 381 Field (CFDC, DwordAcc, NoLock, Preserve) 382 { 383 FSTA, 32, 384 } 385 386 Method (_STA, 0, NotSerialized) 387 { 388 Return (FSTA) 389 } 390 380 391 // Current resource settings 381 392 Name (_CRS, ResourceTemplate () -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r9809 r10372 319 319 320 320 /* 321 * ACPI322 */323 BOOL fACPI;324 hrc = biosSettings->COMGETTER(ACPIEnabled)(&fACPI); H();325 if (fACPI)326 {327 rc = CFGMR3InsertNode(pDevices, "acpi", &pDev); RC_CHECK();328 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK();329 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK();330 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK();331 rc = CFGMR3InsertInteger(pCfg, "RamSize", cRamMBs * _1M); RC_CHECK();332 rc = CFGMR3InsertInteger(pCfg, "IOAPIC", fIOAPIC); RC_CHECK();333 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 7); RC_CHECK();334 Assert(!afPciDeviceNo[7]);335 afPciDeviceNo[7] = true;336 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK();337 338 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK();339 rc = CFGMR3InsertString(pLunL0, "Driver", "ACPIHost"); RC_CHECK();340 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();341 }342 343 /*344 321 * DMA 345 322 */ … … 392 369 ComPtr<IFloppyDrive> floppyDrive; 393 370 hrc = pMachine->COMGETTER(FloppyDrive)(floppyDrive.asOutParam()); H(); 394 BOOL fF loppyEnabled;395 hrc = floppyDrive->COMGETTER(Enabled)(&fF loppyEnabled);H();396 if (fF loppyEnabled)371 BOOL fFdcEnabled; 372 hrc = floppyDrive->COMGETTER(Enabled)(&fFdcEnabled); H(); 373 if (fFdcEnabled) 397 374 { 398 375 rc = CFGMR3InsertNode(pDevices, "i82078", &pDev); RC_CHECK(); … … 456 433 } 457 434 } 435 } 436 437 /* 438 * ACPI 439 */ 440 BOOL fACPI; 441 hrc = biosSettings->COMGETTER(ACPIEnabled)(&fACPI); H(); 442 if (fACPI) 443 { 444 rc = CFGMR3InsertNode(pDevices, "acpi", &pDev); RC_CHECK(); 445 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 446 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 447 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 448 rc = CFGMR3InsertInteger(pCfg, "RamSize", cRamMBs * _1M); RC_CHECK(); 449 rc = CFGMR3InsertInteger(pCfg, "IOAPIC", fIOAPIC); RC_CHECK(); 450 rc = CFGMR3InsertInteger(pCfg, "FdcEnabled", fFdcEnabled); RC_CHECK(); 451 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 7); RC_CHECK(); 452 Assert(!afPciDeviceNo[7]); 453 afPciDeviceNo[7] = true; 454 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 455 456 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 457 rc = CFGMR3InsertString(pLunL0, "Driver", "ACPIHost"); RC_CHECK(); 458 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 458 459 } 459 460
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器