arm_linux.S for cache ops and random fixes

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@587 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-09-14 19:41:41 +00:00
parent f11bad75ed
commit 095a240bd9
11 changed files with 50 additions and 35 deletions

26
common/arm_linux.S Normal file
View file

@ -0,0 +1,26 @@
@ vim:filetype=armasm
#include <sys/syscall.h>
.global cache_flush_d_inval_i @ const void *start_addr, const void *end_addr
cache_flush_d_inval_i:
mov r2, #0
#ifdef __ARM_EABI__
/* EABI version */
str r7, [sp, #-4]!
mov r7, #(__ARM_NR_cacheflush & 0xff)
#if (__ARM_NR_cacheflush & 0x00ff00)
orr r7, r7, #(__ARM_NR_cacheflush & 0x00ff00)
#endif
#if (__ARM_NR_cacheflush & 0xff0000)
orr r7, r7, #(__ARM_NR_cacheflush & 0xff0000)
#endif
swi 0
ldr r7, [sp], #4
#else
/* OABI */
swi __ARM_NR_cacheflush
#endif
bx lr

1
common/arm_linux.h Normal file
View file

@ -0,0 +1 @@
extern void cache_flush_d_inval_i(const void *start_addr, const void *end_addr);

View file

@ -10,5 +10,4 @@ void vidCpyM2_40col(void *dest, void *src);
void vidCpyM2_32col(void *dest, void *src);
void vidCpyM2_32col_nobord(void *dest, void *src);
void spend_cycles(int c); // utility
void flushcache(void *beginning_addr, void *end_addr, unsigned int flags);

View file

@ -214,10 +214,3 @@ spend_cycles:
bx lr
.global flushcache
flushcache:
swi #0x9f0002
mov pc, lr