NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Git from Qemu



> Datum: Tue, 07 Feb 2012 09:59:15 -0800 Von: Chuck Swiger 
> Datum: Feb  07 2012, at 6:23 AM, Maurizio Caloro wrote:
> >> Is flush_icache_range a linux-ism, or is it in one the libraries?
> > 
> > file "cache-utils.c" made following changes, but i don't know what you
> mean with "linux-ism".
> 
> It means it's not a standard POSIX or C library function, but something
> specific to the Linux kernel.
> 
> Robert Watson has a handy cross-referencer available which confirms it is
> from Linux:
>  
> http://fxr.watson.org/fxr/ident?v=linux-2.4.22;im=excerpts;i=flush_icache_range
> 
> Regards,
> -- 
> -Chuck

Thanks for your attention
For me following patch helped

diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index f5d9bf3..f55af96 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -1260,6 +1260,17 @@ static void tcg_out_brcond2 (TCGContext *s, const TCGArg 
*args,
     tcg_out_bc (s, (BC | BI (7, CR_EQ) | BO_COND_TRUE), args[5]);
 }
 
+#ifdef __NetBSD__
+static void flush_icache_range(unsigned long begin, unsigned long end)
+{
+    unsigned int i = begin & ~15UL;
+    for (; i < end; i++) {
+        asm("icbi 0,%0" : : "r"(i));
+    }
+    asm("isync");
+}
+#endif
+
 void ppc_tb_set_jmp_target (unsigned long jmp_addr, unsigned long addr)
 {
     uint32_t *ptr;

Regards
Mauri


-- 
-- 
Maurizio Caloro 
Leisibachstrasse 37
6033 Buchrain

+41 41 534 87 14
+41 76 450 33 41 

Email: mauric%gmx.ch@localhost

NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://www.gmx.net/de/go/freephone/


Home | Main Index | Thread Index | Old Index