From 0c3e05ae7c3cd1288b1771d3324139165233d7f7 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Mon, 29 Jul 2019 17:14:25 -0700 Subject: [PATCH] x86: report CR3 on fatal exception Lets us know what set of page tables were in use when the error occurred. Signed-off-by: Andrew Boie --- arch/x86/core/ia32/fatal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/core/ia32/fatal.c b/arch/x86/core/ia32/fatal.c index 6b1305dd603..8c0cbab9f61 100644 --- a/arch/x86/core/ia32/fatal.c +++ b/arch/x86/core/ia32/fatal.c @@ -136,8 +136,8 @@ FUNC_NORETURN void z_x86_fatal_error(unsigned int reason, const z_arch_esf_t *es esf->eax, esf->ebx, esf->ecx, esf->edx); z_fatal_print("esi: 0x%08x, edi: 0x%08x, ebp: 0x%08x, esp: 0x%08x", esf->esi, esf->edi, esf->ebp, esf->esp); - z_fatal_print("eflags: 0x%08x cs: 0x%04x", esf->eflags, - esf->cs & 0xFFFFU); + z_fatal_print("eflags: 0x%08x cs: 0x%04x cr3: %p", esf->eflags, + esf->cs & 0xFFFFU, z_x86_page_tables_get()); #ifdef CONFIG_EXCEPTION_STACK_TRACE z_fatal_print("call trace:");