]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/arm/cache.c (probe_caches): Move asm part to ...
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 13 Nov 2013 08:58:52 +0000 (09:58 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 13 Nov 2013 08:58:52 +0000 (09:58 +0100)
* grub-core/kern/arm/cache_armv6.S: ... here. This allows this
asm to stay in arm even if surrounding is thumb.

ChangeLog
grub-core/kern/arm/cache.c
grub-core/kern/arm/cache_armv6.S

index 6463c85219758d6076fcba3a377dd25760a6dc91..a9225158458f2373dc681922a5b7c9f0ee2acc77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index e9271049b55575c1d0512d6ff99ac5621ec136f9..f78d070a2ea9d69298a6d21a9d8a6430b9ca3b3d 100644 (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)
     {
index 68d8298263e85647c2bbbad7b224d43cc4c9f29f..52b81573de707be7286320aa176af4803c4fbeab 100644 (file)
@@ -34,4 +34,12 @@ clean_invalidate_dcache:
        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