DynamicTablesPkg: AcpiSpcrLib: Support as-is baud rate setting

The SPCR specification at
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table
states that baud rate 0 is interpreted as "as-is". This indicates that the
OS should rely on the current UART configuration until the full featured
driver is initialized.

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
This commit is contained in:
Sarah Walker
2025-02-26 12:12:22 +00:00
committed by Sami Mujawar
parent 28b952a56b
commit 8d3c7c196d

View File

@@ -351,6 +351,12 @@ BuildSpcrTableEx (
AcpiSpcr.GlobalSystemInterrupt = SerialPortInfo->Interrupt;
switch (SerialPortInfo->BaudRate) {
case 0:
// Baud rate 0 indicates that the OS should rely on the current UART
// configuration until the full driver is initialized.
AcpiSpcr.BaudRate =
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_AS_IS;
break;
case 9600:
AcpiSpcr.BaudRate =
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600;