]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: do not assume that kernel is loaded at 2M physical
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 10 Jul 2021 19:48:02 +0000 (22:48 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 31 Jul 2021 13:53:42 +0000 (16:53 +0300)
commite18380e341410ce70d97560a22827591f4b2d373
tree3e179308937e7dea7e3ca3bfda01d8cec1f7513c
parent792b602a337ddc5efaa5e5326d9433fe3da7f303
amd64: do not assume that kernel is loaded at 2M physical

Allow any 2M aligned contiguous location below 4G for the staging
area location.  It should still be mapped by loader at KERNBASE.

The assumption kernel makes about loader->kernel handoff with regard to
the MMU programming are explicitly listed at the beginning of hammer_time(),
where kernphys is calculated.  Now kernphys is the variable instead of
symbol designating the physical address.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31121
sys/amd64/amd64/machdep.c
sys/amd64/amd64/pmap.c
sys/amd64/include/md_var.h
sys/amd64/include/vmparam.h
sys/conf/ldscript.amd64