From 5c85b8618c22462c690017e445374c45e00abc04 Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Sat, 24 Feb 2024 13:57:55 +0100 Subject: [PATCH] arch/intel64: prase multiboot2 header before revoking the lower memory __revoke_low_memory() is called in intel64_lowsetup() fixes b4b96a6435 (PR #11758) in which the multiboot2 header was accessed after revoking the low memory which caused page fault. Signed-off-by: p-szafonimateusz --- arch/x86_64/src/intel64/intel64_start.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86_64/src/intel64/intel64_start.c b/arch/x86_64/src/intel64/intel64_start.c index b19117bfa59..38a4282a04e 100644 --- a/arch/x86_64/src/intel64/intel64_start.c +++ b/arch/x86_64/src/intel64/intel64_start.c @@ -125,16 +125,16 @@ void __nxstart(void) *dest++ = 0; } - /* Low-level, pre-OS initialization */ - - intel64_lowsetup(); - #ifdef CONFIG_ARCH_MULTIBOOT2 /* Handle multiboot2 info */ x86_64_mb2_config(); #endif + /* Low-level, pre-OS initialization */ + + intel64_lowsetup(); + /* perform board-specific initializations */ x86_64_boardinitialize();