-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test] ArmPlatformPkg, ArmVirtPkg: Add early hello message #3140
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a good idea. We actually added something like this to the platform lib. We created the string as a pre build step. Should be possible to do that with a PCD included from a pre build generated file.
Thanks,
Andrew Fish
… On Jul 25, 2022, at 12:52 PM, Oliver Steffen ***@***.***> wrote:
Add the ability to print an early hello message independent of debug
mask to the serial port when the firmware starts. Introduce a PCD entry
to set the message text (ArmPlatformPkg). If the message text is empty
(default) then nothing is printed.
The message is useful for debugging boot problems, especially with
silent firmware builds. It can take some seconds until the first line is
printed when booting the firmware, for example when running ArmVirt in
Qemu.
Use the above in ArmVirtPkg by defining a message text.
These changes have already been proposed by Laszlo Ersek in 2015.
I am reposting because I find this useful.
Example of a VM starting up, AARCH64, Qemu on X64). First line is the
new message. (Timestamp in seconds).
-VM start-
0000.094 | UEFI firmware starting.
00004.06 | BdsDxe: failed to load Boot0001 "UEFI Misc Device" from VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found
00004.08 | BdsDxe: loading Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x2,0x0)
00004.08 | BdsDxe: starting Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x2,0x0)
00004.11 | System BootOrder not found. Initializing defaults.
00004.11 | Creating boot entry "Boot0005" with label "Red Hat Enterprise Linux" for file "\EFI\redhat\shimaa64.efi"
00004.15 |
00008.39 | EFI stub: Booting Linux Kernel...
[...]
You can view, comment on, or merge this pull request online at:
#3140
Commit Summary
48b5d7a <48b5d7a> ArmPlatformPkg: introduce fixed PCD for early hello message
f931d2c <f931d2c> ArmPlatformPkg: PrePeiCore: write early hello message to the serial port
87912a7 <87912a7> ArmVirtPkg: set early hello message
File Changes (7 files <https://github.com/tianocore/edk2/pull/3140/files>)
M ArmPlatformPkg/ArmPlatformPkg.dec <https://github.com/tianocore/edk2/pull/3140/files#diff-a5e8c089ca8adea5d4168051430727916b9ccb5a708d2d47777a0e44b511ed88> (7)
M ArmPlatformPkg/PrePeiCore/MainMPCore.c <https://github.com/tianocore/edk2/pull/3140/files#diff-8e2b3c3c4ff84a7317fe1021e1d61a838f5fa5868005238b77e98a41ef2dd533> (5)
M ArmPlatformPkg/PrePeiCore/MainUniCore.c <https://github.com/tianocore/edk2/pull/3140/files#diff-96284d107dd82e648251a37b4cb8f5284676860dfcf68413d9f3117883e8c44d> (5)
M ArmPlatformPkg/PrePeiCore/PrePeiCore.h <https://github.com/tianocore/edk2/pull/3140/files#diff-aef968302818af13d56b14a46a253d15303121a5c0522d8ff9f2c3353f4a3671> (1)
M ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf <https://github.com/tianocore/edk2/pull/3140/files#diff-31da2bb42a1746703d92d86b971deec4fcb9cec7fdd7958663d724161a417299> (2)
M ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf <https://github.com/tianocore/edk2/pull/3140/files#diff-6c2c9422274db4ee44ff5b04d1893aac130d535ffd8ac89c21864a9e25acdc09> (2)
M ArmVirtPkg/ArmVirtQemu.dsc <https://github.com/tianocore/edk2/pull/3140/files#diff-55200ac934bbe6e81bb4158bfff4797992b13fb1afb95fe982853024c6018430> (1)
Patch Links:
https://github.com/tianocore/edk2/pull/3140.patch
https://github.com/tianocore/edk2/pull/3140.diff
—
Reply to this email directly, view it on GitHub <#3140>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD4ZCO5KD55POGGMF3DDZPDVV3V6XANCNFSM54TOHGZA>.
You are receiving this because you are subscribed to this thread.
|
Add a PCD for defining a hello message that gets printed to the serial port very early in the boot process, regardless of debug masks. This is useful for debugging boot problems (especially in virtual machines) and informs interactive users that the firmware is running. If a platform doesn't want this feature, it should stick with the default empty string. Singed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Print the early hello message to the serial port. The FixedPcdGetSize() macro expands to an integer constant, therefore an optimizing compiler can eliminate the new code, if the platform DSC doesn't override the empty string (size=1) default of PcdEarlyHelloMessage. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Set the text for the early hello message in ArmVirtPkg. This prints a friendly banner on QEMU, regardless of debug mask settings. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Oliver Steffen <osteffen@redhat.com>
osteffenrh
force-pushed
the
pcd-early-hello-message
branch
from
July 26, 2022 06:59
87912a7
to
f9649ac
Compare
We should go with #2774 instead of this one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the ability to print an early hello message independent of debug
mask to the serial port when the firmware starts. Introduce a PCD entry
to set the message text (
ArmPlatformPkg
). If the message text is empty(default) then nothing is printed.
The message is useful for debugging boot problems, especially with
silent firmware builds. It can take some seconds until the first line is
printed when booting the firmware, for example when running
ArmVirt
inQemu.
Use the above in
ArmVirtPkg
by defining a message text.These changes have already been proposed by Laszlo Ersek in 2015.
I am reposting because I find this useful.
Example of a VM starting up, AARCH64, Qemu on X64). First line is the
new message. (Timestamp in seconds).