Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 2021 01:46:18 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: 9939af1a161e - main - amd64: correctly calculate KVA of the preloaded ucode blob
Message-ID:  <202108310146.17V1kIRL075237@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=9939af1a161e5c219ece5e7c5bc02dcb9a9960f7

commit 9939af1a161e5c219ece5e7c5bc02dcb9a9960f7
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-08-30 20:25:31 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-08-31 01:46:12 +0000

    amd64: correctly calculate KVA of the preloaded ucode blob
    
    when kernphys != 2M
    
    Reported and tested by: kbowling
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/amd64/amd64/machdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index eaf592c9b947..864caa144f0d 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1642,7 +1642,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 		atomic_store_short((u_short *)0x472, 0x1234);
 	}
 
-	physfree += ucode_load_bsp(physfree + KERNBASE);
+	physfree += ucode_load_bsp(physfree - kernphys + KERNSTART);
 	physfree = roundup2(physfree, PAGE_SIZE);
 
 	identify_cpu1();



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