Skip to contentSkip to conversation

[6969] SH: Add cpu_sh4_is_cached for linux-user.

Qemu-devel Edgar E. Iglesias 1 participant 1 message Apr 3, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6969

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6969
Author:   edgar_igl
Date:     2009-04-03 07:29:38 +0000 (Fri, 03 Apr 2009)

Log Message:
-----------
SH: Add cpu_sh4_is_cached for linux-user.

The entire U0 area is assumed to be cacheable.

Modified Paths:
--------------
trunk/target-sh4/helper.c

Modified: trunk/target-sh4/helper.c
===================================================================

target-sh4/helper.c +6 -0
@@ -60,6 +60,12 @@
     return addr;
 }
 
+int cpu_sh4_is_cached(CPUSH4State * env, target_ulong addr)
+{
+    /* For user mode, only U0 area is cachable. */
+    return !!(addr & 0x80000000);
+}
+
 #else /* !CONFIG_USER_ONLY */
 
 #define MMU_OK                   0