From 9f6eb8da71946349e99e12217e0b209a643ef6ea Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 9 May 1996 07:16:00 +0000 Subject: [PATCH] Fix brino on my part. _etext doesn't include the padding to a page boundary, which means that it doesn't mark the start of the data section (which is then inaccessible to the programmer ??). Hopefully fixes recent locore reboot problems. --- sys/amd64/amd64/locore.S | 4 +++- sys/amd64/amd64/locore.s | 4 +++- sys/i386/i386/locore.s | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index de52777ec131..f1ac3c5bba43 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.69 1996/05/02 14:19:43 phk Exp $ + * $Id: locore.s,v 1.70 1996/05/02 22:24:55 phk Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -740,6 +740,8 @@ over_symalloc: /* Map read-write, data, bss and symbols */ movl $R(_etext),%eax + addl $PAGE_MASK, %eax + andl $~PAGE_MASK, %eax map_read_write: movl R(_KERNend),%ecx subl %eax,%ecx diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index de52777ec131..f1ac3c5bba43 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.69 1996/05/02 14:19:43 phk Exp $ + * $Id: locore.s,v 1.70 1996/05/02 22:24:55 phk Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -740,6 +740,8 @@ over_symalloc: /* Map read-write, data, bss and symbols */ movl $R(_etext),%eax + addl $PAGE_MASK, %eax + andl $~PAGE_MASK, %eax map_read_write: movl R(_KERNend),%ecx subl %eax,%ecx diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index de52777ec131..f1ac3c5bba43 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.69 1996/05/02 14:19:43 phk Exp $ + * $Id: locore.s,v 1.70 1996/05/02 22:24:55 phk Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -740,6 +740,8 @@ over_symalloc: /* Map read-write, data, bss and symbols */ movl $R(_etext),%eax + addl $PAGE_MASK, %eax + andl $~PAGE_MASK, %eax map_read_write: movl R(_KERNend),%ecx subl %eax,%ecx