+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
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)
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)
{
}
/* 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)
{
mcr p15, 0, r0, c7, c14, 0 @ Clean/Invalidate D-cache
bx lr
-#include "cache.S"
\ No newline at end of file
+#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
\ No newline at end of file