public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
@ 2018-02-02  3:28 Fu Siyuan
  2018-02-02  3:28 ` [Patch 1/2] " Fu Siyuan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fu Siyuan @ 2018-02-02  3:28 UTC (permalink / raw)
  To: edk2-devel

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.

Fu Siyuan (2):
  NetworkPkg: Add warning message for PXE if failed to read system GUID
    from SMBIOS.
  MdeModulePkg/PXE: Add warning message for PXE if failed to read system
    GUID from SMBIOS.

 MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++-
 NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c                    | 3 +++
 NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c                     | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.13.0.windows.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Patch 1/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
  2018-02-02  3:28 [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS Fu Siyuan
@ 2018-02-02  3:28 ` Fu Siyuan
  2018-02-02  3:28 ` [Patch 2/2] MdeModulePkg/PXE: " Fu Siyuan
  2018-02-02  3:47 ` [Patch 0/2] NetworkPkg: " Yao, Jiewen
  2 siblings, 0 replies; 6+ messages in thread
From: Fu Siyuan @ 2018-02-02  3:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ye Ting, Wu Jiaxin, Wang Fan, Yao Jiewen

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 <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 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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Patch 2/2] MdeModulePkg/PXE: Add warning message for PXE if failed to read system GUID from SMBIOS.
  2018-02-02  3:28 [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS Fu Siyuan
  2018-02-02  3:28 ` [Patch 1/2] " Fu Siyuan
@ 2018-02-02  3:28 ` Fu Siyuan
  2018-02-02  3:47 ` [Patch 0/2] NetworkPkg: " Yao, Jiewen
  2 siblings, 0 replies; 6+ messages in thread
From: Fu Siyuan @ 2018-02-02  3:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ye Ting, Wu Jiaxin, Wang Fan, Yao Jiewen

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 <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/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.<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_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.13.0.windows.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
  2018-02-02  3:28 [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS Fu Siyuan
  2018-02-02  3:28 ` [Patch 1/2] " Fu Siyuan
  2018-02-02  3:28 ` [Patch 2/2] MdeModulePkg/PXE: " Fu Siyuan
@ 2018-02-02  3:47 ` Yao, Jiewen
  2018-02-02  3:49   ` Fu, Siyuan
  2 siblings, 1 reply; 6+ messages in thread
From: Yao, Jiewen @ 2018-02-02  3:47 UTC (permalink / raw)
  To: Fu, Siyuan, edk2-devel@lists.01.org

Hi Siyuan
It is great idea to add such warning message to help debug such PXE issue.

Do you think it will be better if we add such info in NetLib - NetLibGetSystemGuid().

As such, we don't need update all consumers.

Thank you
Yao Jiewen

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu
> Siyuan
> Sent: Friday, February 2, 2018 11:29 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 0/2] NetworkPkg: 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.
> 
> Fu Siyuan (2):
>   NetworkPkg: Add warning message for PXE if failed to read system GUID
>     from SMBIOS.
>   MdeModulePkg/PXE: Add warning message for PXE if failed to read system
>     GUID from SMBIOS.
> 
>  MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++-
>  NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c                    | 3 +++
>  NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c                     | 1 +
>  3 files changed, 8 insertions(+), 1 deletion(-)
> 
> --
> 2.13.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
  2018-02-02  3:47 ` [Patch 0/2] NetworkPkg: " Yao, Jiewen
@ 2018-02-02  3:49   ` Fu, Siyuan
  2018-02-02  4:38     ` Yao, Jiewen
  0 siblings, 1 reply; 6+ messages in thread
From: Fu, Siyuan @ 2018-02-02  3:49 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org

Jiewen,

NetLibGetSystemGuid is also used by some other drivers like DHCP6, and it's acceptable to not use system GUID as client identifier in DHCP protocol. That's why I only add the warning in PXE driver.

BestRegards
Fu Siyuan

> -----Original Message-----
> From: Yao, Jiewen
> Sent: Friday, February 2, 2018 11:47 AM
> To: Fu, Siyuan <siyuan.fu@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [Patch 0/2] NetworkPkg: Add warning message for PXE if
> failed to read system GUID from SMBIOS.
> 
> Hi Siyuan
> It is great idea to add such warning message to help debug such PXE issue.
> 
> Do you think it will be better if we add such info in NetLib -
> NetLibGetSystemGuid().
> 
> As such, we don't need update all consumers.
> 
> Thank you
> Yao Jiewen
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Fu
> > Siyuan
> > Sent: Friday, February 2, 2018 11:29 AM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] [Patch 0/2] NetworkPkg: 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.
> >
> > Fu Siyuan (2):
> >   NetworkPkg: Add warning message for PXE if failed to read system GUID
> >     from SMBIOS.
> >   MdeModulePkg/PXE: Add warning message for PXE if failed to read system
> >     GUID from SMBIOS.
> >
> >  MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++-
> >  NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c                    | 3 +++
> >  NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c                     | 1 +
> >  3 files changed, 8 insertions(+), 1 deletion(-)
> >
> > --
> > 2.13.0.windows.1
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS.
  2018-02-02  3:49   ` Fu, Siyuan
@ 2018-02-02  4:38     ` Yao, Jiewen
  0 siblings, 0 replies; 6+ messages in thread
