diff --git a/build/jam/board/sam460ex/BoardSetup b/build/jam/board/sam460ex/BoardSetup index d634371799..e80a3e0246 100644 --- a/build/jam/board/sam460ex/BoardSetup +++ b/build/jam/board/sam460ex/BoardSetup @@ -13,8 +13,9 @@ HAIKU_BOOT_PLATFORM = u-boot ; # load address for haiku_loader HAIKU_BOARD_LOADER_BASE = 0x00000000 ; # entry points (raw binary, and netbsd loader emulation) -HAIKU_BOARD_LOADER_ENTRY_RAW = 0x00000000 ; -HAIKU_BOARD_LOADER_ENTRY_NBSD = 0x00000008 ; +HAIKU_BOARD_LOADER_ENTRY_LINUX = 0x00000000 ; +#HAIKU_BOARD_LOADER_ENTRY_NBSD = 0x00000008 ; +#HAIKU_BOARD_LOADER_ENTRY_RAW = 0x00000010 ; # load address for haiku_loader uimage # (must be different than real load address) diff --git a/headers/private/system/arch/ppc/asm_defs.h b/headers/private/system/arch/ppc/asm_defs.h new file mode 100644 index 0000000000..798fa02793 --- /dev/null +++ b/headers/private/system/arch/ppc/asm_defs.h @@ -0,0 +1,17 @@ +/* + * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef SYSTEM_ARCH_X86_ASM_DEFS_H +#define SYSTEM_ARCH_X86_ASM_DEFS_H + + +#define SYMBOL(name) .global name; name +#define SYMBOL_END(name) 1: .size name, 1b - name +#define STATIC_FUNCTION(name) .type name, @function; name +#define FUNCTION(name) .global name; .type name, @function; name +#define FUNCTION_END(name) 1: .size name, 1b - name + + +#endif /* SYSTEM_ARCH_X86_ASM_DEFS_H */ + diff --git a/src/system/boot/platform/u-boot/arch/ppc/shell.S b/src/system/boot/platform/u-boot/arch/ppc/shell.S new file mode 100644 index 0000000000..3007373c89 --- /dev/null +++ b/src/system/boot/platform/u-boot/arch/ppc/shell.S @@ -0,0 +1,62 @@ +//#include + +#include + + + .text + +/* + * Entry points to the loader that U-Boot passes control to. + */ + +/* + * called as Linux kernel entry + * *MUST* be first symbol + */ +SYMBOL(_start_linux): +/* + * ELF entry + */ +SYMBOL(_start): + + li %r11, 0 + b _start_common + +SYMBOL_END(_start_linux) +SYMBOL_END(_start) + + + + + +SYMBOL(_start_common): + + lis %r12, gUBootGlobalData@ha + ori %r12, %r12, gUBootGlobalData@l + stw %r2, 0(%r12) + stw %r11, 8(%r12) // gUBootOS + + b start_linux_ppc_fdt + + // return + blr +SYMBOL_END(_start_common) + + +//XXX: doesn't seem to work +//.data + + +SYMBOL(gUBootGlobalData): + .long 0 +SYMBOL_END(gUBootGlobalData) +SYMBOL(gUImage): + .long 0 +SYMBOL_END(gUImage) +SYMBOL(gUBootOS): +//XXX: bug? Using .byte makes the next asm symbol +// to be at the same address +// .byte 0 + .long 0 +SYMBOL_END(gUBootOS) +