MdeModulePkg/UefiPxeBcDxe: Refine the PXE boot displayed information
This path is to refine the PXE boot displayed information so as to in line with NetworkPkg/UefiPxeBcDxe driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@@ -338,6 +338,8 @@ EfiPxeBcStart (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
AsciiPrint ("\n>>Start PXE over IPv4");
|
||||
|
||||
//
|
||||
// Configure the udp4 instance to let it receive data
|
||||
//
|
||||
@@ -667,6 +669,11 @@ EfiPxeBcDhcp (
|
||||
//
|
||||
Status = PxeBcCheckSelectedOffer (Private);
|
||||
|
||||
AsciiPrint ("\n Station IP address is ");
|
||||
|
||||
PxeBcShowIp4Addr (&Private->StationIp.v4);
|
||||
AsciiPrint ("\n");
|
||||
|
||||
ON_EXIT:
|
||||
if (EFI_ERROR (Status)) {
|
||||
Dhcp4->Stop (Dhcp4);
|
||||
@@ -2740,6 +2747,14 @@ DiscoverBootFile (
|
||||
|
||||
Private->FileSize = (UINTN) *BufferSize;
|
||||
|
||||
//
|
||||
// Display all the information: boot server address, boot file name and boot file size.
|
||||
//
|
||||
AsciiPrint ("\n Server IP address is ");
|
||||
PxeBcShowIp4Addr (&Private->ServerIp.v4);
|
||||
AsciiPrint ("\n NBP filename is %a", Private->BootFileName);
|
||||
AsciiPrint ("\n NBP filesize is %d Bytes", Private->FileSize);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -2855,6 +2870,7 @@ EfiPxeLoadFile (
|
||||
if (sizeof (UINTN) < sizeof (UINT64) && (TmpBufSize > 0xFFFFFFFF)) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
} else if (TmpBufSize > 0 && *BufferSize >= (UINTN) TmpBufSize && Buffer != NULL) {
|
||||
AsciiPrint ("\n Downloading NBP file...\n");
|
||||
*BufferSize = (UINTN) TmpBufSize;
|
||||
Status = PxeBc->Mtftp (
|
||||
PxeBc,
|
||||
@@ -2879,6 +2895,7 @@ EfiPxeLoadFile (
|
||||
//
|
||||
// Download the file.
|
||||
//
|
||||
AsciiPrint ("\n Downloading NBP file...\n");
|
||||
TmpBufSize = (UINT64) (*BufferSize);
|
||||
Status = PxeBc->Mtftp (
|
||||
PxeBc,
|
||||
@@ -2913,6 +2930,7 @@ EfiPxeLoadFile (
|
||||
// Check download status
|
||||
//
|
||||
if (Status == EFI_SUCCESS) {
|
||||
AsciiPrint ("\n NBP file downloaded successfully.\n");
|
||||
//
|
||||
// The DHCP4 can have only one configured child instance so we need to stop
|
||||
// reset the DHCP4 child before we return. Otherwise the other programs which
|
||||
|
Reference in New Issue
Block a user