7191dd3 ArmPkg/PlatformBootManagerLib: reject 'default' parity and stop bit count

1 file Authored by Ard Biesheuvel 4 years ago, Committed by mergify[bot] 4 years ago,
    ArmPkg/PlatformBootManagerLib: reject 'default' parity and stop bit count
    
    In the ArmPkg version of PlatformBootManagerLib, we construct a
    serial device path based on the default settings for baud rate,
    parity and the number of stop bits, to ensure that a serial console
    is available even on the very first boot.
    
    This assumes that PcdUartDefaultParity or PcdUartDefaultStopBits are
    not set to '0', meaning 'the default', as there is no default for
    these when constructing a device path.
    
    So add a couple of STATIC_ASSERT()s to make sure that we catch this
    condition, since it otherwise ignores the bogus device path silently,
    which is rather tedious to debug,.
    
    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>