Changeset 35746 in vbox
- Timestamp:
- Jan 27, 2011 7:32:39 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r35672 r35746 167 167 SYSTEM_INFO_INDEX_PCI_BASE = 20, /**< PCI bus MCFG MMIO range base */ 168 168 SYSTEM_INFO_INDEX_PCI_LENGTH = 21, /**< PCI bus MCFG MMIO range length */ 169 SYSTEM_INFO_INDEX_END = 22, 169 SYSTEM_INFO_INDEX_SERIAL0_IOBASE = 22, 170 SYSTEM_INFO_INDEX_SERIAL0_IRQ = 23, 171 SYSTEM_INFO_INDEX_SERIAL1_IOBASE = 24, 172 SYSTEM_INFO_INDEX_SERIAL1_IRQ = 25, 173 SYSTEM_INFO_INDEX_END = 28, 170 174 SYSTEM_INFO_INDEX_INVALID = 0x80, 171 175 SYSTEM_INFO_INDEX_VALID = 0x200 … … 282 286 /* Length of PCI config space MMIO region */ 283 287 uint64_t u64PciConfigMMioLength; 284 288 /** Serial 0 IRQ number */ 289 uint8_t uSerial0Irq; 290 /** Serial 1 IRQ number */ 291 uint8_t uSerial1Irq; 292 /** Serial 0 IO port base */ 293 RTIOPORT uSerial0IoPortBase; 294 /** Serial 1 IO port base */ 295 RTIOPORT uSerial1IoPortBase; 285 296 /** ACPI port base interface. */ 286 297 PDMIBASE IBase; … … 1724 1735 break; 1725 1736 1737 case SYSTEM_INFO_INDEX_SERIAL0_IOBASE: 1738 *pu32 = s->uSerial0IoPortBase; 1739 break; 1740 1741 case SYSTEM_INFO_INDEX_SERIAL0_IRQ: 1742 *pu32 = s->uSerial0Irq; 1743 break; 1744 1745 case SYSTEM_INFO_INDEX_SERIAL1_IOBASE: 1746 *pu32 = s->uSerial1IoPortBase; 1747 break; 1748 1749 case SYSTEM_INFO_INDEX_SERIAL1_IRQ: 1750 *pu32 = s->uSerial1Irq; 1751 break; 1752 1753 case SYSTEM_INFO_INDEX_END: 1754 break; 1755 1726 1756 /* Solaris 9 tries to read from this index */ 1727 1757 case SYSTEM_INFO_INDEX_INVALID: … … 2606 2636 "CpuHotPlug\0" 2607 2637 "AmlFilePath\0" 2638 "Serial0IoPortBase\0" 2639 "Serial1IoPortBase\0" 2640 "Serial0Irq\0" 2641 "Serial1Irq\0" 2608 2642 )) 2609 2643 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, … … 2724 2758 return PDMDEV_SET_ERROR(pDevIns, rc, 2725 2759 N_("configuration error: failed to read R0Enabled as boolean")); 2760 2761 /* query serial info */ 2762 rc = CFGMR3QueryU8Def(pCfg, "Serial0Irq", &s->uSerial0Irq, 4); 2763 if (RT_FAILURE(rc)) 2764 return PDMDEV_SET_ERROR(pDevIns, rc, 2765 N_("Configuration error: Failed to read \"Serial0Irq\"")); 2766 2767 rc = CFGMR3QueryU16Def(pCfg, "Serial0IoPortBase", &s->uSerial0IoPortBase, 0x3f8); 2768 if (RT_FAILURE(rc)) 2769 return PDMDEV_SET_ERROR(pDevIns, rc, 2770 N_("Configuration error: Failed to read \"Serial0IoPortBase\"")); 2771 2772 /* Serial 1 is enabled, get config data */ 2773 rc = CFGMR3QueryU8Def(pCfg, "Serial1Irq", &s->uSerial1Irq, 3); 2774 if (RT_FAILURE(rc)) 2775 return PDMDEV_SET_ERROR(pDevIns, rc, 2776 N_("Configuration error: Failed to read \"Serial1Irq\"")); 2777 2778 rc = CFGMR3QueryU16Def(pCfg, "Serial1IoPortBase", &s->uSerial1IoPortBase, 0x2f8); 2779 if (RT_FAILURE(rc)) 2780 return PDMDEV_SET_ERROR(pDevIns, rc, 2781 N_("Configuration error: Failed to read \"Serial1IoPortBase\"")); 2726 2782 2727 2783 /* -
trunk/src/VBox/Devices/PC/vbox.dsl
r33540 r35746 150 150 PCIB, 32, // PCI MCFG base start 151 151 PCIL, 32, // PCI MCFG length 152 SL0B, 32, // Serial0 base IO address 153 SL0I, 32, // Serial0 IRQ 154 SL1B, 32, // Serial1 base IO address 155 SL1I, 32, // Serial1 IRQ 152 156 Offset (0x80), 153 157 ININ, 32, … … 677 681 IRQNoFlags () {7} 678 682 }) 683 } 684 685 // Serial port 0 686 Device (^SRL0) 687 { 688 Name (_HID, EisaId ("PNP0501")) 689 Name (_UID, 0x01) 690 Method (_STA, 0, NotSerialized) 691 { 692 If (LEqual (SL0B, Zero)) 693 { 694 Return (0x00) 695 } 696 Else 697 { 698 Return (0x0F) 699 } 700 } 701 Name (CRS, ResourceTemplate () 702 { 703 IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08, _Y14) 704 IRQNoFlags (_Y15) {4} 705 }) 706 Method (_CRS, 0, NotSerialized) 707 { 708 CreateWordField (CRS, \_SB.PCI0.SRL0._Y14._MIN, MIN0) 709 CreateWordField (CRS, \_SB.PCI0.SRL0._Y14._MAX, MAX0) 710 CreateWordField (CRS, \_SB.PCI0.SRL0._Y15._INT, IRQ0) 711 Store (SL0B, MIN0) 712 Store (SL0B, MAX0) 713 ShiftLeft (0x01, SL0I, IRQ0) 714 Return (CRS) 715 } 716 } 717 718 // Serial port 1 719 Device (^SRL1) 720 { 721 Name (_HID, EisaId ("PNP0501")) 722 Name (_UID, 0x02) 723 Method (_STA, 0, NotSerialized) 724 { 725 If (LEqual (SL1B, Zero)) 726 { 727 Return (0x00) 728 } 729 Else 730 { 731 Return (0x0F) 732 } 733 } 734 Name (CRS, ResourceTemplate () 735 { 736 IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08, _Y16) 737 IRQNoFlags (_Y17) {3} 738 }) 739 Method (_CRS, 0, NotSerialized) 740 { 741 CreateWordField (CRS, \_SB.PCI0.SRL1._Y16._MIN, MIN1) 742 CreateWordField (CRS, \_SB.PCI0.SRL1._Y16._MAX, MAX1) 743 CreateWordField (CRS, \_SB.PCI0.SRL1._Y17._INT, IRQ1) 744 Store (SL1B, MIN1) 745 Store (SL1B, MAX1) 746 ShiftLeft (0x01, SL1I, IRQ1) 747 Return (CRS) 748 } 679 749 } 680 750 -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r35731 r35746 1824 1824 * Serial (UART) Ports 1825 1825 */ 1826 /* serial enabled mask to be passed to dev ACPI */ 1827 uint16_t auSerialIoPortBase[SchemaDefs::SerialPortCount] = {0}; 1828 uint8_t auSerialIrq[SchemaDefs::SerialPortCount] = {0}; 1826 1829 InsertConfigNode(pDevices, "serial", &pDev); 1827 1830 for (ULONG ulInstance = 0; ulInstance < SchemaDefs::SerialPortCount; ++ulInstance) … … 1841 1844 hrc = serialPort->COMGETTER(IRQ)(&ulIRQ); H(); 1842 1845 InsertConfigInteger(pCfg, "IRQ", ulIRQ); 1846 auSerialIrq[ulInstance] = (uint8_t)ulIRQ; 1847 1843 1848 ULONG ulIOBase; 1844 1849 hrc = serialPort->COMGETTER(IOBase)(&ulIOBase); H(); 1845 1850 InsertConfigInteger(pCfg, "IOBase", ulIOBase); 1851 auSerialIoPortBase[ulInstance] = (uint16_t)ulIOBase; 1852 1846 1853 BOOL fServer; 1847 1854 hrc = serialPort->COMGETTER(Server)(&fServer); H(); … … 2455 2462 InsertConfigInteger(pCfg, "ShowCpu", fShowCpu); 2456 2463 InsertConfigInteger(pCfg, "CpuHotPlug", fCpuHotPlug); 2464 2465 InsertConfigInteger(pCfg, "Serial0IoPortBase", auSerialIoPortBase[0]); 2466 InsertConfigInteger(pCfg, "Serial0Irq", auSerialIrq[0]); 2467 2468 InsertConfigInteger(pCfg, "Serial1IoPortBase", auSerialIoPortBase[1]); 2469 InsertConfigInteger(pCfg, "Serial1Irq", auSerialIrq[1]); 2457 2470 2458 2471 InsertConfigNode(pInst, "LUN#0", &pLunL0);
Note:
See TracChangeset
for help on using the changeset viewer.