2 Copyright © 2010-2014, The AROS Development Team. All rights reserved.
10 static unsigned char __tmpspace
[BOOT_TMP_SIZE
];
11 static unsigned char *first_free
= &__tmpspace
[0];
12 static unsigned long free_memory
= BOOT_TMP_SIZE
;
14 void arm_flush_cache(uint32_t addr
, uint32_t length
)
18 __asm__
__volatile__("mcr p15, 0, %0, c7, c14, 1"::"r"(addr
));
22 __asm__
__volatile__("mcr p15, 0, %0, c7, c10, 4"::"r"(addr
));
25 void arm_icache_invalidate(uint32_t addr
, uint32_t length
)
29 __asm__
__volatile__("mcr p15, 0, %0, c7, c5, 1"::"r"(addr
));
33 __asm__
__volatile__("mcr p15, 0, %0, c7, c10, 4"::"r"(addr
));
36 void arm_dcache_invalidate(uint32_t addr
, uint32_t length
)
40 __asm__
__volatile__("mcr p15, 0, %0, c7, c6, 1"::"r"(addr
));
44 __asm__
__volatile__("mcr p15, 0, %0, c7, c10, 4"::"r"(addr
));
47 void *malloc(size_t size
)
51 size
= (size
+ 15) & ~15;
53 if (size
<= free_memory
)
71 return BOOT_TMP_SIZE
- free_memory
;
74 int32_t strlen(const char *c
)
83 const char *remove_path(const char *in
)
85 const char *p
= &in
[strlen(in
)-1];
86 while (p
> in
&& p
[-1] != '/' && p
[-1] != ':') p
--;