Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2024 08:15:04 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 180c8ab07995 - main - amd64 la57_trampoline: jump immediately after re-enabling paging
Message-ID:  <202409160815.48G8F4xg027032@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=180c8ab079950acb15c6629ce293055ea0117b39

commit 180c8ab079950acb15c6629ce293055ea0117b39
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-09-17 01:35:20 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-16 08:09:03 +0000

    amd64 la57_trampoline: jump immediately after re-enabling paging
    
    Literally follow requirements from SDM and execute jmp right after
    %cr0 CR0_PG bit is toggled back.
    
    Sponsored by:   Advanced Micro Devices (AMD)
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/amd64/amd64/locore.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index e52d36125afd..a51e5047fe54 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -119,8 +119,9 @@ l1:	movl	$(3<<3),%eax
 
 	movl	%edi,%cr3
 	movl	%edx,%cr0
+	jmp	1f
 
-	pushl	$(1<<3)
+1:	pushl	$(1<<3)
 	pushl	%ebx
 	lretl
 	.code64



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409160815.48G8F4xg027032>