mirror of https://github.com/acidanthera/audk.git
ArmPkg/PlatformBootManagerLib: use static assertion for console type
Replace the runtime ASSERT with the build time STATIC_ASSERT on the check that ensures that the terminal type we use for the serial console matches the one we explicitly add to the ConIn/ConOut/StdErr variables. This helps catch serial console issues early, even in RELEASE builds, reducing the risk of ending up with no console at all, which can be tricky to debug on bare metal. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Sami Mujawar <Sami.Mujawar@arm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
ca407c7246
commit
b1d3895fb9
|
@ -583,7 +583,9 @@ PlatformBootManagerBeforeConsole (
|
|||
//
|
||||
// Add the hardcoded serial console device path to ConIn, ConOut, ErrOut.
|
||||
//
|
||||
ASSERT (FixedPcdGet8 (PcdDefaultTerminalType) == 4);
|
||||
STATIC_ASSERT (FixedPcdGet8 (PcdDefaultTerminalType) == 4,
|
||||
"PcdDefaultTerminalType must be TTYTERM");
|
||||
|
||||
CopyGuid (&mSerialConsole.TermType.Guid, &gEfiTtyTermGuid);
|
||||
|
||||
EfiBootManagerUpdateConsoleVariable (ConIn,
|
||||
|
|
Loading…
Reference in New Issue