diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-13 04:03:31 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-08-13 04:03:31 +0000 |
commit | 8f1e2faf3b28ce1146c187c22314e213eabafc2e (patch) | |
tree | 6d75e7a50687e28224d41f0771a626512338f7bc /sys/arch/i386/stand/libsa | |
parent | dc838e4b20aca8fda46e1433689baea44e2e37dc (diff) |
split off START into LINKADDR and LOADADDR (we will need reloctable boot)
BOOTREL as a linear address, not segment one
more heap (;
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r-- | sys/arch/i386/stand/libsa/Makefile | 10 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/gidt.S | 24 |
2 files changed, 17 insertions, 17 deletions
diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile index 6495768a61d..db3741a1161 100644 --- a/sys/arch/i386/stand/libsa/Makefile +++ b/sys/arch/i386/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 1997/08/13 03:28:11 mickey Exp $ +# $OpenBSD: Makefile,v 1.23 1997/08/13 04:03:30 mickey Exp $ LIB= sa @@ -13,9 +13,9 @@ DIR_KERN=$S/lib/libkern #AS+= -a # i386 stuff (so, it will possibly load in the same 64k) -SRCS= unixsys.S gidt.S debug_i386.S \ - bioscons.c dev_i386.c exec_i386.c biosdev.c gateA20.c memprobe.c \ - time.c alloca.S machdep.c +SRCS= gidt.S debug_i386.S alloca.S \ + machdep.c dev_i386.c exec_i386.c biosdev.c gateA20.c memprobe.c \ + bioscons.c time.c # stand routines SRCS+= alloc.c exit.c exec.c getfile.c gets.c globals.c strcmp.c strlen.c \ @@ -56,5 +56,5 @@ install: .include <bsd.lib.mk> -CPPFLAGS+=-DSTART=${START} -DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS} +CPPFLAGS+=-DLINKADDR=${LINKADDR} -DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS} CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD diff --git a/sys/arch/i386/stand/libsa/gidt.S b/sys/arch/i386/stand/libsa/gidt.S index ab90cc44b22..daefdf569a1 100644 --- a/sys/arch/i386/stand/libsa/gidt.S +++ b/sys/arch/i386/stand/libsa/gidt.S @@ -1,4 +1,4 @@ -/* $OpenBSD: gidt.S,v 1.13 1997/08/02 22:23:09 mickey Exp $ */ +/* $OpenBSD: gidt.S,v 1.14 1997/08/13 04:03:30 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -59,7 +59,7 @@ movl %ax, %ds ; \ movl %ax, %es ; \ data32 ; \ - movl $(0xb8000 - START), %eax ; \ + movl $(0xb8000 - LINKADDR), %eax ; \ data32 ; \ addr32 ; \ movl $0x4f314f30, (%eax) @@ -91,7 +91,7 @@ \ /* ljmp $S16TEXT, $1f */; \ .byte 0xea; /* Change to 16bit mode */ \ - .long 1f - START; \ + .long 1f - LINKADDR; \ .word S16TEXT; \ 1: \ gidt_debug1; \ @@ -101,10 +101,10 @@ andl $~CR0_PE, %eax; \ movl %eax, %cr0; \ \ - /* ljmp (START >> 4), $1f */; \ + /* ljmp (LINKADDR >> 4), $1f */; \ .byte 0xea; /* load real mode cs:ip */ \ .word 1f; \ - .word (START >> 4); \ + .word (LINKADDR >> 4); \ 1: \ xorl %eax, %eax; /* setup: %ds, %es, %ss */ \ movl %ax, %ds; \ @@ -207,7 +207,7 @@ pmm_init: .align 3 idt: #define idte(e) \ - .word IPROC(e), S32TEXT, (0x80|SDT_SYS386TGT) << 8, (START >> 16) + .word IPROC(e), S32TEXT, (0x80|SDT_SYS386TGT) << 8, (LINKADDR >> 16) /* internal (0-31) */ idte(de); idte(db); idte(nmi); idte(bp); idte(of); idte(br) idte(ud); idte(nm); idte(df); idte(fo); idte(ts); idte(np) @@ -258,18 +258,18 @@ gdt: .byte 0 # hibase /* 0x18 : 16 bit code */ .word 0xFFFF # lolimit - .word (START & 0xffff) # lobase - .byte (START >> 16) & 0xff # midbase + .word (LINKADDR & 0xffff) # lobase + .byte (LINKADDR >> 16) & 0xff # midbase .byte SDT_MEMERA | 0 | 0x80 # RXAC, dpl = 0, present .byte 0xf | 0 | 0 | 0 # hilimit, xx, 16bit, byte granularity - .byte (START >> 20) & 0xff # hibase + .byte (LINKADDR >> 20) & 0xff # hibase /* 0x20 : 16 bit data */ .word 0xFFFF # lolimit - .word (START & 0xffff) # lobase - .byte (START >> 16) & 0xff # midbase + .word (LINKADDR & 0xffff) # lobase + .byte (LINKADDR >> 16) & 0xff # midbase .byte SDT_MEMRWA | 0 | 0x80 # RXAC, dpl = 0, present .byte 0xf | 0 | 0 | 0 # hilimit, xx, 16bit, byte granularity - .byte (START >> 20) & 0xff # hibase + .byte (LINKADDR >> 20) & 0xff # hibase Gdtr: .word . - gdt - 1 .long gdt |