Changeset 33201 in vbox
- Timestamp:
- Oct 18, 2010 2:37:33 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66740
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r33200 r33201 43 43 //#define E1K_REL_STATS 44 44 //#define E1K_USE_SUPLIB_SEMEVENT 45 //#define E1K_WITH_MSI 45 46 46 47 #include <iprt/crc.h> … … 134 135 #define E1K_CHIP_82543GC 1 135 136 #define E1K_CHIP_82545EM 2 136 #define E1K_CHIP_82566MC 3137 #define E1K_CHIP_LAST E1K_CHIP_82566MC138 139 /* Flags for chip descripton */140 #define E1K_MSI_CHIP (1 << 0)141 137 142 138 struct E1kChips … … 147 143 uint16_t uPCISubsystemId; 148 144 const char *pcszName; 149 uint32_t uFlags;150 145 } g_Chips[] = 151 146 { 152 147 /* Vendor Device SSVendor SubSys Name */ 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 */ 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 */ 157 158 }; 158 159 … … 5596 5597 /* Capability ID: PCI-X Configuration Registers */ 5597 5598 e1kPCICfgSetU8( pci, 0xE4, VBOX_PCI_CAP_ID_PCIX); 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 e lse5599 #ifdef E1K_WITH_MSI 5600 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x80); 5601 #else 5602 /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */ 5603 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x00); 5603 5604 #endif 5604 /* Next Item Pointer: None (Message Signalled Interrupts are disabled) */5605 e1kPCICfgSetU8( pci, 0xE4 + 1, 0x00);5606 5605 /* PCI-X Command: Enable Relaxed Ordering */ 5607 5606 e1kPCICfgSetU16(pci, 0xE4 + 2, VBOX_PCI_X_CMD_ERO); … … 5648 5647 return PDMDEV_SET_ERROR(pDevIns, rc, 5649 5648 N_("Configuration error: Failed to get the value of 'AdapterType'")); 5650 Assert(pState->eChip <= E1K_CHIP_ LAST);5649 Assert(pState->eChip <= E1K_CHIP_82545EM); 5651 5650 5652 5651 E1kLog(("%s Chip=%s\n", INSTANCE(pState), g_Chips[pState->eChip].pcszName)); … … 5744 5743 return rc; 5745 5744 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 } 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; 5762 5755 #endif 5756 5763 5757 5764 5758 /* Map our registers to memory space (region 0, see e1kConfigurePCI)*/ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r33200 r33201 213 213 " [--nictype<1-N> Am79C970A|Am79C973" 214 214 #ifdef VBOX_WITH_E1000 215 "|\n 82540EM|82543GC|82545EM |82566MC"215 "|\n 82540EM|82543GC|82545EM" 216 216 #endif 217 217 #ifdef VBOX_WITH_VIRTIO … … 807 807 va_list args; 808 808 va_start(args, pszFormat); 809 RTMsgError V(pszFormat, args);809 RTMsgError(pszFormat, args); 810 810 va_end(args); 811 811 return 1; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r33200 r33201 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 }1066 1062 #endif 1067 1063 #ifdef VBOX_WITH_VIRTIO -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r33200 r33201 1537 1537 case NetworkAdapterType_I82543GC: 1538 1538 case NetworkAdapterType_I82545EM: 1539 case NetworkAdapterType_I82566MC:1540 1539 pDev = pDevE1000; 1541 1540 pszAdapterName = "e1000"; … … 1624 1623 case NetworkAdapterType_I82545EM: 1625 1624 InsertConfigInteger(pCfg, "AdapterType", 2); 1626 break;1627 case NetworkAdapterType_I82566MC:1628 InsertConfigInteger(pCfg, "AdapterType", 3);1629 1625 break; 1630 1626 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r33200 r33201 11232 11232 <enum 11233 11233 name="NetworkAdapterType" 11234 uuid=" bea69445-df7d-449f-b224-3b6526d8ac81"11234 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c" 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>11263 11260 </const> 11264 11261 </enum> -
trunk/src/VBox/Main/xml/Settings.cpp
r33200 r33201 1880 1880 else if (strTemp == "82545EM") 1881 1881 nic.type = NetworkAdapterType_I82545EM; 1882 else if (strTemp == "82566MC")1883 nic.type = NetworkAdapterType_I82566MC;1884 1882 else if (strTemp == "virtio") 1885 1883 nic.type = NetworkAdapterType_Virtio; … … 3504 3502 case NetworkAdapterType_I82543GC: pcszType = "82543GC"; break; 3505 3503 case NetworkAdapterType_I82545EM: pcszType = "82545EM"; break; 3506 case NetworkAdapterType_I82566MC: pcszType = "82566MC"; break;3507 3504 case NetworkAdapterType_Virtio: pcszType = "virtio"; break; 3508 3505 default: /*case NetworkAdapterType_Am79C970A:*/ pcszType = "Am79C970A"; break;
Note:
See TracChangeset
for help on using the changeset viewer.