xenv: init g_kbdfd, as 0 is stdin
[libpicofe.git] / common / arm_linux.S
1 @ vim:filetype=armasm
2 #include <sys/syscall.h>
3
4
5 .global cache_flush_d_inval_i @ const void *start_addr, const void *end_addr
6
7 cache_flush_d_inval_i:
8     mov     r2, #0
9 #ifdef __ARM_EABI__
10     /* EABI version */
11     str     r7, [sp, #-4]!
12     mov     r7, #(__ARM_NR_cacheflush & 0xff)
13 #if (__ARM_NR_cacheflush & 0x00ff00)
14     orr     r7, r7, #(__ARM_NR_cacheflush & 0x00ff00)
15 #endif
16 #if (__ARM_NR_cacheflush & 0xff0000)
17     orr     r7, r7, #(__ARM_NR_cacheflush & 0xff0000)
18 #endif
19     swi     0
20     ldr     r7, [sp], #4
21 #else
22     /* OABI */
23     swi     __ARM_NR_cacheflush
24 #endif
25     bx      lr
26