From 5a64f158ec8573b33e77a3b345646552979b07f0 Mon Sep 17 00:00:00 2001 From: Tobias Heider Date: Sun, 10 Aug 2025 16:27:46 +0200 Subject: [PATCH] chid: don't hardcode magic numbers for non-official CHIDs They are constructed from EXTRA_CHID_BASE + offset --- src/boot/chid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/boot/chid.c b/src/boot/chid.c index 74be7d594f3..28f2b7b8984 100644 --- a/src/boot/chid.c +++ b/src/boot/chid.c @@ -105,7 +105,8 @@ EFI_STATUS chid_match(const void *hwid_buffer, size_t hwid_length, uint32_t matc const Device *devices = ASSERT_PTR(hwid_buffer); EFI_GUID chids[CHID_TYPES_MAX] = {}; - static const size_t priority[] = { 17, 16, 15, 3, 6, 8, 10, 4, 5, 7, 9, 11 }; /* From most to least specific. */ + static const size_t priority[] = { EXTRA_CHID_BASE + 2, EXTRA_CHID_BASE + 1, EXTRA_CHID_BASE + 0, + 3, 6, 8, 10, 4, 5, 7, 9, 11 }; /* From most to least specific. */ status = populate_board_chids(chids); if (EFI_STATUS_IS_ERROR(status)) -- 2.47.3