Skip to content

Commit

Permalink
NetworkPkg: Add warning message for PXE if failed to read system GUID…
Browse files Browse the repository at this point in the history
… 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 <siyuan.fu@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
  • Loading branch information
sfu5 committed Feb 5, 2018
1 parent 5e69443 commit bfb539c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
Expand Up @@ -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));
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
Expand Up @@ -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;
Expand Down

0 comments on commit bfb539c

Please sign in to comment.