From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B698722393622 for ; Thu, 1 Feb 2018 19:23:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 19:29:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,445,1511856000"; d="scan'208";a="200731432" Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.192.250]) by fmsmga006.fm.intel.com with ESMTP; 01 Feb 2018 19:29:03 -0800 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Ye Ting , Wu Jiaxin , Wang Fan , Yao Jiewen Date: Fri, 2 Feb 2018 11:28:57 +0800 Message-Id: <20180202032858.12824-2-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 In-Reply-To: <20180202032858.12824-1-siyuan.fu@intel.com> References: <20180202032858.12824-1-siyuan.fu@intel.com> Subject: [Patch 1/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 03:23:27 -0000 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. Cc: Ye Ting Cc: Wu Jiaxin Cc: Wang Fan Cc: Yao Jiewen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 3 +++ NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 1 + 2 files changed, 4 insertions(+) diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c index b2c03eb269..bb65445fc9 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c @@ -320,6 +320,7 @@ PxeBcBuildDhcp4Options ( // // Zero the Guid to indicate NOT programable if failed to get system Guid. // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (OptEnt.Uuid->Guid, sizeof (EFI_GUID)); } @@ -1282,6 +1283,7 @@ PxeBcDhcp4CallBack ( // // Zero the Guid to indicate NOT programable if failed to get system Guid. // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (Packet->Dhcp4.Header.ClientHwAddr, sizeof (EFI_GUID)); } Packet->Dhcp4.Header.HwAddrLen = (UINT8) sizeof (EFI_GUID); @@ -1470,6 +1472,7 @@ PxeBcDhcp4Discover ( // // Zero the Guid to indicate NOT programable if failed to get system Guid. // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); ZeroMem (Token.Packet->Dhcp4.Header.ClientHwAddr, sizeof (EFI_GUID)); } Token.Packet->Dhcp4.Header.HwAddrLen = (UINT8) sizeof (EFI_GUID); diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c index 9068e0686c..d3146c3a7e 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c @@ -1949,6 +1949,7 @@ EfiPxeBcSetParameters ( if (NewSendGUID != NULL) { if (*NewSendGUID && EFI_ERROR (NetLibGetSystemGuid (&SystemGuid))) { + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios table!\n")); return EFI_INVALID_PARAMETER; } Mode->SendGUID = *NewSendGUID; -- 2.13.0.windows.1