summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-05-22 09:25:57 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-06-05 16:28:51 +0800
commit5225084439bd47f2cdd210a98d6a445a2eccc9e2 (patch)
tree960ed181119387f679b70af9f89178cddd345b1f /MdeModulePkg/Universal
parentef931b311fd772c8ab9f453cb0f9d0cd0b1deacf (diff)
downloadedk2-5225084439bd47f2cdd210a98d6a445a2eccc9e2.tar.gz
edk2-5225084439bd47f2cdd210a98d6a445a2eccc9e2.tar.bz2
edk2-5225084439bd47f2cdd210a98d6a445a2eccc9e2.zip
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>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c18
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c22
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h16
3 files changed, 54 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index 259568edae..6d4f33f0db 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -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
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
index 077905671e..c1cabca8b9 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -114,6 +114,26 @@ PxeBcConfigureUdpWriteInstance (
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.
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
index 16ac05ec82..59e9b3276e 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
@@ -1,6 +1,6 @@
/** @file
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
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
@@ -67,6 +67,20 @@ PxeBcConfigureUdpWriteInstance (
IN UINT8 Ttl,
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.