From nobody Mon Jan 13 10:08:44 2025
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: <edk2-devel-bounces@lists.01.org>
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 <edk2-devel@lists.01.org>; 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 <siyuan.fu@intel.com>
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  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
Cc: Ye Ting <ting.ye@intel.com>, Wang Fan <fan.wang@intel.com>,
 Wu Jiaxin <jiaxin.wu@intel.com>, Yao Jiewen <jiewen.yao@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Errors-To: edk2-devel-bounces@lists.01.org
Sender: "edk2-devel" <edk2-devel-bounces@lists.01.org>
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 <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Wang Fan <fan.wang@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---
 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
From nobody Mon Jan 13 10:08:44 2025
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: <edk2-devel-bounces@lists.01.org>
Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com
	with SMTPS id 1517542151599441.57208816678815;
 Thu, 1 Feb 2018 19:29:11 -0800 (PST)
Received: from [127.0.0.1] (localhost [IPv6:::1])
	by ml01.01.org (Postfix) with ESMTP id 9FABE22393633;
	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 EE2CB2239362C
 for <edk2-devel@lists.01.org>; Thu,  1 Feb 2018 19:23:27 -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:05 -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:04 -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="200731439"
From: Fu Siyuan <siyuan.fu@intel.com>
To: edk2-devel@lists.01.org
Date: Fri,  2 Feb 2018 11:28:58 +0800
Message-Id: <20180202032858.12824-3-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 2/2] MdeModulePkg/PXE: 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  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
Cc: Ye Ting <ting.ye@intel.com>, Wang Fan <fan.wang@intel.com>,
 Wu Jiaxin <jiaxin.wu@intel.com>, Yao Jiewen <jiewen.yao@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Errors-To: edk2-devel-bounces@lists.01.org
Sender: "edk2-devel" <edk2-devel-bounces@lists.01.org>
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 <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Wang Fan <fan.wang@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---
 MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c b/MdeM=
odulePkg/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.
=20
 Copyright (c) 2013, Red Hat, Inc.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
 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_GU=
ID), 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 smbi=
os table!\n"));
         ZeroMem (DhcpHeader->ClientHwAddr, sizeof (EFI_GUID));
       }
=20
@@ -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 t=
able!\n"));
     ZeroMem (OptEnt.Uuid->Guid, sizeof (EFI_GUID));
   }
=20
@@ -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));
     }
=20
--=20
2.13.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel