Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103777
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/ComponentName.c
r58459 r58466 325 325 return EFI_UNSUPPORTED; 326 326 } 327 327 328 328 NicHandle = PxeBcGetNicByIp4Children (ControllerHandle); 329 329 if (NicHandle == NULL) { -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
r58459 r58466 102 102 // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options, 103 103 // we must not consider a boot prompt or boot menu if all of the following hold: 104 // - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set 104 // - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set 105 105 // - a boot file name has been presented in the initial DHCP or ProxyDHCP offer packet. 106 106 // … … 109 109 return EFI_ABORTED; 110 110 } 111 111 112 112 if (!IS_VALID_BOOT_PROMPT (VendorOpt->BitMap)) { 113 113 return EFI_TIMEOUT; … … 471 471 PXEBC_VENDOR_OPTION *VendorOpt; 472 472 PXEBC_BOOT_SVR_ENTRY *Entry; 473 473 474 474 PxeBc = &Private->PxeBc; 475 475 Mode = PxeBc->Mode; … … 779 779 *DiscoverInfo = AllocatePool (sizeof (*Info) + (Info->IpCnt - 1) * sizeof (**SrvList)); 780 780 if (*DiscoverInfo == NULL) { 781 return EFI_OUT_OF_RESOURCES; 782 } 781 return EFI_OUT_OF_RESOURCES; 782 } 783 783 CopyMem (*DiscoverInfo, Info, sizeof (*Info)); 784 784 Info = *DiscoverInfo; … … 941 941 &Mode->PxeReply.Dhcpv4, 942 942 Private->PxeReply.Dhcp4.Packet.Ack.Length 943 ); 943 ); 944 944 } 945 945 Mode->ProxyOfferReceived = TRUE; -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
r58459 r58466 483 483 } 484 484 // 485 // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. 485 // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. 486 486 // If yes, try to parse options from the BootFileName field, then ServerName field. 487 487 // -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
r58459 r58466 149 149 #define IS_VALID_BOOT_SERVERS(x) \ 150 150 ((((x)[0]) & BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS)) \ 151 == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS)) 151 == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS)) 152 152 153 153 #define IS_VALID_BOOT_PROMPT(x) \ -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
r58459 r58466 720 720 return EFI_NOT_FOUND; 721 721 } 722 722 723 723 // 724 724 // Add Server ID Option. … … 748 748 749 749 // 750 // Update Elapsed option in the package 750 // Update Elapsed option in the package 751 751 // 752 752 Option = PxeBcDhcp6SeekOption ( … … 758 758 CalcElapsedTime (Private); 759 759 WriteUnaligned16 ((UINT16*)(Option + 4), HTONS((UINT16) Private->ElapsedTime)); 760 } 760 } 761 761 762 762 Status = PxeBc->UdpWrite ( … … 792 792 return Status; 793 793 } 794 794 795 795 Status = PxeBc->UdpRead ( 796 796 PxeBc, … … 1667 1667 return Status; 1668 1668 } 1669 1669 1670 1670 Status = PxeBc->UdpRead ( 1671 1671 PxeBc, … … 1817 1817 1818 1818 do { 1819 1819 1820 1820 TimerStatus = gBS->CheckEvent (Timer); 1821 1821 if (!EFI_ERROR (TimerStatus)) { … … 1823 1823 } 1824 1824 } while (TimerStatus == EFI_NOT_READY); 1825 1825 1826 1826 gBS->CloseEvent (Timer); 1827 1827 } -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
r58459 r58466 255 255 ); 256 256 257 if (Private->Snp != NULL) { 257 if (Private->Snp != NULL) { 258 258 // 259 259 // Close SNP from the child virtual handle … … 265 265 Private->Ip4Nic->Controller 266 266 ); 267 267 268 268 gBS->UninstallProtocolInterface ( 269 269 Private->Ip4Nic->Controller, … … 702 702 703 703 // 704 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally 704 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally 705 705 // layering to perform the experiment. 706 706 // … … 839 839 for (Index = 0; Index < Private->Snp->Mode->HwAddressSize; Index++) { 840 840 Private->IaId |= (Private->Snp->Mode->CurrentAddress.Addr[Index] << ((Index << 3) & 31)); 841 } 841 } 842 842 } 843 843 … … 1004 1004 goto ON_ERROR; 1005 1005 } 1006 1006 1007 1007 if (Private->Snp != NULL) { 1008 1008 // … … 1021 1021 1022 1022 // 1023 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally 1023 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally 1024 1024 // layering to perform the experiment. 1025 1025 // … … 1146 1146 device to be started. 1147 1147 @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6. 1148 1148 1149 1149 @retval EFI_SUCCESS This driver supports this device. 1150 1150 @retval EFI_UNSUPPORTED This driver does not support this device. … … 1163 1163 EFI_GUID *DhcpServiceBindingGuid; 1164 1164 EFI_GUID *MtftpServiceBindingGuid; 1165 1165 1166 1166 if (IpVersion == IP_VERSION_4) { 1167 1167 DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid; … … 1306 1306 // 1307 1307 // Install PxeBaseCodePrivate protocol onto the real NIC handler. 1308 // PxeBaseCodePrivate protocol is only used to keep the relationship between 1308 // PxeBaseCodePrivate protocol is only used to keep the relationship between 1309 1309 // NIC handle and virtual child handles. 1310 1310 // gEfiCallerIdGuid will be used as its protocol guid. … … 1323 1323 // Try to locate SNP protocol. 1324 1324 // 1325 NetLibGetSnpHandle(ControllerHandle, &Private->Snp); 1325 NetLibGetSnpHandle(ControllerHandle, &Private->Snp); 1326 1326 } 1327 1327 -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
r58459 r58466 92 92 goto ON_ERROR; 93 93 } 94 94 95 95 // 96 96 // Configure block size for TFTP as a default value to handle all link layers. … … 137 137 goto ON_ERROR; 138 138 } 139 139 140 140 // 141 141 // Configure block size for TFTP as a default value to handle all link layers. … … 725 725 FreePool (NewCreatedInfo); 726 726 } 727 727 728 728 if (Mode->UsingIpv6) { 729 729 Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData); … … 731 731 Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData); 732 732 } 733 733 734 734 // 735 735 // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP … … 1622 1622 // 1623 1623 Private->Udp4Read->Configure (Private->Udp4Read, NULL); 1624 1624 1625 1625 // 1626 1626 // Configure the UDP instance with the new configuration. … … 1632 1632 return Status; 1633 1633 } 1634 1634 1635 1635 // 1636 1636 // In not Promiscuous mode, need to join the new multicast group. … … 1661 1661 // 1662 1662 Private->Udp6Read->Configure (Private->Udp6Read, NULL); 1663 1663 1664 1664 // 1665 1665 // Configure the UDP instance with the new configuration. … … 1670 1670 return Status; 1671 1671 } 1672 1672 1673 1673 // 1674 1674 // In not Promiscuous mode, need to join the new multicast group. -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
r58459 r58466 102 102 103 103 PXEBC_PRIVATE_PROTOCOL Id; 104 EFI_SIMPLE_NETWORK_PROTOCOL *Snp; 104 EFI_SIMPLE_NETWORK_PROTOCOL *Snp; 105 105 106 106 PXEBC_VIRTUAL_NIC *Ip4Nic; -
trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
r58459 r58466 1 1 ## @file 2 2 # Access PXE-compatible devices for network access and network booting. 3 # 3 # 4 4 # This driver provides PXE Base Code Protocol which is used to accessing 5 5 # PXE-compatible device for network access or booting. It could work together … … 74 74 ## TO_START 75 75 ## SOMETIMES_CONSUMES 76 gEfiDevicePathProtocolGuid 76 gEfiDevicePathProtocolGuid 77 77 gEfiNetworkInterfaceIdentifierProtocolGuid_31 ## SOMETIMES_CONSUMES 78 78 gEfiArpServiceBindingProtocolGuid ## TO_START
Note:
See TracChangeset
for help on using the changeset viewer.