mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
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:
parent
f11bad75ed
commit
095a240bd9
11 changed files with 50 additions and 35 deletions
26
common/arm_linux.S
Normal file
26
common/arm_linux.S
Normal 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
1
common/arm_linux.h
Normal file
|
@ -0,0 +1 @@
|
|||
extern void cache_flush_d_inval_i(const void *start_addr, const void *end_addr);
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -214,10 +214,3 @@ spend_cycles:
|
|||
bx lr
|
||||
|
||||
|
||||
.global flushcache
|
||||
|
||||
flushcache:
|
||||
swi #0x9f0002
|
||||
mov pc, lr
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue