git: 9a53391b601d - stable/14 - riscv: adjust physmem reservation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 17:56:45 UTC
The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9a53391b601dd19dec2be2b68e356e2378deb085 commit 9a53391b601dd19dec2be2b68e356e2378deb085 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-06-14 17:57:28 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-06-27 17:56:23 +0000 riscv: adjust physmem reservation Make sure we do this BEFORE pmap_bootstrap(). Reviewed by: markj, jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45325 (cherry picked from commit 0e4e77072f65df71644140e41229b868a73f3371) --- sys/riscv/riscv/machdep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 5872ef9f94ac..61f86f9e6958 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -550,10 +550,6 @@ initriscv(struct riscv_bootparams *rvbp) cache_setup(); - /* Bootstrap enough of pmap to enter the kernel proper */ - kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); - #ifdef FDT /* * XXX: Unconditionally exclude the lowest 2MB of physical memory, as @@ -566,6 +562,11 @@ initriscv(struct riscv_bootparams *rvbp) physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif + + /* Bootstrap enough of pmap to enter the kernel proper */ + kernlen = (lastaddr - KERNBASE); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); + physmem_init_kernel_globals(); /* Establish static device mappings */