git: 7eb3273a7b58 - main - stand/efi: Use hex values to get the uart type

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Thu, 23 Jan 2025 17:27:22 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=7eb3273a7b5854bcd4b1ff727d50e22774122987

commit 7eb3273a7b5854bcd4b1ff727d50e22774122987
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-01-23 17:10:54 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-01-23 17:26:25 +0000

    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 213089961704..6dcdb4cb3334 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 */
 	};