Author: blueswirl Date: 2008-09-02 17:59:28 +0200 (Tue, 02 Sep 2008) New Revision: 234
Modified: openbios-devel/arch/sparc64/openbios.c Log: Implement itlb/dtlb directed writes (Igor Kovalenko)
Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-09-02 15:46:27 UTC (rev 233) +++ openbios-devel/arch/sparc64/openbios.c 2008-09-02 15:59:28 UTC (rev 234) @@ -132,6 +132,16 @@ "r" (tte_data), "i" (ASI_DTLB_DATA_IN)); }
+static void +dtlb_load3(unsigned long vaddr, unsigned long tte_data, + unsigned long tte_index) +{ + asm("stxa %0, [%1] %2\n" + "stxa %3, [%4] %5\n" + : : "r" (vaddr), "r" (48), "i" (ASI_DMMU), + "r" (tte_data), "r" (tte_index << 3), "i" (ASI_DTLB_DATA_ACCESS)); +} + /* ( index tte_data vaddr -- ? ) */ @@ -143,7 +153,7 @@ vaddr = POP(); tte_data = POP(); idx = POP(); - dtlb_load2(vaddr, tte_data); + dtlb_load3(vaddr, tte_data, idx); }
static void @@ -155,6 +165,16 @@ "r" (tte_data), "i" (ASI_ITLB_DATA_IN)); }
+static void +itlb_load3(unsigned long vaddr, unsigned long tte_data, + unsigned long tte_index) +{ + asm("stxa %0, [%1] %2\n" + "stxa %3, [%4] %5\n" + : : "r" (vaddr), "r" (48), "i" (ASI_IMMU), + "r" (tte_data), "r" (tte_index << 3), "i" (ASI_ITLB_DATA_ACCESS)); +} + /* ( index tte_data vaddr -- ? ) */ @@ -166,7 +186,7 @@ vaddr = POP(); tte_data = POP(); idx = POP(); - itlb_load2(vaddr, tte_data); + itlb_load3(vaddr, tte_data, idx); }
static void