git: 489489b4bc55 - main - fdt: bump FDT_MEM_REGIONS to 64

From: Adrian Chadd <adrian_at_FreeBSD.org>
Date: Tue, 08 Apr 2025 03:47:30 UTC
The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=489489b4bc556f9c025ac4893ac79c2069c2cc2d

commit 489489b4bc556f9c025ac4893ac79c2069c2cc2d
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2025-04-06 20:38:53 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2025-04-08 03:46:21 +0000

    fdt: bump FDT_MEM_REGIONS to 64
    
    The Snapdragon X1E / Lenovo T14s device tree has 47 reserved memory
    regions.  The reserved region parsing doesn't boundary check and will
    just end up array bounds smashing, which leads to a reboot before
    any console IO is written.
    
    Differential Revision:  https://reviews.freebsd.org/D49689
    Reviewed by:    manu, phk
---
 sys/dev/fdt/fdt_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/fdt/fdt_common.h b/sys/dev/fdt/fdt_common.h
index de0bee5bd003..d19dc5c359a7 100644
--- a/sys/dev/fdt/fdt_common.h
+++ b/sys/dev/fdt/fdt_common.h
@@ -36,7 +36,7 @@
 #include <contrib/libfdt/libfdt_env.h>
 #include <dev/ofw/ofw_bus.h>
 
-#define FDT_MEM_REGIONS	16
+#define FDT_MEM_REGIONS	64
 
 #define DI_MAX_INTR_NUM	32