Changeset 32477 in vbox
- Timestamp:
- Sep 14, 2010 1:15:01 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 65851
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r32471 r32477 1540 1540 PCIDevSetClassSub( &pBus->aPciDev, 0x00); /* Host/PCI bridge */ 1541 1541 PCIDevSetClassBase( &pBus->aPciDev, 0x06); /* bridge */ 1542 PCIDevSetHeaderType(&pBus->aPciDev, 0x00); 1542 PCIDevSetHeaderType(&pBus->aPciDev, 0x00); /* normal device */ 1543 1543 1544 1544 pBus->aPciDev.pDevIns = pDevIns; 1545 1545 /* We register Host<->PCI controller on the bus */ 1546 1546 ich9pciRegisterInternal(pBus, -1, &pBus->aPciDev, "i82801"); 1547 1548 /* 1549 * Register I/O ports and save state. 1550 */ 1551 rc = PDMDevHlpIOPortRegister(pDevIns, 0x0cf8, 1, NULL, ich9pciIOPortAddressWrite, ich9pciIOPortAddressRead, NULL, NULL, "ICH9 (PCI)"); 1552 if (RT_FAILURE(rc)) 1553 return rc; 1554 rc = PDMDevHlpIOPortRegister(pDevIns, 0x0cfc, 4, NULL, ich9pciIOPortDataWrite, ich9pciIOPortDataRead, NULL, NULL, "ICH9 (PCI)"); 1555 if (RT_FAILURE(rc)) 1556 return rc; 1557 if (fGCEnabled) 1558 { 1559 rc = PDMDevHlpIOPortRegisterRC(pDevIns, 0x0cf8, 1, NIL_RTGCPTR, "ich9pciIOPortAddressWrite", "ich9pciIOPortAddressRead", NULL, NULL, "ICH9 (PCI)"); 1560 if (RT_FAILURE(rc)) 1561 return rc; 1562 rc = PDMDevHlpIOPortRegisterRC(pDevIns, 0x0cfc, 4, NIL_RTGCPTR, "ich9pciIOPortDataWrite", "ich9pciIOPortDataRead", NULL, NULL, "ICH9 (PCI)"); 1563 if (RT_FAILURE(rc)) 1564 return rc; 1565 } 1566 if (fR0Enabled) 1567 { 1568 rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x0cf8, 1, NIL_RTR0PTR, "ich9pciIOPortAddressWrite", "ich9pciIOPortAddressRead", NULL, NULL, "ICH9 (PCI)"); 1569 if (RT_FAILURE(rc)) 1570 return rc; 1571 rc = PDMDevHlpIOPortRegisterR0(pDevIns, 0x0cfc, 4, NIL_RTR0PTR, "ich9pciIOPortDataWrite", "ich9pciIOPortDataRead", NULL, NULL, "ICH9 (PCI)"); 1572 if (RT_FAILURE(rc)) 1573 return rc; 1574 } 1575 1547 1576 1548 1577 /** @todo: other chipset devices shall be registered too */ -
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r32436 r32477 245 245 // undef enables PCIBIOS when at least one PCI device is found 246 246 // i440FX is emulated by Bochs and QEMU 247 #define PCI_FIXED_HOST_BRIDGE 0x12378086 ;; i440FX PCI bridge 247 #define PCI_FIXED_HOST_BRIDGE_1 0x12378086 ;; i440FX PCI bridge 248 #define PCI_FIXED_HOST_BRIDGE_2 0x244e8086 ;; ICH9 PCI bridge 248 249 249 250 // #20 is dec 20 … … 9820 9821 cmp eax, #0x49435024 ;; "$PCI" 9821 9822 jne unknown_service 9823 9824 #ifdef PCI_FIXED_HOST_BRIDGE_1 9822 9825 mov eax, #0x80000000 9823 9826 mov dx, #0x0cf8 … … 9825 9828 mov dx, #0x0cfc 9826 9829 in eax, dx 9827 #ifdef PCI_FIXED_HOST_BRIDGE 9828 cmp eax, #PCI_FIXED_HOST_BRIDGE 9829 jne unknown_service 9830 #else 9831 ;; say ok if a device is present 9832 cmp eax, #0xffffffff 9833 je unknown_service 9830 cmp eax, #PCI_FIXED_HOST_BRIDGE_1 9831 je device_ok 9834 9832 #endif 9833 9834 #ifdef PCI_FIXED_HOST_BRIDGE_2 9835 /* 0x1e << 11 */ 9836 mov eax, #0x8000f000 9837 mov dx, #0x0cf8 9838 out dx, eax 9839 mov dx, #0x0cfc 9840 in eax, dx 9841 cmp eax, #PCI_FIXED_HOST_BRIDGE_2 9842 je device_ok 9843 #endif 9844 jmp unknown_service 9845 device_ok: 9835 9846 mov ebx, #0x000f0000 9836 9847 mov ecx, #0 … … 10011 10022 push eax 10012 10023 push dx 10024 #ifdef PCI_FIXED_HOST_BRIDGE_1 10013 10025 mov eax, #0x80000000 10014 10026 mov dx, #0x0cf8 … … 10016 10028 mov dx, #0x0cfc 10017 10029 in eax, dx 10018 #ifdef PCI_FIXED_HOST_BRIDGE 10019 cmp eax, #PCI_FIXED_HOST_BRIDGE 10020 je pci_present 10021 #else 10022 ;; say ok if a device is present 10023 cmp eax, #0xffffffff 10024 jne pci_present 10030 cmp eax, #PCI_FIXED_HOST_BRIDGE_1 10031 je pci_present 10032 #endif 10033 10034 #ifdef PCI_FIXED_HOST_BRIDGE_2 10035 /* 0x1e << 11 */ 10036 mov eax, #0x8000f000 10037 mov dx, #0x0cf8 10038 out dx, eax 10039 mov dx, #0x0cfc 10040 in eax, dx 10041 cmp eax, #PCI_FIXED_HOST_BRIDGE_2 10042 je pci_present 10025 10043 #endif 10026 10044 pop dx -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r32471 r32477 162 162 SYSTEM_INFO_INDEX_NIC_ADDRESS = 15, /**< NIC PCI address, or 0 */ 163 163 SYSTEM_INFO_INDEX_AUDIO_ADDRESS = 16, /**< Audio card PCI address, or 0 */ 164 SYSTEM_INFO_INDEX_POWER_STATES = 17, 164 SYSTEM_INFO_INDEX_POWER_STATES = 17, 165 165 SYSTEM_INFO_INDEX_IOC_ADDRESS = 18, /**< IO controller PCI address */ 166 SYSTEM_INFO_INDEX_END = 19, 166 SYSTEM_INFO_INDEX_HBC_ADDRESS = 19, /**< host bus controller PCI address */ 167 SYSTEM_INFO_INDEX_END = 20, 167 168 SYSTEM_INFO_INDEX_INVALID = 0x80, 168 169 SYSTEM_INFO_INDEX_VALID = 0x200 … … 271 272 /** PCI address of the IO controller device. */ 272 273 uint32_t u32IocPciAddress; 273 uint32_t pad0; 274 /** PCI address of the host bus controller device. */ 275 uint32_t u32HbcPciAddress; 274 276 275 277 /** ACPI port base interface. */ … … 1572 1574 break; 1573 1575 1576 case SYSTEM_INFO_INDEX_HBC_ADDRESS: 1577 *pu32 = s->u32HbcPciAddress; 1578 break; 1579 1574 1580 /* This is only for compatability with older saved states that 1575 1581 may include ACPI code that read these values. Legacy is … … 2465 2471 "AudioPciAddress\0" 2466 2472 "IocPciAddress\0" 2473 "HostBusPciAddress\0" 2467 2474 "EnableSuspendToDisk\0" 2468 2475 "PowerS1Enabled\0" … … 2533 2540 return PDMDEV_SET_ERROR(pDevIns, rc, 2534 2541 N_("Configuration error: Failed to read \"IocPciAddress\"")); 2542 2543 /* query host bus controller PCI address */ 2544 rc = CFGMR3QueryU32Def(pCfg, "HostBusPciAddress", &s->u32HbcPciAddress, 0); 2545 if (RT_FAILURE(rc)) 2546 return PDMDEV_SET_ERROR(pDevIns, rc, 2547 N_("Configuration error: Failed to read \"HostBusPciAddress\"")); 2535 2548 2536 2549 /* query whether S1 power state should be exposed */ -
trunk/src/VBox/Devices/PC/vbox.dsl
r32471 r32477 146 146 HDAA, 32, // HDA PCI address 147 147 PWRS, 32, // power states 148 IOCA, 32, // Southbridge IO controller PCI address 148 IOCA, 32, // southbridge IO controller PCI address 149 HBCA, 32, // host bus controller address 149 150 Offset (0x80), 150 151 ININ, 32, … … 511 512 512 513 Name (_HID, EisaId ("PNP0A03")) // PCI bus PNP id 513 Name (_ADR, 0x00) // address 514 Name (_BBN, 0x00) // base bus adddress 514 Method(_ADR, 0, NotSerialized) // PCI address 515 { 516 Return (HBCA) 517 } 518 Name (_BBN, 0x00) // base bus adddress (bus number) 515 519 Name (_UID, 0x00) 516 520 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r32471 r32477 822 822 ChipsetType_T chipsetType; 823 823 hrc = pMachine->COMGETTER(ChipsetType)(&chipsetType); H(); 824 uint32_t u32IocPciAddress ;824 uint32_t u32IocPciAddress, u32HbcPciAddress; 825 825 826 826 switch (chipsetType) … … 830 830 case ChipsetType_PIIX3: 831 831 InsertConfigNode(pDevices, "pci", &pDev); 832 u32HbcPciAddress = 0; 832 833 u32IocPciAddress = (0x1 << 16) | 0; // ISA controller 833 834 break; 834 835 case ChipsetType_ICH9: 835 836 InsertConfigNode(pDevices, "ich9pci", &pDev); 837 u32HbcPciAddress = (0x1d << 16) | 0; 836 838 u32IocPciAddress = (0x1f << 16) | 0; // LPC controller 837 839 break; … … 877 879 /* so always enable HPET in extended profile */ 878 880 fHpetEnabled |= fOsXGuest; 881 /* HPET is always present on ICH9 */ 882 fHpetEnabled |= (chipsetType == ChipsetType_ICH9); 879 883 if (fHpetEnabled) 880 884 { … … 2279 2283 } 2280 2284 InsertConfigInteger(pCfg, "IocPciAddress", u32IocPciAddress); 2285 InsertConfigInteger(pCfg, "HostBusPciAddress", u32HbcPciAddress); 2281 2286 InsertConfigInteger(pCfg, "ShowCpu", fShowCpu); 2282 2287 InsertConfigInteger(pCfg, "CpuHotPlug", fCpuHotPlug);
Note:
See TracChangeset
for help on using the changeset viewer.