Changeset 10372 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jul 8, 2008 2:14:29 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33012
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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 ()
Note:
See TracChangeset
for help on using the changeset viewer.