git: 18051cc694be - main - riscv: drop l1pt argument from pmap_bootstrap()

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 20 Jun 2024 19:00:23 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=18051cc694be7949e289c10e696dc1d56b8b69ca

commit 18051cc694be7949e289c10e696dc1d56b8b69ca
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2024-06-20 18:32:54 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-06-20 18:33:19 +0000

    riscv: drop l1pt argument from pmap_bootstrap()
    
    And from struct riscv_bootparams. It is no longer needed.
    
    Reviewed by:    br, markj
    MFC after:      1 month
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D45470
---
 sys/riscv/include/machdep.h | 1 -
 sys/riscv/include/pmap.h    | 2 +-
 sys/riscv/riscv/genassym.c  | 1 -
 sys/riscv/riscv/machdep.c   | 2 +-
 sys/riscv/riscv/pmap.c      | 4 ++--
 5 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys/riscv/include/machdep.h b/sys/riscv/include/machdep.h
index 581749f44d76..cfe95e5d81aa 100644
--- a/sys/riscv/include/machdep.h
+++ b/sys/riscv/include/machdep.h
@@ -36,7 +36,6 @@
 #define	_MACHINE_MACHDEP_H_
 
 struct riscv_bootparams {
-	vm_offset_t	kern_l1pt;	/* Kernel L1 base */
 	vm_offset_t	kern_phys;	/* Kernel base (physical) addr */
 	vm_offset_t	kern_stack;
 	vm_offset_t	dtbp_phys;	/* Device tree blob physical addr */
diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h
index 8123231144bb..74e15d965826 100644
--- a/sys/riscv/include/pmap.h
+++ b/sys/riscv/include/pmap.h
@@ -133,7 +133,7 @@ struct thread;
 
 void	pmap_activate_boot(pmap_t);
 void	pmap_activate_sw(struct thread *);
-void	pmap_bootstrap(vm_offset_t, vm_paddr_t, vm_size_t);
+void	pmap_bootstrap(vm_paddr_t, vm_size_t);
 int	pmap_change_attr(vm_offset_t va, vm_size_t size, int mode);
 void	pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode);
 void	pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t);
diff --git a/sys/riscv/riscv/genassym.c b/sys/riscv/riscv/genassym.c
index 105e17e679b7..637510db242e 100644
--- a/sys/riscv/riscv/genassym.c
+++ b/sys/riscv/riscv/genassym.c
@@ -99,7 +99,6 @@ ASSYM(TF_SCAUSE, offsetof(struct trapframe, tf_scause));
 ASSYM(TF_SSTATUS, offsetof(struct trapframe, tf_sstatus));
 
 ASSYM(RISCV_BOOTPARAMS_SIZE, sizeof(struct riscv_bootparams));
-ASSYM(RISCV_BOOTPARAMS_KERN_L1PT, offsetof(struct riscv_bootparams, kern_l1pt));
 ASSYM(RISCV_BOOTPARAMS_KERN_PHYS, offsetof(struct riscv_bootparams, kern_phys));
 ASSYM(RISCV_BOOTPARAMS_KERN_STACK, offsetof(struct riscv_bootparams,
     kern_stack));
diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c
index 0d04bf0d3544..ffb29e53b88e 100644
--- a/sys/riscv/riscv/machdep.c
+++ b/sys/riscv/riscv/machdep.c
@@ -567,7 +567,7 @@ initriscv(struct riscv_bootparams *rvbp)
 
 	/* Bootstrap enough of pmap to enter the kernel proper */
 	kernlen = (lastaddr - KERNBASE);
-	pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen);
+	pmap_bootstrap(rvbp->kern_phys, kernlen);
 
 	physmem_init_kernel_globals();
 
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
index 8839a944de32..377d038a9a8a 100644
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -797,7 +797,7 @@ pmap_create_pagetables(vm_paddr_t kernstart, vm_size_t kernlen,
  *	Bootstrap the system enough to run with virtual memory.
  */
 void
-pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen)
+pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen)
 {
 	vm_paddr_t freemempos, pa;
 	vm_paddr_t root_pt_phys;
@@ -806,7 +806,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen)
 	pt_entry_t *pte;
 	int i;
 
-	printf("pmap_bootstrap %lx %lx %lx\n", l1pt, kernstart, kernlen);
+	printf("pmap_bootstrap %lx %lx\n", kernstart, kernlen);
 
 	PMAP_LOCK_INIT(kernel_pmap);
 	TAILQ_INIT(&kernel_pmap->pm_pvchunk);