diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-07-02 10:42:23 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-07-02 10:42:23 +0000 |
commit | 3233b1302ce202f3407f6d6d4aa28c57afbf92b9 (patch) | |
tree | f13674b5954d053c395f17464c6639b1b63510ea /sys/arch/riscv64/include | |
parent | a0ce04b9376e9982305e573c75a9095878d4c3d6 (diff) |
Cleanup early bootstrap code. This mostly realigns the code with the
FreeBSD code from which it was derived. In particular, it uses the same
trick to switch page tables as FreeBSD, which is what we use to spin up
the secondary CPUs already. This avoids having to install a temporary
1:1 mapping.
ok mlarkin@
Diffstat (limited to 'sys/arch/riscv64/include')
-rw-r--r-- | sys/arch/riscv64/include/bootconfig.h | 26 | ||||
-rw-r--r-- | sys/arch/riscv64/include/vmparam.h | 3 |
2 files changed, 4 insertions, 25 deletions
diff --git a/sys/arch/riscv64/include/bootconfig.h b/sys/arch/riscv64/include/bootconfig.h index 270fd68e0ad..4d6f8ae3ae9 100644 --- a/sys/arch/riscv64/include/bootconfig.h +++ b/sys/arch/riscv64/include/bootconfig.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bootconfig.h,v 1.3 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: bootconfig.h,v 1.4 2021/07/02 10:42:22 kettenis Exp $ */ /*- * Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com> @@ -32,37 +32,17 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #ifndef _MACHINE_BOOTCONFIG_H_ #define _MACHINE_BOOTCONFIG_H_ struct riscv_bootparams { -#if 0 - vaddr_t modulep; -#endif vaddr_t kern_l1pt; /* L1 page table for the kernel */ - uint64_t kern_delta; /* PA - VA */ + paddr_t kern_phys; vaddr_t kern_stack; -#if 0 - void *arg0; // passed to kernel in R0 - void *arg1; // passed to kernel in R1 - void *arg2; // passed to kernel in R2 -#endif vaddr_t dtbp_virt; /* Device tree blob virtual addr */ - vaddr_t dtbp_phys; /* Device tree blob physical addr */ + paddr_t dtbp_phys; /* Device tree blob physical addr */ }; -extern char *boot_file; - -// XXX ??? -extern paddr_t physmap[]; -extern u_int physmap_idx; - -// XXX ??? -vaddr_t fake_preload_metadata(struct riscv_bootparams *rbp); -void initriscv(struct riscv_bootparams *); - #endif /* _MACHINE_BOOTCONFIG_H_ */ diff --git a/sys/arch/riscv64/include/vmparam.h b/sys/arch/riscv64/include/vmparam.h index 22a6fd5c07b..16858dc63c3 100644 --- a/sys/arch/riscv64/include/vmparam.h +++ b/sys/arch/riscv64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.4 2021/06/15 09:52:04 matthieu Exp $ */ +/* $OpenBSD: vmparam.h,v 1.5 2021/07/02 10:42:22 kettenis Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -184,7 +184,6 @@ extern paddr_t dmap_phys_base; extern paddr_t dmap_phys_max; extern vaddr_t dmap_virt_max; extern vaddr_t vm_max_kernel_address; -extern vaddr_t init_pt_va; #endif /* virtual sizes (bytes) for various kernel submaps */ |