From: Yao, Jiewen @ 2018-02-02  4:38 UTC (permalink / raw)
  To: Fu, Siyuan, edk2-devel@lists.01.org

Got it. I agree.

> -----Original Message-----
> From: Fu, Siyuan
> Sent: Friday, February 2, 2018 11:49 AM
> To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [Patch 0/2] NetworkPkg: Add warning message for PXE if
> failed to read system GUID from SMBIOS.
> 
> Jiewen,
> 
> NetLibGetSystemGuid is also used by some other drivers like DHCP6, and it's
> acceptable to not use system GUID as client identifier in DHCP protocol. That's
> why I only add the warning in PXE driver.
> 
> BestRegards
> Fu Siyuan
> 
> > -----Original Message-----
> > From: Yao, Jiewen
> > Sent: Friday, February 2, 2018 11:47 AM
> > To: Fu, Siyuan <siyuan.fu@intel.com>; edk2-devel@lists.01.org
> > Subject: RE: [edk2] [Patch 0/2] NetworkPkg: Add warning message for PXE if
> > failed to read system GUID from SMBIOS.
> >
> > Hi Siyuan
> > It is great idea to add such warning message to help debug such PXE issue.
> >
> > Do you think it will be better if we add such info in NetLib -
> > NetLibGetSystemGuid().
> >
> > As such, we don't need update all consumers.
> >
> > Thank you
> > Yao Jiewen
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > Fu
> > > Siyuan
> > > Sent: Friday, February 2, 2018 11:29 AM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] [Patch 0/2] NetworkPkg: 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.
> > >
> > > Fu Siyuan (2):
> > >   NetworkPkg: Add warning message for PXE if failed to read system GUID
> > >     from SMBIOS.
> > >   MdeModulePkg/PXE: Add warning message for PXE if failed to read
> system
> > >     GUID from SMBIOS.
> > >
> > >  MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 5 ++++-
> > >  NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c                    | 3 +++
> > >  NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c                     | 1 +
> > >  3 files changed, 8 insertions(+), 1 deletion(-)
> > >
> > > --
> > > 2.13.0.windows.1
> > >
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-02  4:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02  3:28 [Patch 0/2] NetworkPkg: Add warning message for PXE if failed to read system GUID from SMBIOS Fu Siyuan
2018-02-02  3:28 ` [Patch 1/2] " Fu Siyuan
2018-02-02  3:28 ` [Patch 2/2] MdeModulePkg/PXE: " Fu Siyuan
2018-02-02  3:47 ` [Patch 0/2] NetworkPkg: " Yao, Jiewen
2018-02-02  3:49   ` Fu, Siyuan
2018-02-02  4:38     ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox