diff options
author | Fu Siyuan <siyuan.fu@intel.com> | 2018-02-02 11:23:52 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2018-02-05 13:38:40 +0800 |
commit | ccd05ddd50d8c95c2624b79cace2afdc26e89c9e (patch) | |
tree | e4f3d5f389af137bbbf52114bc3cabbae146430f /NetworkPkg/UefiPxeBcDxe | |
parent | a02a5f3dbf1cc892f43058668df132f0ff1f557a (diff) | |
download | edk2-ccd05ddd50d8c95c2624b79cace2afdc26e89c9e.tar.gz edk2-ccd05ddd50d8c95c2624b79cace2afdc26e89c9e.tar.bz2 edk2-ccd05ddd50d8c95c2624b79cace2afdc26e89c9e.zip |
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.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 3 | ||||
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 1 |
2 files changed, 4 insertions, 0 deletions
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;
|