From: Rafal Jaworowski Date: Fri, 23 Jan 2009 13:27:16 +0100 Subject: [U-Boot] [PATCH 2/4] API: Provide syscall entry point for the ARM architecture. In-Reply-To: <12327136383163-git-send-email-raj@semihalf.com> References: <12327136383163-git-send-email-raj@semihalf.com> Message-ID: <12327136383856-git-send-email-raj@semihalf.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Rafal Czubak Acked-by: Rafal Jaworowski --- api_examples/Makefile | 7 +++---- api_examples/crt0.S | 17 ++++++++++++++++- lib_arm/board.c | 5 +++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/api_examples/Makefile b/api_examples/Makefile index 5666f48..4c01437 100644 --- a/api_examples/Makefile +++ b/api_examples/Makefile @@ -23,10 +23,9 @@ ifeq ($(ARCH),ppc) LOAD_ADDR = 0x40000 endif - -#ifeq ($(ARCH),arm) -#LOAD_ADDR = 0xc100000 -#endif +ifeq ($(ARCH),arm) +LOAD_ADDR = 0x1000000 +endif include $(TOPDIR)/config.mk diff --git a/api_examples/crt0.S b/api_examples/crt0.S index 3129a07..6daf127 100644 --- a/api_examples/crt0.S +++ b/api_examples/crt0.S @@ -26,7 +26,6 @@ #if defined(CONFIG_PPC) .text - .globl _start _start: lis %r11, search_hint at ha @@ -42,6 +41,22 @@ syscall: lwz %r11, 0(%r11) mtctr %r11 bctr + +#elif defined(CONFIG_ARM) + + .text + .globl _start +_start: + ldr ip, =search_hint + str sp, [ip] + b main + + + .globl syscall +syscall: + ldr ip, =syscall_ptr + ldr pc, [ip] + #else #error No support for this arch! #endif diff --git a/lib_arm/board.c b/lib_arm/board.c index 2358beb..4cb3f2e 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -404,6 +404,11 @@ void start_armboot (void) jumptable_init (); +#if defined(CONFIG_API) + /* Initialize API */ + api_init (); +#endif + console_init_r (); /* fully init console as a device */ #if defined(CONFIG_MISC_INIT_R) -- 1.5.2.2