Module Name: src Committed By: mlelstv Date: Sun Aug 21 14:05:52 UTC 2022
Modified Files: src/sys/arch/amd64/amd64: prekern.c src/sys/arch/amd64/stand/prekern: pdir.h prekern.h Log Message: Adapt to pmap/bootspace migrations. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/amd64/prekern.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/stand/prekern/pdir.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/stand/prekern/prekern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/amd64/prekern.c diff -u src/sys/arch/amd64/amd64/prekern.c:1.5 src/sys/arch/amd64/amd64/prekern.c:1.6 --- src/sys/arch/amd64/amd64/prekern.c:1.5 Sun Aug 12 15:31:01 2018 +++ src/sys/arch/amd64/amd64/prekern.c Sun Aug 21 14:05:52 2022 @@ -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> Index: src/sys/arch/amd64/stand/prekern/pdir.h diff -u src/sys/arch/amd64/stand/prekern/pdir.h:1.7 src/sys/arch/amd64/stand/prekern/pdir.h:1.8 --- src/sys/arch/amd64/stand/prekern/pdir.h:1.7 Sat May 23 08:25:32 2020 +++ src/sys/arch/amd64/stand/prekern/pdir.h Sun Aug 21 14:05:52 2022 @@ -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) Index: src/sys/arch/amd64/stand/prekern/prekern.h diff -u src/sys/arch/amd64/stand/prekern/prekern.h:1.24 src/sys/arch/amd64/stand/prekern/prekern.h:1.25 --- src/sys/arch/amd64/stand/prekern/prekern.h:1.24 Tue May 4 21:09:16 2021 +++ src/sys/arch/amd64/stand/prekern/prekern.h Sun Aug 21 14:05:52 2022 @@ -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 *);