Hi Ray,
Thanks for the review. My answers below.
Thanks,
Daniil
On 05/04/2016 12:07 AM, Ni, Ruiyu wrote:
2 comments below.
Regards,
Ray
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Daniil
Egranov
Sent: Wednesday, May 4, 2016 9:34 AM
To: edk2-devel@lists.01.org
Cc: Fan, Jeff <jeff....@intel.com>
Subject: [edk2] [PATCH v2 3/3] IntelFrameworkModulePkg/BdsDxe: Show boot
timeout message
The PlatformBdsShowProgress() supports graphics mode only, which is not
applicable for RS-232 serial console. Show the progress message as a console
text message in case PlatformBdsShowProgress() fails.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov <daniil.egra...@arm.com>
---
IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 6958979..d1a5c05 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -925,7 +925,7 @@ ShowProgress (
// Show progress
//
if (TmpStr != NULL) {
- PlatformBdsShowProgress (
+ Status = PlatformBdsShowProgress (
Foreground,
Background,
TmpStr,
@@ -933,12 +933,19 @@ ShowProgress (
((TimeoutDefault - TimeoutRemain) * 100 / TimeoutDefault),
0
);
+ if (EFI_ERROR(Status)) {
+ //if graphics mode is not supported (serial console) show text
progress message
+ AsciiPrint ("\rPress any key to enter Boot Menu in %d seconds
", TimeoutRemain);
+ }
1. Why use AsciiPrint but not Print(L"")?
I agree they are the same but normally we use Print().
I was not sure which one to use. I'll correct it.
}
}
}
if (TmpStr != NULL) {
gBS->FreePool (TmpStr);
+ if (EFI_ERROR(Status)) {
+ AsciiPrint ("\n");
+ }
2. What's the purpose of the EOL here?
The AsciiPrint above uses cartridge return without a new line so this
EOL preserves last message from being erased by other console outputs.
}
//
--
2.7.4
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel