소스 검색

API: Provide syscall entry point for the ARM architecture.

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Acked-by: Rafal Jaworowski <raj@semihalf.com>
Rafal Jaworowski 16 년 전
부모
커밋
7fb6c4f9b0
3개의 변경된 파일24개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 4
      api_examples/Makefile
  2. 16 1
      api_examples/crt0.S
  3. 5 0
      lib_arm/board.c

+ 3 - 4
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
 

+ 16 - 1
api_examples/crt0.S

@@ -26,7 +26,6 @@
 #if defined(CONFIG_PPC)
 
 	.text
-
 	.globl _start
 _start:
 	lis	%r11, search_hint@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

+ 5 - 0
lib_arm/board.c

@@ -416,6 +416,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)