git: 2912c2fbd440 - main - amd64 pmap: be more verbose around entering and leaving LA57 trampoline

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Mon, 16 Sep 2024 08:15:02 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2912c2fbd44072b7372c24dd34392c01f5104497

commit 2912c2fbd44072b7372c24dd34392c01f5104497
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-06 06:10:16 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-16 08:08:53 +0000

    amd64 pmap: be more verbose around entering and leaving LA57 trampoline
    
    Sponsored by:   Advanced Micro Devices (AMD)
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/amd64/amd64/pmap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 48aef39e9663..568301344e86 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -2246,6 +2246,10 @@ pmap_bootstrap_la57(void *arg __unused)
 	    la57_trampoline_gdt - la57_trampoline + VM_PAGE_TO_PHYS(m_code);
 	la57_tramp = (void (*)(uint64_t))VM_PAGE_TO_PHYS(m_code);
 	invlpg((vm_offset_t)la57_tramp);
+	if (bootverbose) {
+		printf("entering LA57 trampoline at %#lx\n",
+		    (vm_offset_t)la57_tramp);
+	}
 	la57_tramp(KPML5phys);
 
 	/*
@@ -2260,6 +2264,9 @@ pmap_bootstrap_la57(void *arg __unused)
 	    (struct system_segment_descriptor *)&__pcpu[0].pc_gdt[GPROC0_SEL]);
 	ltr(GSEL(GPROC0_SEL, SEL_KPL));
 
+	if (bootverbose)
+		printf("LA57 trampoline returned, CR4 %#lx\n", rcr4());
+
 	/*
 	 * Now unmap the trampoline, and free the pages.
 	 * Clear pml5 entry used for 1:1 trampoline mapping.