Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64 Adapt to pmap/bootspace migrations.



details:   https://anonhg.NetBSD.org/src/rev/376227a55cbc
branches:  trunk
changeset: 369556:376227a55cbc
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Aug 21 14:05:52 2022 +0000

description:
Adapt to pmap/bootspace migrations.

diffstat:

 sys/arch/amd64/amd64/prekern.c         |   5 ++++-
 sys/arch/amd64/stand/prekern/pdir.h    |   6 +-----
 sys/arch/amd64/stand/prekern/prekern.h |  34 +++++-----------------------------
 3 files changed, 10 insertions(+), 35 deletions(-)

diffs (96 lines):

diff -r 1e33ba7e7ab2 -r 376227a55cbc sys/arch/amd64/amd64/prekern.c
--- a/sys/arch/amd64/amd64/prekern.c    Sun Aug 21 13:15:15 2022 +0000
+++ b/sys/arch/amd64/amd64/prekern.c    Sun Aug 21 14:05:52 2022 +0000
@@ -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 -r 1e33ba7e7ab2 -r 376227a55cbc sys/arch/amd64/stand/prekern/pdir.h
--- a/sys/arch/amd64/stand/prekern/pdir.h       Sun Aug 21 13:15:15 2022 +0000
+++ b/sys/arch/amd64/stand/prekern/pdir.h       Sun Aug 21 14:05:52 2022 +0000
@@ -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 -r 1e33ba7e7ab2 -r 376227a55cbc sys/arch/amd64/stand/prekern/prekern.h
--- a/sys/arch/amd64/stand/prekern/prekern.h    Sun Aug 21 13:15:15 2022 +0000
+++ b/sys/arch/amd64/stand/prekern/prekern.h    Sun Aug 21 14:05:52 2022 +0000
@@ -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 @@
 
 /* -------------------------------------------------------------------------- */
 
-#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 *);



Home | Main Index | Thread Index | Old Index