summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/genassym.c5
-rw-r--r--sys/amd64/amd64/locore.S27
-rw-r--r--sys/amd64/amd64/locore.s27
-rw-r--r--sys/i386/i386/genassym.c5
-rw-r--r--sys/i386/i386/locore.s27
5 files changed, 83 insertions, 8 deletions
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index faffe5168d28..31e5702070e5 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
- * $Id: genassym.c,v 1.60 1998/08/18 07:46:58 msmith Exp $
+ * $Id: genassym.c,v 1.61 1998/09/24 10:22:21 bde Exp $
*/
#include "opt_vm86.h"
@@ -189,6 +189,9 @@ main()
printf("#define\tBI_SIZE %#x\n", OS(bootinfo, bi_size));
printf("#define\tBI_SYMTAB %#x\n", OS(bootinfo, bi_symtab));
printf("#define\tBI_ESYMTAB %#x\n", OS(bootinfo, bi_esymtab));
+ printf("#define\tBI_KERNEND %#x\n", OS(bootinfo, bi_kernend));
+ printf("#define\tBI_ENVP %#x\n", OS(bootinfo, bi_envp));
+ printf("#define\tBI_MODULEP %#x\n", OS(bootinfo, bi_modulep));
printf("#define\tGD_SIZEOF %u\n", sizeof(struct globaldata));
printf("#define\tGD_CURPROC %#x\n", OS(globaldata, curproc));
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 9c3251787d63..0d6ba182e031 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
+ * $Id: locore.s,v 1.113 1998/09/28 03:26:22 tegge Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -569,6 +569,22 @@ got_common_bi_size:
rep
movsb
+ /*
+ * Fix up the module data and kernel environment pointers.
+ */
+ movl R(_bootinfo+BI_ENVP),%eax
+ testl %eax,%eax
+ je no_envp
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_ENVP)
+no_envp:
+ movl R(_bootinfo+BI_MODULEP),%eax
+ testl %eax,%eax
+ je no_modulep
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_MODULEP)
+no_modulep:
+
#ifdef NFS_ROOT
#ifndef BOOTP_NFSV3
/*
@@ -756,7 +772,7 @@ create_pagetables:
/* Find end of kernel image (rounded up to a page boundary). */
movl $R(_end),%esi
-/* include symbols in "kernel image" if they are loaded and useful */
+/* include symbols if loaded and useful */
#ifdef DDB
movl R(_bootinfo+BI_ESYMTAB),%edi
testl %edi,%edi
@@ -768,6 +784,13 @@ create_pagetables:
over_symalloc:
#endif
+/* If we are told where the end of the kernel space is, believe it. */
+ movl R(_bootinfo+BI_KERNEND),%edi
+ testl %edi,%edi
+ je no_kernend
+ movl %edi,%esi
+no_kernend:
+
addl $PAGE_MASK,%esi
andl $~PAGE_MASK,%esi
movl %esi,R(_KERNend) /* save end of kernel */
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 9c3251787d63..0d6ba182e031 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
+ * $Id: locore.s,v 1.113 1998/09/28 03:26:22 tegge Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -569,6 +569,22 @@ got_common_bi_size:
rep
movsb
+ /*
+ * Fix up the module data and kernel environment pointers.
+ */
+ movl R(_bootinfo+BI_ENVP),%eax
+ testl %eax,%eax
+ je no_envp
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_ENVP)
+no_envp:
+ movl R(_bootinfo+BI_MODULEP),%eax
+ testl %eax,%eax
+ je no_modulep
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_MODULEP)
+no_modulep:
+
#ifdef NFS_ROOT
#ifndef BOOTP_NFSV3
/*
@@ -756,7 +772,7 @@ create_pagetables:
/* Find end of kernel image (rounded up to a page boundary). */
movl $R(_end),%esi
-/* include symbols in "kernel image" if they are loaded and useful */
+/* include symbols if loaded and useful */
#ifdef DDB
movl R(_bootinfo+BI_ESYMTAB),%edi
testl %edi,%edi
@@ -768,6 +784,13 @@ create_pagetables:
over_symalloc:
#endif
+/* If we are told where the end of the kernel space is, believe it. */
+ movl R(_bootinfo+BI_KERNEND),%edi
+ testl %edi,%edi
+ je no_kernend
+ movl %edi,%esi
+no_kernend:
+
addl $PAGE_MASK,%esi
andl $~PAGE_MASK,%esi
movl %esi,R(_KERNend) /* save end of kernel */
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index faffe5168d28..31e5702070e5 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
- * $Id: genassym.c,v 1.60 1998/08/18 07:46:58 msmith Exp $
+ * $Id: genassym.c,v 1.61 1998/09/24 10:22:21 bde Exp $
*/
#include "opt_vm86.h"
@@ -189,6 +189,9 @@ main()
printf("#define\tBI_SIZE %#x\n", OS(bootinfo, bi_size));
printf("#define\tBI_SYMTAB %#x\n", OS(bootinfo, bi_symtab));
printf("#define\tBI_ESYMTAB %#x\n", OS(bootinfo, bi_esymtab));
+ printf("#define\tBI_KERNEND %#x\n", OS(bootinfo, bi_kernend));
+ printf("#define\tBI_ENVP %#x\n", OS(bootinfo, bi_envp));
+ printf("#define\tBI_MODULEP %#x\n", OS(bootinfo, bi_modulep));
printf("#define\tGD_SIZEOF %u\n", sizeof(struct globaldata));
printf("#define\tGD_CURPROC %#x\n", OS(globaldata, curproc));
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 9c3251787d63..0d6ba182e031 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.112 1998/08/03 21:31:32 msmith Exp $
+ * $Id: locore.s,v 1.113 1998/09/28 03:26:22 tegge Exp $
*
* originally from: locore.s, by William F. Jolitz
*
@@ -569,6 +569,22 @@ got_common_bi_size:
rep
movsb
+ /*
+ * Fix up the module data and kernel environment pointers.
+ */
+ movl R(_bootinfo+BI_ENVP),%eax
+ testl %eax,%eax
+ je no_envp
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_ENVP)
+no_envp:
+ movl R(_bootinfo+BI_MODULEP),%eax
+ testl %eax,%eax
+ je no_modulep
+ movl $KERNBASE,%eax
+ addl %eax,R(_bootinfo+BI_MODULEP)
+no_modulep:
+
#ifdef NFS_ROOT
#ifndef BOOTP_NFSV3
/*
@@ -756,7 +772,7 @@ create_pagetables:
/* Find end of kernel image (rounded up to a page boundary). */
movl $R(_end),%esi
-/* include symbols in "kernel image" if they are loaded and useful */
+/* include symbols if loaded and useful */
#ifdef DDB
movl R(_bootinfo+BI_ESYMTAB),%edi
testl %edi,%edi
@@ -768,6 +784,13 @@ create_pagetables:
over_symalloc:
#endif
+/* If we are told where the end of the kernel space is, believe it. */
+ movl R(_bootinfo+BI_KERNEND),%edi
+ testl %edi,%edi
+ je no_kernend
+ movl %edi,%esi
+no_kernend:
+
addl $PAGE_MASK,%esi
andl $~PAGE_MASK,%esi
movl %esi,R(_KERNend) /* save end of kernel */