From 3fad4a952795cdb3886085b62ccdeb46f6784ac9 Mon Sep 17 00:00:00 2001 From: Fu Siyuan Date: Fri, 2 Feb 2018 11:25:05 +0800 Subject: [PATCH] MdeModulePkg/PXE: Add warning message for PXE if failed to read system GUID from SMBIOS. 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 Reviewed-by: Yao Jiewen --- MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c index c5f343788b..e48b54c876 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c @@ -2,7 +2,7 @@ Support for PxeBc dhcp functions. Copyright (c) 2013, Red Hat, Inc. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -957,6 +957,7 @@ PxeBcDhcpCallBack ( // SetMem(DHCPV4_OPTIONS_BUFFER.DhcpPlatformId.Guid, sizeof(EFI_GUID), 0xff); // GUID not yet set - send all 0's to show not programable // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (DhcpHeader->ClientHwAddr, sizeof (EFI_GUID)); } @@ -1133,6 +1134,7 @@ PxeBcBuildDhcpOptions ( // SetMem(DHCPV4_OPTIONS_BUFFER.DhcpPlatformId.Guid, sizeof(EFI_GUID), 0xff); // GUID not yet set - send all 0's to show not programable // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (OptEnt.Uuid->Guid, sizeof (EFI_GUID)); } @@ -1301,6 +1303,7 @@ PxeBcDiscvBootService ( // // GUID not yet set - send all 0's to show not programable // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (DhcpHeader->ClientHwAddr, sizeof (EFI_GUID)); } -- 2.39.2