Changeset 18591 in vbox for trunk/src/VBox
- Timestamp:
- Apr 1, 2009 10:11:51 AM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r18439 r18591 129 129 /*****************************************************************************/ 130 130 131 typedef uint32_t E1KCHIP;132 #define E1K_CHIP_82540EM 0133 #define E1K_CHIP_82543GC 1134 135 131 /* Intel */ 136 132 #define E1K_VENDOR_ID 0x8086 137 133 /* 82540EM-A (Desktop) */ 138 134 #define E1K_DEVICE_ID_82540EM 0x100E 135 /* 82545EM-A (Server) */ 136 #define E1K_DEVICE_ID_82545EM 0x100F 139 137 /* 82543GC (Server) */ 140 138 #define E1K_DEVICE_ID_82543GC 0x1004 … … 143 141 /* PRO/1000 MT Desktop Ethernet */ 144 142 #define E1K_SUBSYSTEM_ID_82540EM 0x001E 143 /* PRO/1000 MT Server Ethernet */ 144 #define E1K_SUBSYSTEM_ID_82545EM 0x1001 145 145 /* PRO/1000 T Server Ethernet */ 146 146 #define E1K_SUBSYSTEM_ID_82543GC 0x1004 147 148 typedef uint32_t E1KCHIP; 149 #define E1K_CHIP_82540EM 0 150 #define E1K_CHIP_82543GC 1 151 #define E1K_CHIP_82545EM 2 152 153 struct E1kChips 154 { 155 uint16_t uPCIDeviceId; 156 uint16_t uPCISubsystemId; 157 const char *pcszName; 158 } g_Chips[] = 159 { 160 { E1K_DEVICE_ID_82540EM, E1K_SUBSYSTEM_ID_82540EM, "82540EM" }, 161 { E1K_DEVICE_ID_82543GC, E1K_SUBSYSTEM_ID_82543GC, "82543GC" }, 162 { E1K_DEVICE_ID_82545EM, E1K_SUBSYSTEM_ID_82545EM, "82545EM" } 163 }; 164 147 165 148 166 /* The size of register area mapped to I/O space */ … … 4558 4576 static DECLCALLBACK(void) e1kConfigurePCI(PCIDEVICE& pci, E1KCHIP eChip) 4559 4577 { 4578 Assert(eChip < RT_ELEMENTS(g_Chips)); 4560 4579 /* Configure PCI Device, assume 32-bit mode ******************************/ 4561 4580 PCIDevSetVendorId(&pci, E1K_VENDOR_ID); 4562 PCIDevSetDeviceId(&pci, eChip == E1K_CHIP_82540EM ? 4563 E1K_DEVICE_ID_82540EM: 4564 E1K_DEVICE_ID_82543GC); 4581 PCIDevSetDeviceId(&pci, g_Chips[eChip].uPCIDeviceId); 4565 4582 e1kPCICfgSetU16(pci, VBOX_PCI_SUBSYSTEM_VENDOR_ID, E1K_SUBSYSTEM_VENDOR_ID); 4566 e1kPCICfgSetU16(pci, VBOX_PCI_SUBSYSTEM_ID, eChip == E1K_CHIP_82540EM ? 4567 E1K_SUBSYSTEM_ID_82540EM: 4568 E1K_SUBSYSTEM_ID_82543GC); 4583 e1kPCICfgSetU16(pci, VBOX_PCI_SUBSYSTEM_ID, g_Chips[eChip].uPCISubsystemId); 4569 4584 4570 4585 e1kPCICfgSetU16(pci, VBOX_PCI_COMMAND, 0x0000); … … 4667 4682 return PDMDEV_SET_ERROR(pDevIns, rc, 4668 4683 N_("Configuration error: Failed to get the value of 'AdapterType'")); 4669 Assert(pState->eChip == E1K_CHIP_82540EM || 4670 pState->eChip == E1K_CHIP_82543GC); 4671 4672 E1kLog(("%s Chip=%s\n", INSTANCE(pState), pState->eChip == E1K_CHIP_82540EM ? "82540EM" : "82543GC")); 4684 Assert(pState->eChip <= E1K_CHIP_82545EM); 4685 4686 E1kLog(("%s Chip=%s\n", INSTANCE(pState), g_Chips[pState->eChip].pcszName)); 4673 4687 4674 4688 /* Initialize state structure */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r18566 r18591 162 162 " [-nictype<1-N> Am79C970A|Am79C973" 163 163 #ifdef VBOX_WITH_E1000 164 "|82540EM|82543GC "164 "|82540EM|82543GC|82545EM" 165 165 #endif 166 166 "]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r18113 r18591 763 763 strNICType = "82543GC"; 764 764 break; 765 case NetworkAdapterType_I82545EM: 766 strNICType = "82545EM"; 767 break; 765 768 #endif 766 769 default: -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r18177 r18591 1493 1493 CHECK_ERROR_RET(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC), 1); 1494 1494 } 1495 else if (strcmp(nictype[n], "82545EM") == 0) 1496 { 1497 CHECK_ERROR_RET(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM), 1); 1498 } 1495 1499 #endif 1496 1500 else -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxApplianceEditorWgt.cpp
r18384 r18591 408 408 e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82540EM), KNetworkAdapterType_I82540EM); 409 409 e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82543GC), KNetworkAdapterType_I82543GC); 410 e->addItem (vboxGlobal().toString (KNetworkAdapterType_I82545EM), KNetworkAdapterType_I82545EM); 410 411 #endif /* VBOX_WITH_E1000 */ 411 412 editor = e; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r18495 r18591 2913 2913 mNetworkAdapterTypes [KNetworkAdapterType_I82543GC] = 2914 2914 tr ("Intel PRO/1000 T Server (82543GC)", "NetworkAdapterType"); 2915 mNetworkAdapterTypes [KNetworkAdapterType_I82545EM] = 2916 tr ("Intel PRO/1000 MT Server (82545EM)", "NetworkAdapterType"); 2915 2917 2916 2918 mNetworkAttachmentTypes [KNetworkAttachmentType_Null] = -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r18358 r18591 262 262 case KNetworkAdapterType_I82540EM: 263 263 case KNetworkAdapterType_I82543GC: 264 case KNetworkAdapterType_I82545EM: 264 265 name = "E1k"; 265 266 break; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp
r18404 r18591 293 293 mCbAdapterType->setItemData (3, 294 294 mCbAdapterType->itemText (3), Qt::ToolTipRole); 295 mCbAdapterType->insertItem (4, 296 vboxGlobal().toString (KNetworkAdapterType_I82545EM)); 297 mCbAdapterType->setItemData (4, 298 KNetworkAdapterType_I82545EM); 299 mCbAdapterType->setItemData (4, 300 mCbAdapterType->itemText (4), Qt::ToolTipRole); 295 301 #endif /* VBOX_WITH_E1000 */ 296 302 -
trunk/src/VBox/Main/ApplianceImpl.cpp
r18590 r18591 1529 1529 else if (!ea.strAdapterType.compare("E1000", Utf8Str::CaseInsensitive)) 1530 1530 { 1531 /* If the default adapter is already one of the t wo1531 /* If the default adapter is already one of the three 1532 1532 * E1000 adapters use the default one. If not use the 1533 1533 * I82540EM as fallback. */ 1534 1534 if (!(defaultAdapterVBox == NetworkAdapterType_I82540EM || 1535 defaultAdapterVBox == NetworkAdapterType_I82543GC)) 1535 defaultAdapterVBox == NetworkAdapterType_I82543GC || 1536 defaultAdapterVBox == NetworkAdapterType_I82545EM)) 1536 1537 nwAdapterVBox = NetworkAdapterType_I82540EM; 1537 1538 } … … 3001 3002 #ifdef VBOX_WITH_E1000 3002 3003 case NetworkAdapterType_I82540EM: 3004 case NetworkAdapterType_I82545EM: 3003 3005 case NetworkAdapterType_I82543GC: strResourceSubType = "E1000"; break; 3004 3006 #endif /* VBOX_WITH_E1000 */ -
trunk/src/VBox/Main/ConsoleImpl.cpp
r18493 r18591 3196 3196 AssertComRC(rc); 3197 3197 if (adapterType == NetworkAdapterType_I82540EM || 3198 adapterType == NetworkAdapterType_I82543GC) 3198 adapterType == NetworkAdapterType_I82543GC || 3199 adapterType == NetworkAdapterType_I82545EM) 3199 3200 cszAdapterName = "e1000"; 3200 3201 #endif -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r18405 r18591 1203 1203 case NetworkAdapterType_I82540EM: 1204 1204 case NetworkAdapterType_I82543GC: 1205 case NetworkAdapterType_I82545EM: 1205 1206 pDev = pDevE1000; 1206 1207 break; … … 1256 1257 case NetworkAdapterType_I82543GC: 1257 1258 rc = CFGMR3InsertInteger(pCfg, "AdapterType", 1); RC_CHECK(); 1259 break; 1260 case NetworkAdapterType_I82545EM: 1261 rc = CFGMR3InsertInteger(pCfg, "AdapterType", 2); RC_CHECK(); 1258 1262 break; 1259 1263 } -
trunk/src/VBox/Main/NetworkAdapterImpl.cpp
r17843 r18591 209 209 case NetworkAdapterType_I82540EM: 210 210 case NetworkAdapterType_I82543GC: 211 case NetworkAdapterType_I82545EM: 211 212 #endif 212 213 break; … … 883 884 else if (strcmp (adapterType, "82543GC") == 0) 884 885 mData->mAdapterType = NetworkAdapterType_I82543GC; 886 else if (strcmp (adapterType, "82545EM") == 0) 887 mData->mAdapterType = NetworkAdapterType_I82545EM; 885 888 else 886 889 ComAssertMsgFailedRet (("Invalid adapter type '%s'", adapterType), … … 1013 1016 typeStr = "82543GC"; 1014 1017 break; 1018 case NetworkAdapterType_I82545EM: 1019 typeStr = "82545EM"; 1020 break; 1015 1021 default: 1016 1022 ComAssertMsgFailedRet (("Invalid network adapter type: %d", … … 1163 1169 /* Set default network adapter for this OS type */ 1164 1170 if (defaultType == NetworkAdapterType_I82540EM || 1165 defaultType == NetworkAdapterType_I82543GC) 1171 defaultType == NetworkAdapterType_I82543GC || 1172 defaultType == NetworkAdapterType_I82545EM) 1166 1173 { 1167 1174 if (e1000enabled) mData->mAdapterType = defaultType; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r18566 r18591 10912 10912 <const name="I82540EM" value="3"/> 10913 10913 <const name="I82543GC" value="4"/> 10914 <const name="I82545EM" value="5"/> 10914 10915 </enum> 10915 10916 -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r18265 r18591 215 215 <xsd:enumeration value="82540EM"/> 216 216 <xsd:enumeration value="82543GC"/> 217 <xsd:enumeration value="82545EM"/> 217 218 </xsd:restriction> 218 219 </xsd:simpleType>
Note:
See TracChangeset
for help on using the changeset viewer.