Changeset 16170 in vbox
- Timestamp:
- Jan 22, 2009 2:40:08 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 41913
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/log.h
r16065 r16170 104 104 /** KeyBoard Controller Device group. */ 105 105 LOG_GROUP_DEV_KBD, 106 /** Low Pin Count Device group. */ 107 LOG_GROUP_DEV_LPC, 106 108 /** LsiLogic SCSI controller Device group. */ 107 109 LOG_GROUP_DEV_LSILOGICSCSI, … … 359 361 "DEV_INIP", \ 360 362 "DEV_KBD", \ 363 "DEV_LPC", \ 361 364 "DEV_LSILOGICSCSI", \ 362 365 "DEV_NE2000", \ … … 470 473 /** @} */ 471 474 #endif 472 -
trunk/src/VBox/Devices/Builtins.cpp
r15963 r16170 84 84 return rc; 85 85 #endif 86 #ifdef VBOX_WITH_SMC 87 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSMC); 88 if (RT_FAILURE(rc)) 89 return rc; 90 #endif 91 #ifdef VBOX_WITH_LPC 92 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC); 93 if (RT_FAILURE(rc)) 94 return rc; 95 #endif 86 96 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceMC146818); 87 97 if (RT_FAILURE(rc)) … … 303 313 } 304 314 #endif 305 -
trunk/src/VBox/Devices/Builtins.h
r16031 r16170 76 76 extern const PDMDEVREG g_DeviceSMC; 77 77 #endif 78 #ifdef VBOX_WITH_LPC 79 extern const PDMDEVREG g_DeviceLPC; 80 #endif 78 81 79 82 extern const PDMDRVREG g_DrvMouseQueue; -
trunk/src/VBox/Devices/Makefile.kmk
r16064 r16170 338 338 endif 339 339 340 ifdef VBOX_WITH_LPC 341 DevicesR3_DEFS += VBOX_WITH_LPC 342 DevicesR3_SOURCES += PC/DevLPC.cpp 343 endif 344 340 345 ifdef VBOX_WITH_USB 341 346 DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3 -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r16042 r16170 66 66 #define SYSI_DATA 0x0000404c 67 67 #define ACPI_RESET_BLK 0x00004050 68 #define FDC_STATUS 0x0000405469 68 70 69 /* PM1x status register bits */ … … 132 131 SYSTEM_INFO_INDEX_MEMORY_LENGTH = 0, 133 132 SYSTEM_INFO_INDEX_USE_IOAPIC = 1, 134 SYSTEM_INFO_INDEX_LAST = 2, 133 SYSTEM_INFO_INDEX_HPET_STATUS = 2, 134 SYSTEM_INFO_INDEX_SMC_STATUS = 3, 135 SYSTEM_INFO_INDEX_FDC_STATUS = 4, 136 SYSTEM_INFO_INDEX_LAST = 5, 135 137 SYSTEM_INFO_INDEX_INVALID = 0x80, 136 138 SYSTEM_INFO_INDEX_VALID = 0x200 … … 184 186 uint8_t u8UseIOApic; 185 187 uint8_t u8UseFdc; 188 /* If High Precision Event Timer device should be supported */ 189 uint8_t u8UseHpet; 190 /* If System Management Controller device should be supported */ 191 uint8_t u8UseSmc; 192 186 193 bool fPowerButtonHandled; 187 188 194 /** ACPI port base interface. */ 189 195 PDMIBASE IBase; … … 196 202 /** Pointer to the driver connector interface */ 197 203 R3PTRTYPE(PPDMIACPICONNECTOR) pDrv; 204 205 uint32_t Alignment0; /**< Structure size alignment. */ 206 198 207 }; 199 208 … … 533 542 IO_WRITE_PROTO (acpiBatIndexWrite); 534 543 IO_READ_PROTO (acpiBatDataRead); 535 IO_READ_PROTO (acpiFdcStatusRead);536 544 IO_READ_PROTO (acpiSysInfoDataRead); 537 545 IO_WRITE_PROTO (acpiSysInfoDataWrite); … … 1246 1254 } 1247 1255 1248 IO_READ_PROTO (acpiFdcStatusRead)1249 {1250 ACPIState *s = (ACPIState *)pvUser;1251 1252 switch (cb)1253 {1254 case 4:1255 *pu32 = s->u8UseFdc1256 ? STA_DEVICE_PRESENT_MASK /* present */1257 | STA_DEVICE_ENABLED_MASK /* enabled and decodes its resources */1258 | STA_DEVICE_SHOW_IN_UI_MASK /* should be shown in UI */1259 | STA_DEVICE_FUNCTIONING_PROPERLY_MASK /* functioning properly */1260 : 0; /* device not present */1261 break;1262 default:1263 return VERR_IOM_IOPORT_UNUSED;1264 }1265 return VINF_SUCCESS;1266 }1267 1268 1256 IO_WRITE_PROTO (acpiSysInfoIndexWrite) 1269 1257 { … … 1277 1265 else 1278 1266 { 1267 /* see comment at the declaration of u8IndexShift */ 1268 if (s->u8IndexShift == 0) 1269 { 1270 if (((u32 >> 2) < SYSTEM_INFO_INDEX_LAST) && ((u32 & 0x3)) == 0) 1271 { 1272 s->u8IndexShift = 2; 1273 } 1274 } 1275 1279 1276 u32 >>= s->u8IndexShift; 1280 1277 Assert (u32 < SYSTEM_INFO_INDEX_LAST); … … 1306 1303 *pu32 = s->u8UseIOApic; 1307 1304 break; 1308 1305 1306 case SYSTEM_INFO_INDEX_HPET_STATUS: 1307 *pu32 = s->u8UseHpet ? ( STA_DEVICE_PRESENT_MASK 1308 | STA_DEVICE_ENABLED_MASK 1309 | STA_DEVICE_SHOW_IN_UI_MASK 1310 | STA_DEVICE_FUNCTIONING_PROPERLY_MASK) 1311 : 0; 1312 break; 1313 1314 case SYSTEM_INFO_INDEX_SMC_STATUS: 1315 *pu32 = s->u8UseSmc ? ( STA_DEVICE_PRESENT_MASK 1316 | STA_DEVICE_ENABLED_MASK 1317 /* no need to show this device in the UI */ 1318 | STA_DEVICE_FUNCTIONING_PROPERLY_MASK) 1319 : 0; 1320 break; 1321 1322 case SYSTEM_INFO_INDEX_FDC_STATUS: 1323 *pu32 = s->u8UseFdc ? ( STA_DEVICE_PRESENT_MASK 1324 | STA_DEVICE_ENABLED_MASK 1325 | STA_DEVICE_SHOW_IN_UI_MASK 1326 | STA_DEVICE_FUNCTIONING_PROPERLY_MASK) 1327 : 0; 1328 break; 1329 1330 1309 1331 /* Solaris 9 tries to read from this index */ 1310 1332 case SYSTEM_INFO_INDEX_INVALID: 1311 1333 *pu32 = 0; 1312 1334 break; 1313 1335 1314 1336 default: 1315 1337 AssertMsgFailed (("Invalid system info index %d\n", s->uSystemInfoIndex)); … … 1754 1776 "GCEnabled\0" 1755 1777 "R0Enabled\0" 1756 "FdcEnabled\0")) 1778 "HpetEnabled\0" 1779 "SmcEnabled\0" 1780 "FdcEnabled\0" 1781 )) 1757 1782 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 1758 1783 N_("Configuration error: Invalid config key for ACPI device")); … … 1780 1805 return PDMDEV_SET_ERROR(pDevIns, rc, 1781 1806 N_("Configuration error: Failed to read \"FdcEnabled\"")); 1807 1808 /* query whether we are supposed to present HPET */ 1809 rc = CFGMR3QueryU8Def (pCfgHandle, "HpetEnabled", &s->u8UseHpet, 0); 1810 if (RT_FAILURE(rc)) 1811 return PDMDEV_SET_ERROR(pDevIns, rc, 1812 N_("Configuration error: Failed to read \"HpetEnabled\"")); 1813 /* query whether we are supposed to present SMC */ 1814 rc = CFGMR3QueryU8Def (pCfgHandle, "SmcEnabled", &s->u8UseSmc, 0); 1815 if (RT_FAILURE(rc)) 1816 return PDMDEV_SET_ERROR(pDevIns, rc, 1817 N_("Configuration error: Failed to read \"SmcEnabled\"")); 1782 1818 1783 1819 rc = CFGMR3QueryBool (pCfgHandle, "GCEnabled", &fGCEnabled); … … 1831 1867 R (SYSI_INDEX, 1, acpiSysInfoIndexWrite, NULL, "ACPI system info index"); 1832 1868 R (SYSI_DATA, 1, acpiSysInfoDataWrite, acpiSysInfoDataRead, "ACPI system info data"); 1833 R (FDC_STATUS, 1, NULL, acpiFdcStatusRead, "ACPI FDC status index");1834 1869 R (GPE0_BLK + L, L, acpiGpe0EnWrite, acpiGpe0EnRead, "ACPI GPE0 Enable"); 1835 1870 R (GPE0_BLK, L, acpiGpe0StsWrite, acpiGpe0StsRead, "ACPI GPE0 Status"); … … 2021 2056 #endif /* IN_RING3 */ 2022 2057 #endif /* !VBOX_DEVICE_STRUCT_TESTCASE */ 2023 -
trunk/src/VBox/Devices/PC/vbox.dsl
r16042 r16170 141 141 MEML, 32, 142 142 UIOA, 32, 143 UHPT, 32, 144 USMC, 32, 145 UFDC, 32, 143 146 Offset (0x80), 144 147 ININ, 32, … … 154 157 DBG ("UIOA: ") 155 158 HEX4 (UIOA) 159 DBG ("UHPT: ") 160 HEX4 (UHPT) 161 DBG ("USMC: ") 162 HEX4 (USMC) 163 DBG ("UFDC: ") 164 HEX4 (UFDC) 156 165 } 157 166 … … 564 573 Name (_HID, EisaId ("PNP0700")) 565 574 566 OperationRegion (CFDC, SystemIO, 0x4054, 0x08)567 Field (CFDC, DwordAcc, NoLock, Preserve)568 {569 FSTA, 32,570 }571 572 575 Method (_STA, 0, NotSerialized) 573 576 { 574 Return ( FSTA)577 Return (UFDC) 575 578 } 576 579 … … 852 855 Scope (\_SB) 853 856 { 857 // High Precision Event Timer 858 Device(HPET) { 859 Name(_HID, EISAID("PNP0103")) 860 Name(_UID, 0) 861 Method (_STA, 0, NotSerialized) { 862 Return(UHPT) 863 } 864 Name(_CRS, ResourceTemplate() { 865 DWordMemory( 866 ResourceConsumer, PosDecode, MinFixed, MaxFixed, 867 NonCacheable, ReadWrite, 868 0x00000000, 869 0xFED00000, 870 0xFED003FF, 871 0x00000000, 872 0x00000400 /* 1K memory: FED00000 - FED003FF */ 873 ) 874 }) 875 } 876 877 // System Management Controller 878 Device (SMC) 879 { 880 Name (_HID, EisaId ("APP0001")) 881 Name (_CID, "smc-napa") 882 883 Method (_STA, 0, NotSerialized) 884 { 885 Return (USMC) 886 } 887 Name (_CRS, ResourceTemplate () 888 { 889 IO (Decode16, 890 0x0300, // Range Minimum 891 0x0300, // Range Maximum 892 0x01, // Alignment 893 0x20, // Length 894 ) 895 //IRQNoFlags () {8} 896 }) 897 } 898 854 899 // Fields within PIIX3 configuration[0x60..0x63] with 855 900 // IRQ mappings -
trunk/src/VBox/Devices/testcase/Makefile.kmk
r15478 r16170 70 70 tstDeviceStructSizeGC_DEFS += VBOX_WITH_LSILOGIC 71 71 endif 72 ifdef VBOX_WITH_HPET 73 tstDeviceStructSizeGC_DEFS += VBOX_WITH_HPET 74 endif 72 75 tstDeviceStructSizeGC_SOURCES = tstDeviceStructSizeGC.cpp 73 76 tstDeviceStructSizeGC_INCS = \ … … 96 99 ifdef VBOX_WITH_LSILOGIC 97 100 tstDeviceStructSize_DEFS += VBOX_WITH_LSILOGIC 101 endif 102 ifdef VBOX_WITH_HPET 103 tstDeviceStructSize_DEFS += VBOX_WITH_HPET 104 endif 105 ifdef VBOX_WITH_SMC 106 tstDeviceStructSize_DEFS += VBOX_WITH_SMC 107 endif 108 ifdef VBOX_WITH_LPC 109 tstDeviceStructSize_DEFS += VBOX_WITH_LPC 98 110 endif 99 111 tstDeviceStructSize_INCS = \ -
trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
r15475 r16170 75 75 # undef LOG_GROUP 76 76 # include "../Storage/DevLsiLogicSCSI.cpp" 77 #endif 78 #ifdef VBOX_WITH_HPET 79 # undef LOG_GROUP 80 # include "../PC/DevHPET.cpp" 81 #endif 82 #ifdef VBOX_WITH_LPC 83 # undef LOG_GROUP 84 # include "../PC/DevLPC.cpp" 85 #endif 86 #ifdef VBOX_WITH_SMC 87 # undef LOG_GROUP 88 # include "../PC/DevSMC.cpp" 77 89 #endif 78 90 … … 264 276 return rc; 265 277 } 266 -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp
r16042 r16170 85 85 # undef LOG_GROUP 86 86 # include "../Storage/DevLsiLogicSCSI.cpp" 87 #endif 88 #ifdef VBOX_WITH_HPET 89 # undef LOG_GROUP 90 # include "../PC/DevHPET.cpp" 87 91 #endif 88 92 … … 442 446 GEN_CHECK_OFF(ACPIState, u8IndexShift); 443 447 GEN_CHECK_OFF(ACPIState, u8UseIOApic); 448 GEN_CHECK_OFF(ACPIState, u8UseFdc); 449 GEN_CHECK_OFF(ACPIState, u8UseHpet); 450 GEN_CHECK_OFF(ACPIState, u8UseSmc); 444 451 GEN_CHECK_OFF(ACPIState, IBase); 445 452 GEN_CHECK_OFF(ACPIState, IACPIPort); … … 1421 1428 #endif /* VBOX_WITH_LSILOGIC */ 1422 1429 1430 #ifdef VBOX_WITH_HPET 1431 GEN_CHECK_SIZE(HPETState); 1432 GEN_CHECK_OFF(HPETState, pDevInsR3); 1433 GEN_CHECK_OFF(HPETState, pDevInsR0); 1434 GEN_CHECK_OFF(HPETState, pDevInsRC); 1435 GEN_CHECK_OFF(HPETState, hpet_offset); 1436 GEN_CHECK_OFF(HPETState, capability); 1437 GEN_CHECK_OFF(HPETState, config); 1438 GEN_CHECK_OFF(HPETState, isr); 1439 GEN_CHECK_OFF(HPETState, hpet_counter); 1440 1441 GEN_CHECK_SIZE(HPETTimer); 1442 GEN_CHECK_OFF(HPETTimer, pTimerR3); 1443 GEN_CHECK_OFF(HPETTimer, pHpetR3); 1444 GEN_CHECK_OFF(HPETTimer, pTimerR0); 1445 GEN_CHECK_OFF(HPETTimer, pHpetR0); 1446 GEN_CHECK_OFF(HPETTimer, pTimerRC); 1447 GEN_CHECK_OFF(HPETTimer, pHpetRC); 1448 GEN_CHECK_OFF(HPETTimer, tn); 1449 GEN_CHECK_OFF(HPETTimer, config); 1450 GEN_CHECK_OFF(HPETTimer, cmp); 1451 GEN_CHECK_OFF(HPETTimer, fsb); 1452 GEN_CHECK_OFF(HPETTimer, period); 1453 GEN_CHECK_OFF(HPETTimer, wrap_flag); 1454 #endif 1455 1423 1456 return (0); 1424 1457 } 1425 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r16049 r16170 473 473 fLpcEnabled = false; 474 474 #endif 475 476 if (fLpcEnabled) 477 { 478 rc = CFGMR3InsertNode(pDevices, "lpc", &pDev); RC_CHECK(); 479 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 480 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 481 } 475 482 476 483 /* -
trunk/src/VBox/Runtime/VBox/log-vbox.cpp
r16079 r16170 213 213 ASSERT_LOG_GROUP(DEV_IDE); 214 214 ASSERT_LOG_GROUP(DEV_KBD); 215 ASSERT_LOG_GROUP(DEV_LPC); 215 216 ASSERT_LOG_GROUP(DEV_NE2000); 216 217 ASSERT_LOG_GROUP(DEV_PC); … … 435 436 return g_pLogger = RT_SUCCESS(rc) ? pLogger : NULL; 436 437 } 437
Note:
See TracChangeset
for help on using the changeset viewer.