]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
authorFu Siyuan <siyuan.fu@intel.com>
Fri, 2 Feb 2018 03:23:52 +0000 (11:23 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Mon, 5 Feb 2018 05:38:40 +0000 (13:38 +0800)
Current PXE driver uses zero GUID if failed to get the system GUID from smbios
table, and some OS PXE boot may fail in such case. This patch is to add a warning
message to inform user that smbios table is missed on the platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c

index b2c03eb26902717691f97e79b1b7a560547f95df..bb65445fc9f0f3b95b6285ea9bfb0a46579f927f 100644 (file)
@@ -320,6 +320,7 @@ PxeBcBuildDhcp4Options (
     //\r
     // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
     //\r
+    DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n"));\r
     ZeroMem (OptEnt.Uuid->Guid, sizeof (EFI_GUID));\r
   }\r
 \r
@@ -1282,6 +1283,7 @@ PxeBcDhcp4CallBack (
         //\r
         // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
         //\r
+        DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n"));\r
         ZeroMem (Packet->Dhcp4.Header.ClientHwAddr, sizeof (EFI_GUID));\r
       }\r
       Packet->Dhcp4.Header.HwAddrLen = (UINT8) sizeof (EFI_GUID);\r
@@ -1470,6 +1472,7 @@ PxeBcDhcp4Discover (
       //\r
       // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
       //\r
+      DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n"));\r
       ZeroMem (Token.Packet->Dhcp4.Header.ClientHwAddr, sizeof (EFI_GUID));\r
     }\r
     Token.Packet->Dhcp4.Header.HwAddrLen = (UINT8)  sizeof (EFI_GUID);\r
index 9068e0686c5fedd6e3ef3206be573e80edd15b46..d3146c3a7e5feb958d6be1e778c600e7d94ced47 100644 (file)
@@ -1949,6 +1949,7 @@ EfiPxeBcSetParameters (
 \r
   if (NewSendGUID != NULL) {\r
     if (*NewSendGUID && EFI_ERROR (NetLibGetSystemGuid (&SystemGuid))) {\r
+      DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n"));\r
       return EFI_INVALID_PARAMETER;\r
     }\r
     Mode->SendGUID = *NewSendGUID;\r