mirror of https://github.com/acidanthera/audk.git
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:
parent
ef931b311f
commit
5225084439
|
@ -338,6 +338,8 @@ EfiPxeBcStart (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AsciiPrint ("\n>>Start PXE over IPv4");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Configure the udp4 instance to let it receive data
|
// Configure the udp4 instance to let it receive data
|
||||||
//
|
//
|
||||||
|
@ -667,6 +669,11 @@ EfiPxeBcDhcp (
|
||||||
//
|
//
|
||||||
Status = PxeBcCheckSelectedOffer (Private);
|
Status = PxeBcCheckSelectedOffer (Private);
|
||||||
|
|
||||||
|
AsciiPrint ("\n Station IP address is ");
|
||||||
|
|
||||||
|
PxeBcShowIp4Addr (&Private->StationIp.v4);
|
||||||
|
AsciiPrint ("\n");
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Dhcp4->Stop (Dhcp4);
|
Dhcp4->Stop (Dhcp4);
|
||||||
|
@ -2740,6 +2747,14 @@ DiscoverBootFile (
|
||||||
|
|
||||||
Private->FileSize = (UINTN) *BufferSize;
|
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;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2855,6 +2870,7 @@ EfiPxeLoadFile (
|
||||||
if (sizeof (UINTN) < sizeof (UINT64) && (TmpBufSize > 0xFFFFFFFF)) {
|
if (sizeof (UINTN) < sizeof (UINT64) && (TmpBufSize > 0xFFFFFFFF)) {
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
} else if (TmpBufSize > 0 && *BufferSize >= (UINTN) TmpBufSize && Buffer != NULL) {
|
} else if (TmpBufSize > 0 && *BufferSize >= (UINTN) TmpBufSize && Buffer != NULL) {
|
||||||
|
AsciiPrint ("\n Downloading NBP file...\n");
|
||||||
*BufferSize = (UINTN) TmpBufSize;
|
*BufferSize = (UINTN) TmpBufSize;
|
||||||
Status = PxeBc->Mtftp (
|
Status = PxeBc->Mtftp (
|
||||||
PxeBc,
|
PxeBc,
|
||||||
|
@ -2879,6 +2895,7 @@ EfiPxeLoadFile (
|
||||||
//
|
//
|
||||||
// Download the file.
|
// Download the file.
|
||||||
//
|
//
|
||||||
|
AsciiPrint ("\n Downloading NBP file...\n");
|
||||||
TmpBufSize = (UINT64) (*BufferSize);
|
TmpBufSize = (UINT64) (*BufferSize);
|
||||||
Status = PxeBc->Mtftp (
|
Status = PxeBc->Mtftp (
|
||||||
PxeBc,
|
PxeBc,
|
||||||
|
@ -2913,6 +2930,7 @@ EfiPxeLoadFile (
|
||||||
// Check download status
|
// Check download status
|
||||||
//
|
//
|
||||||
if (Status == EFI_SUCCESS) {
|
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
|
// 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
|
// reset the DHCP4 child before we return. Otherwise the other programs which
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Support routines for PxeBc.
|
Support routines for PxeBc.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -114,6 +114,26 @@ PxeBcConfigureUdpWriteInstance (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function is to display the IPv4 address.
|
||||||
|
|
||||||
|
@param[in] Ip The pointer to the IPv4 address.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
PxeBcShowIp4Addr (
|
||||||
|
IN EFI_IPv4_ADDRESS *Ip
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINTN Index;
|
||||||
|
|
||||||
|
for (Index = 0; Index < 4; Index++) {
|
||||||
|
AsciiPrint ("%d", Ip->Addr[Index]);
|
||||||
|
if (Index < 3) {
|
||||||
|
AsciiPrint (".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert number to ASCII value.
|
Convert number to ASCII value.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/** @file
|
/** @file
|
||||||
Support routines for PxeBc.
|
Support routines for PxeBc.
|
||||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -67,6 +67,20 @@ PxeBcConfigureUdpWriteInstance (
|
||||||
IN UINT8 Ttl,
|
IN UINT8 Ttl,
|
||||||
IN UINT8 ToS
|
IN UINT8 ToS
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function is to display the IPv4 address.
|
||||||
|
|
||||||
|
@param[in] Ip The pointer to the IPv4 address.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
PxeBcShowIp4Addr (
|
||||||
|
IN EFI_IPv4_ADDRESS *Ip
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert number to ASCII value.
|
Convert number to ASCII value.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue