diff options
| author | mlelstv <mlelstv@NetBSD.org> | 2022-08-21 14:05:52 +0000 |
|---|---|---|
| committer | mlelstv <mlelstv@NetBSD.org> | 2022-08-21 14:05:52 +0000 |
| commit | dac17ed77ac55cb8ebd2695a535fedf40d7ccc8e (patch) | |
| tree | 402f325d8fd72e2a9fd4395af563e09a6d00ee2b | |
| parent | 5a841dbcb2b6f68ad3779b3619a8fbd38549fd51 (diff) | |
Adapt to pmap/bootspace migrations.
| -rw-r--r-- | sys/arch/amd64/amd64/prekern.c | 5 | ||||
| -rw-r--r-- | sys/arch/amd64/stand/prekern/pdir.h | 6 | ||||
| -rw-r--r-- | sys/arch/amd64/stand/prekern/prekern.h | 34 |
3 files changed, 10 insertions, 35 deletions
diff --git a/sys/arch/amd64/amd64/prekern.c b/sys/arch/amd64/amd64/prekern.c index 950344d6a03..d7d17fc12e0 100644 --- a/sys/arch/amd64/amd64/prekern.c +++ b/sys/arch/amd64/amd64/prekern.c @@ -1,4 +1,4 @@ -/* $NetBSD: prekern.c,v 1.5 2018/08/12 15:31:01 maxv Exp $ */ +/* $NetBSD: prekern.c,v 1.6 2022/08/21 14:05:52 mlelstv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. @@ -40,9 +40,12 @@ #include <uvm/uvm.h> #include <machine/pmap.h> +#include <machine/pmap_private.h> #include <machine/bootinfo.h> #include <machine/cpufunc.h> +#include <x86/bootspace.h> + #include <dev/isa/isareg.h> #include <machine/isa_machdep.h> diff --git a/sys/arch/amd64/stand/prekern/pdir.h b/sys/arch/amd64/stand/prekern/pdir.h index 31e83009f82..ca453cbfab9 100644 --- a/sys/arch/amd64/stand/prekern/pdir.h +++ b/sys/arch/amd64/stand/prekern/pdir.h @@ -1,4 +1,4 @@ -/* $NetBSD: pdir.h,v 1.7 2020/05/23 08:25:32 maxv Exp $ */ +/* $NetBSD: pdir.h,v 1.8 2022/08/21 14:05:52 mlelstv Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -70,7 +70,3 @@ #define VA_SIGN_MASK 0xffff000000000000 #define VA_SIGN_NEG(va) ((va) | VA_SIGN_MASK) -#define pl1_i(va) (((va) & L1_FRAME) >> L1_SHIFT) -#define pl2_i(va) (((va) & L2_FRAME) >> L2_SHIFT) -#define pl3_i(va) (((va) & L3_FRAME) >> L3_SHIFT) -#define pl4_i(va) (((va) & L4_FRAME) >> L4_SHIFT) diff --git a/sys/arch/amd64/stand/prekern/prekern.h b/sys/arch/amd64/stand/prekern/prekern.h index 64530e49181..440a773d7a2 100644 --- a/sys/arch/amd64/stand/prekern/prekern.h +++ b/sys/arch/amd64/stand/prekern/prekern.h @@ -1,4 +1,4 @@ -/* $NetBSD: prekern.h,v 1.24 2021/05/04 21:09:16 khorben Exp $ */ +/* $NetBSD: prekern.h,v 1.25 2022/08/21 14:05:52 mlelstv Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -32,8 +32,12 @@ #include <sys/param.h> #include <sys/stdbool.h> #include <lib/libkern/libkern.h> + +#include <machine/pmap.h> #include <machine/pte.h> +#include <x86/bootspace.h> + #include "pdir.h" #include "redef.h" @@ -59,34 +63,6 @@ typedef enum /* -------------------------------------------------------------------------- */ -#define BTSEG_NONE 0 -#define BTSEG_TEXT 1 -#define BTSEG_RODATA 2 -#define BTSEG_DATA 3 -#define BTSPACE_NSEGS 64 -struct bootspace { - struct { - vaddr_t va; - paddr_t pa; - size_t sz; - } head; - struct { - int type; - vaddr_t va; - paddr_t pa; - size_t sz; - } segs[BTSPACE_NSEGS]; - struct { - vaddr_t va; - paddr_t pa; - size_t sz; - } boot; - vaddr_t spareva; - vaddr_t pdir; - vaddr_t smodule; - vaddr_t emodule; -}; - /* console.c */ void init_cons(void); void print_ext(int, char *); |
