diff options
Diffstat (limited to 'sys/boot/powerpc/loader')
-rw-r--r-- | sys/boot/powerpc/loader/Makefile | 6 | ||||
-rw-r--r-- | sys/boot/powerpc/loader/conf.c | 10 | ||||
-rw-r--r-- | sys/boot/powerpc/loader/start.c | 8 |
3 files changed, 18 insertions, 6 deletions
diff --git a/sys/boot/powerpc/loader/Makefile b/sys/boot/powerpc/loader/Makefile index cd8ccaf..045f190 100644 --- a/sys/boot/powerpc/loader/Makefile +++ b/sys/boot/powerpc/loader/Makefile @@ -11,6 +11,10 @@ INSTALLFLAGS= -b LOADER_DISK_SUPPORT?= yes LOADER_NET_SUPPORT?= yes +# load address +RELOC?= 0x6c0000 +CFLAGS+= -DRELOC=${RELOC} + # architecture-specific loader code SRCS= conf.c @@ -45,7 +49,7 @@ CFLAGS+= -I${.CURDIR}/../../.. -I. CLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym ${BASE}.help CFLAGS+= -Wall -LDFLAGS= -nostdlib -static -Ttext 6c0000 +LDFLAGS= -nostdlib -static -Ttext ${RELOC} # OpenFirmware standalone support library LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a diff --git a/sys/boot/powerpc/loader/conf.c b/sys/boot/powerpc/loader/conf.c index 81ccbe7..273815a 100644 --- a/sys/boot/powerpc/loader/conf.c +++ b/sys/boot/powerpc/loader/conf.c @@ -27,7 +27,9 @@ */ #include <stand.h> +#include "bootstrap.h" #include "libofw.h" +#include "openfirm.h" #if defined(LOADER_NET_SUPPORT) #include "dev_net.h" @@ -82,10 +84,9 @@ struct netif_driver *netif_drivers[] = { * Sort formats so that those that can detect based on arguments * rather than reading the file go first. */ -extern struct file_format powerpc_elf; struct file_format *file_formats[] = { -/* &powerpc_elf,*/ + &ofw_elf, NULL }; @@ -101,3 +102,8 @@ struct console *consoles[] = { &ofwconsole, NULL }; + +/* + * reloc - our load address + */ +vm_offset_t reloc = RELOC; diff --git a/sys/boot/powerpc/loader/start.c b/sys/boot/powerpc/loader/start.c index a9aef2a..9f37ce0 100644 --- a/sys/boot/powerpc/loader/start.c +++ b/sys/boot/powerpc/loader/start.c @@ -37,8 +37,6 @@ void startup(void *, int, int (*)(void *), char *, int); -static int stack[8192/4 + 4]; - #ifdef XCOFF_GLUE asm(" .text @@ -48,7 +46,11 @@ _entry: "); #endif -asm(" +__asm(" + .data +stack: + .space 16388 + .text .globl _start _start: |