From nobody Mon Dec 23 13:25:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517542149336610.6101602284572; Thu, 1 Feb 2018 19:29:09 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 36D3622393630; Thu, 1 Feb 2018 19:23:30 -0800 (PST) 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) 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 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 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,445,1511856000"; d="scan'208";a="200731432" From: Fu Siyuan To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Ye Ting , Wang Fan , Wu Jiaxin , Yao Jiewen MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Current PXE driver uses zero GUID if failed to get the system GUID from smb= ios table, and some OS PXE boot may fail in such case. This patch is to add a w= arning 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 G= uid. // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbios t= able!\n")); ZeroMem (OptEnt.Uuid->Guid, sizeof (EFI_GUID)); } =20 @@ -1282,6 +1283,7 @@ PxeBcDhcp4CallBack ( // // Zero the Guid to indicate NOT programable if failed to get syst= em Guid. // + DEBUG ((EFI_D_WARN, "PXE: Failed to read system GUID from the smbi= os table!\n")); ZeroMem (Packet->Dhcp4.Header.ClientHwAddr, sizeof (EFI_GUID)); } Packet->Dhcp4.Header.HwAddrLen =3D (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 =3D (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 ( =20 if (NewSendGUID !=3D 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 =3D *NewSendGUID; --=20 2.13.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel