Linux/ARM fixes with help from doublec
parent
af83b87b7d
commit
0051acbb2e
|
@ -1,2 +1,3 @@
|
|||
include vm/Config.linux
|
||||
include vm/Config.arm
|
||||
PLAF_DLL_OBJS += vm/os-linux-arm.o
|
||||
|
|
|
@ -21,5 +21,5 @@ endif
|
|||
# LINKER = gcc -shared -o
|
||||
# LINK_WITH_ENGINE = '-Wl,-rpath,$$ORIGIN' -lfactor
|
||||
|
||||
LINKER = ar rcs
|
||||
LINKER = $(AR) rcs
|
||||
LINK_WITH_ENGINE = -Wl,--whole-archive -lfactor -Wl,-no-whole-archive
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#include "master.h"
|
||||
|
||||
void flush_icache(CELL start, CELL len)
|
||||
{
|
||||
int result;
|
||||
|
||||
/* XXX: why doesn't this work on Nokia n800? It should behave
|
||||
identically to the below assembly. */
|
||||
/* result = syscall(__ARM_NR_cacheflush,start,start + len,0); */
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov r0, %1\n"
|
||||
"sub r1, %2, #1\n"
|
||||
"mov r2, #0\n"
|
||||
"swi " __sys1(__ARM_NR_cacheflush) "\n"
|
||||
"mov %0, r0\n"
|
||||
: "=r" (result)
|
||||
: "r" (start), "r" (start + len)
|
||||
: "r0","r1","r2");
|
||||
|
||||
if(result < 0)
|
||||
critical_error("flush_icache() failed",result);
|
||||
}
|
|
@ -8,7 +8,7 @@ INLINE void *ucontext_stack_pointer(void *uap)
|
|||
return (void *)ucontext->uc_mcontext.arm_sp;
|
||||
}
|
||||
|
||||
INLINE void flush_icache(CELL start, CELL len)
|
||||
{
|
||||
syscall(__ARM_NR_cacheflush,start,start + len,0);
|
||||
}
|
||||
#define UAP_PROGRAM_COUNTER(ucontext) \
|
||||
(((ucontext_t *)(ucontext))->uc_mcontext.arm_pc)
|
||||
|
||||
void flush_icache(CELL start, CELL len);
|
||||
|
|
Loading…
Reference in New Issue