* grub-core/kern/arm/cache.c (probe_caches): Move asm part to ...

* grub-core/kern/arm/cache_armv6.S: ... here. This allows this
	asm to stay in arm even if surrounding is thumb.
This commit is contained in:
Vladimir Serbinenko 2013-11-13 09:58:52 +01:00
parent 5e77d9cfc1
commit 2bdd07195c
3 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/arm/cache.c (probe_caches): Move asm part to ...
* grub-core/kern/arm/cache_armv6.S: ... here. This allows this
asm to stay in arm even if surrounding is thumb.
2013-11-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/arm/misc.S: Add __muldi3 and __aeabi_lmul. Those

View file

@ -21,6 +21,8 @@ void grub_arch_sync_caches_armv6 (void *address, grub_size_t len);
void grub_arch_sync_caches_armv7 (void *address, grub_size_t len);
void grub_arm_disable_caches_mmu_armv6 (void);
void grub_arm_disable_caches_mmu_armv7 (void);
grub_uint32_t grub_arm_main_id (void);
grub_uint32_t grub_arm_cache_type (void);
static void
probe_caches (void)
@ -28,7 +30,7 @@ probe_caches (void)
grub_uint32_t main_id, cache_type;
/* Read main ID Register */
asm volatile ("mrc p15, 0, %0, c0, c0, 0": "=r"(main_id));
main_id = grub_arm_main_id ();
switch ((main_id >> 16) & 0xf)
{
@ -44,7 +46,7 @@ probe_caches (void)
}
/* Read Cache Type Register */
asm volatile ("mrc p15, 0, %0, c0, c0, 1": "=r"(cache_type));
cache_type = grub_arm_cache_type ();
switch (cache_type >> 24)
{

View file

@ -35,3 +35,11 @@ clean_invalidate_dcache:
bx lr
#include "cache.S"
FUNCTION(grub_arm_main_id)
mrc p15, 0, r0, c0, c0, 0
bx lr
FUNCTION(grub_arm_cache_type)
mrc p15, 0, r0, c0, c0, 1
bx lr