From 7eb3273a7b5854bcd4b1ff727d50e22774122987 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 23 Jan 2025 17:10:54 +0000 Subject: [PATCH] stand/efi: Use hex values to get the uart type To keep the SPCR uart type to name map aligned always use the hex value as an index in the types array. Reviewed by: manu, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48525 --- stand/efi/loader/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 21308996170..6dcdb4cb333 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -798,10 +798,10 @@ static const char * acpi_uart_type(UINT8 t) { static const char *types[] = { - [0] = "ns8250", /* Full 16550 */ - [1] = "ns8250", /* DBGP Rev 1 16550 subset */ - [3] = "pl011", /* Arm PL011 */ - [5] = "ns8250", /* Nvidia 16550 */ + [0x00] = "ns8250", /* Full 16550 */ + [0x01] = "ns8250", /* DBGP Rev 1 16550 subset */ + [0x03] = "pl011", /* Arm PL011 */ + [0x05] = "ns8250", /* Nvidia 16550 */ [0x12] = "ns8250", /* 16550 defined in SerialPort */ };