- Timestamp:
- Oct 18, 2010 2:29:54 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r32863 r33200 43 43 //#define E1K_REL_STATS 44 44 //#define E1K_USE_SUPLIB_SEMEVENT 45 //#define E1K_WITH_MSI46 45 47 46 #include <iprt/crc.h> … … 135 134 #define E1K_CHIP_82543GC 1 136 135 #define E1K_CHIP_82545EM 2 136 #define E1K_CHIP_82566MC 3 137 #define E1K_CHIP_LAST E1K_CHIP_82566MC 138 139 /* Flags for chip descripton */ 140 #define E1K_MSI_CHIP (1 << 0) 137 141 138 142 struct E1kChips … … 143 147 uint16_t uPCISubsystemId; 144 148 const char *pcszName; 149 uint32_t uFlags; 145 150 } g_Chips[] = 146 151 { 147 152 /* Vendor Device SSVendor SubSys Name */ 148 { 0x8086, 149 /* Temporary code, as MSI-aware driver dislike 0x100E. How to do that right? */ 150 #ifdef E1K_WITH_MSI 151 0x105E, 152 #else 153 0x100E, 154 #endif 155 0x8086, 0x001E, "82540EM" }, /* Intel 82540EM-A in Intel PRO/1000 MT Desktop */ 156 { 0x8086, 0x1004, 0x8086, 0x1004, "82543GC" }, /* Intel 82543GC in Intel PRO/1000 T Server */ 157 { 0x8086, 0x100F, 0x15AD, 0x0750, "82545EM" } /* Intel 82545EM-A in VMWare Network Adapter */ 153 { 0x8086, 0x100E, 0x8086, 0x001E, "82540EM", 0 }, /* Intel 82540EM-A in Intel PRO/1000 MT Desktop */ 154 { 0x8086, 0x1004, 0x8086, 0x1004, "82543GC", 0 }, /* Intel 82543GC in Intel PRO/1000 T Server */ 155 { 0x8086, 0x100F, 0x15AD, 0x0750, "82545EM", 0 }, /* Intel 82545EM-A in VMWare Network Adapter */ 156 { 0x8086, 0x104D, 0x8086, 0x001E, "82566MC", E1K_MSI_CHIP } /* Intel 82566MC Gigabit Ethernet Controller */ 158 157 }; 159 158 … … 5597 5596 /* Capability ID: PCI-X Configuration Registers */ 5598 5597 e1kPCICfgSetU8( pci, 0xE4, VBOX_PCI_CAP_ID_PCIX); 5599 #ifdef E1K_WITH_MSI 5600 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x80); 5601 #else 5602 /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */5603 e 1kPCICfgSetU8( pci, 0xE4 + 1, 0x00);5598 /* Next Item Pointer: Message Signalled Interrupts */ 5599 #ifdef VBOX_WITH_MSI_DEVICES 5600 if (g_Chips[eChip].uFlags & E1K_MSI_CHIP) 5601 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x80); 5602 else 5604 5603 #endif 5604 /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */ 5605 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x00); 5605 5606 /* PCI-X Command: Enable Relaxed Ordering */ 5606 5607 e1kPCICfgSetU16(pci, 0xE4 + 2, VBOX_PCI_X_CMD_ERO); … … 5647 5648 return PDMDEV_SET_ERROR(pDevIns, rc, 5648 5649 N_("Configuration error: Failed to get the value of 'AdapterType'")); 5649 Assert(pState->eChip <= E1K_CHIP_ 82545EM);5650 Assert(pState->eChip <= E1K_CHIP_LAST); 5650 5651 5651 5652 E1kLog(("%s Chip=%s\n", INSTANCE(pState), g_Chips[pState->eChip].pcszName)); … … 5743 5744 return rc; 5744 5745 5745 #ifdef E1K_WITH_MSI 5746 PDMMSIREG aMsiReg; 5747 aMsiReg.cVectors = 1; 5748 aMsiReg.iCapOffset = 0x80; 5749 aMsiReg.iNextOffset = 0x0; 5750 aMsiReg.iMsiFlags = 0; 5751 rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg); 5752 AssertRC(rc); 5753 if (RT_FAILURE (rc)) 5754 return rc; 5746 #ifdef VBOX_WITH_MSI_DEVICES 5747 if (g_Chips[pState->eChip].uFlags & E1K_MSI_CHIP) 5748 { 5749 PDMMSIREG aMsiReg; 5750 aMsiReg.cVectors = 1; 5751 aMsiReg.iCapOffset = 0x80; 5752 aMsiReg.iNextOffset = 0x0; 5753 aMsiReg.iMsiFlags = 0; 5754 rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg); 5755 AssertRC(rc); 5756 if (RT_FAILURE (rc)) 5757 { 5758 PCIDevSetByte( &pState->pciDevice, 0xE4 + 1, 0x0); 5759 // continue 5760 } 5761 } 5755 5762 #endif 5756 5757 5763 5758 5764 /* Map our registers to memory space (region 0, see e1kConfigurePCI)*/ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r33020 r33200 213 213 " [--nictype<1-N> Am79C970A|Am79C973" 214 214 #ifdef VBOX_WITH_E1000 215 "|\n 82540EM|82543GC|82545EM "215 "|\n 82540EM|82543GC|82545EM|82566MC" 216 216 #endif 217 217 #ifdef VBOX_WITH_VIRTIO … … 807 807 va_list args; 808 808 va_start(args, pszFormat); 809 RTMsgError (pszFormat, args);809 RTMsgErrorV(pszFormat, args); 810 810 va_end(args); 811 811 return 1; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r33140 r33200 1060 1060 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM)); 1061 1061 } 1062 else if (!strcmp(ValueUnion.psz, "82566MC")) 1063 { 1064 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82566MC)); 1065 } 1062 1066 #endif 1063 1067 #ifdef VBOX_WITH_VIRTIO -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r33133 r33200 1537 1537 case NetworkAdapterType_I82543GC: 1538 1538 case NetworkAdapterType_I82545EM: 1539 case NetworkAdapterType_I82566MC: 1539 1540 pDev = pDevE1000; 1540 1541 pszAdapterName = "e1000"; … … 1623 1624 case NetworkAdapterType_I82545EM: 1624 1625 InsertConfigInteger(pCfg, "AdapterType", 2); 1626 break; 1627 case NetworkAdapterType_I82566MC: 1628 InsertConfigInteger(pCfg, "AdapterType", 3); 1625 1629 break; 1626 1630 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r33140 r33200 11232 11232 <enum 11233 11233 name="NetworkAdapterType" 11234 uuid=" 3c2281e4-d952-4e87-8c7d-24379cb6a81c"11234 uuid="bea69445-df7d-449f-b224-3b6526d8ac81" 11235 11235 > 11236 11236 <desc> … … 11258 11258 <const name="Virtio" value="6"> 11259 11259 <desc>Virtio network device.</desc> 11260 </const> 11261 <const name="I82566MC" value="7"> 11262 <desc>Intel 82566MC Gigabit Ethernet Controller (82566MC).</desc> 11260 11263 </const> 11261 11264 </enum> -
trunk/src/VBox/Main/xml/Settings.cpp
r33073 r33200 1880 1880 else if (strTemp == "82545EM") 1881 1881 nic.type = NetworkAdapterType_I82545EM; 1882 else if (strTemp == "82566MC") 1883 nic.type = NetworkAdapterType_I82566MC; 1882 1884 else if (strTemp == "virtio") 1883 1885 nic.type = NetworkAdapterType_Virtio; … … 3502 3504 case NetworkAdapterType_I82543GC: pcszType = "82543GC"; break; 3503 3505 case NetworkAdapterType_I82545EM: pcszType = "82545EM"; break; 3506 case NetworkAdapterType_I82566MC: pcszType = "82566MC"; break; 3504 3507 case NetworkAdapterType_Virtio: pcszType = "virtio"; break; 3505 3508 default: /*case NetworkAdapterType_Am79C970A:*/ pcszType = "Am79C970A"; break;
Note:
See TracChangeset
for help on using the changeset viewer.