diff options
-rw-r--r-- | sys/arch/amd64/amd64/locore0.S | 10 | ||||
-rw-r--r-- | sys/arch/amd64/include/param.h | 7 |
2 files changed, 6 insertions, 11 deletions
diff --git a/sys/arch/amd64/amd64/locore0.S b/sys/arch/amd64/amd64/locore0.S index 78726334b67..f3ca68dcc87 100644 --- a/sys/arch/amd64/amd64/locore0.S +++ b/sys/arch/amd64/amd64/locore0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore0.S,v 1.13 2019/01/24 00:00:50 deraadt Exp $ */ +/* $OpenBSD: locore0.S,v 1.14 2019/01/24 00:16:15 deraadt Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -156,10 +156,10 @@ start: movw $0x1234,0x472 # warm boot movl 16(%esp), %eax testl %eax,%eax jz 1f - addl $KERNBASE_LO,%eax + addl $(KERNBASE & 0xffffffff),%eax movl $RELOC(esym),%ebp movl %eax,(%ebp) - movl $KERNBASE_HI,4(%ebp) + movl $(KERNBASE >> 16),4(%ebp) 1: movl 24(%esp), %eax movl %eax, RELOC(biosbasemem) @@ -348,7 +348,7 @@ cont: movl RELOC(esym),%eax testl %eax,%eax jz 1f - subl $KERNBASE_LO,%eax /* XXX */ + subl $(KERNBASE & 0xffffffff),%eax /* XXX */ /* Page tables must be after symbols and after kernel image. */ cmpl %eax,%edi jg 1f @@ -382,7 +382,7 @@ cont: /* * Skip the first MB. */ - movl $(KERNTEXTOFF_LO - KERNBASE_LO),%eax + movl $(KERNTEXTOFF - KERNBASE),%eax movl %eax,%ecx shrl $(PGSHIFT-3),%ecx /* ((n >> PGSHIFT) << 3) for # pdes */ addl %ecx,%ebx diff --git a/sys/arch/amd64/include/param.h b/sys/arch/amd64/include/param.h index fd5ab6d727b..ff9a4088a63 100644 --- a/sys/arch/amd64/include/param.h +++ b/sys/arch/amd64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.26 2018/08/25 17:24:22 kettenis Exp $ */ +/* $OpenBSD: param.h,v 1.27 2019/01/24 00:16:15 deraadt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -58,11 +58,6 @@ #ifdef _KERNEL #define KERNTEXTOFF (KERNBASE+0x1000000) /* start of kernel text */ -#define KERNTEXTOFF_HI 0xffffffff -#define KERNTEXTOFF_LO 0x81000000 - -#define KERNBASE_HI 0xffffffff -#define KERNBASE_LO 0x80000000 #define NBPG PAGE_SIZE /* bytes/page */ #define PGSHIFT PAGE_SHIFT /* LOG2(PAGE_SIZE) */ |