summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/mips/p4000/startup
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/mips/p4000/startup')
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/idtmem.S16
-rw-r--r--c/src/lib/libbsp/mips/p4000/startup/idttlb.S28
2 files changed, 22 insertions, 22 deletions
diff --git a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S b/c/src/lib/libbsp/mips/p4000/startup/idtmem.S
index e562c3b820..19b7bc581a 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S
+++ b/c/src/lib/libbsp/mips/p4000/startup/idtmem.S
@@ -40,7 +40,7 @@ LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
#include <iregdef.h>
#include <idtcpu.h>
-#include <idtmon.h>
+#include <asm.h>
.data
mem_size:
@@ -48,14 +48,14 @@ mem_size:
dcache_size:
.word 0
icache_size:
-#if defined(CPU_R3000)
+#if __mips == 1
.word MINCACHE
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
.word 0
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
.data
scache_size:
.word 0
@@ -70,7 +70,7 @@ scache_linesize:
.text
-#if defined (CPU_R3000)
+#if __mips == 1
#define CONFIGFRM ((2*4)+4)
/*************************************************************************
@@ -402,9 +402,9 @@ FRAME(get_mem_conf,sp,0,ra)
j ra
ENDFRAME(get_mem_conf)
-#endif /* defined CPU_R3000 */
+#endif /* __mips == 1 */
-#if defined(CPU_R4000)
+#if __mips == 3
#define LEAF(label) FRAME(label,sp,0,ra)
#define XLEAF(label) \
.globl label ; \
@@ -922,7 +922,7 @@ FRAME(get_mem_conf,sp,0,ra)
ENDFRAME(get_mem_conf)
-#endif /* defined(CPU_R4000) */
+#endif /* __mips == 3 */
/*
* void set_mem_size (mem_size)
diff --git a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S b/c/src/lib/libbsp/mips/p4000/startup/idttlb.S
index 6a6a5b79d4..c26be9897b 100644
--- a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S
+++ b/c/src/lib/libbsp/mips/p4000/startup/idttlb.S
@@ -32,12 +32,12 @@ LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
/* 950308: Ketan patched a few tlb functions that would not have worked.*/
#include <iregdef.h>
#include <idtcpu.h>
-#include <idtmon.h>
+#include <asm.h>
.text
-#if defined(CPU_R3000)
+#if __mips == 1
/*
** ret_tlblo -- returns the 'entrylo' contents for the TLB
** 'c' callable - as ret_tlblo(index) - where index is the
@@ -64,7 +64,7 @@ FRAME(ret_tlblo,sp,0,ra)
.set reorder
ENDFRAME(ret_tlblo)
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
/*
** ret_tlblo[01] -- returns the 'entrylo' contents for the TLB
** 'c' callable - as ret_tlblo(index) - where index is the
@@ -142,7 +142,7 @@ ENDFRAME(ret_tlbwired)
** index
*/
FRAME(ret_tlbhi,sp,0,ra)
-#if defined(CPU_R3000)
+#if __mips == 1
.set noreorder
mfc0 t0,C0_SR # save sr
nop
@@ -161,7 +161,7 @@ FRAME(ret_tlbhi,sp,0,ra)
nop
.set reorder
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
mfc0 t0,C0_SR # save sr
mtc0 zero,C0_SR # disable interrupts
mfc0 t1,C0_TLBHI # save current pid
@@ -184,7 +184,7 @@ ENDFRAME(ret_tlbhi)
** ret_tlbpid() -- return tlb pid contained in the current entry hi
*/
FRAME(ret_tlbpid,sp,0,ra)
-#if defined(CPU_R3000)
+#if __mips == 1
.set noreorder
mfc0 v0,C0_TLBHI # fetch tlb high
nop
@@ -194,7 +194,7 @@ FRAME(ret_tlbpid,sp,0,ra)
nop
.set reorder
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
mfc0 v0,C0_TLBHI # to return value
nop
and v0,TLBHI_PIDMASK
@@ -214,7 +214,7 @@ ENDFRAME(ret_tlbpid)
** returns an index value (0-63) if successful -1 -f not
*/
FRAME(tlbprobe,sp,0,ra)
-#if defined(CPU_R3000)
+#if __mips == 1
.set noreorder
mfc0 t0,C0_SR /* fetch status reg */
and a0,TLBHI_VPNMASK /* isolate just the vpn */
@@ -240,7 +240,7 @@ FRAME(tlbprobe,sp,0,ra)
nop
.set reorder
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
mfc0 t0,C0_SR # save sr
mtc0 zero,C0_SR # disable interrupts
mfc0 t1,C0_TLBHI # save current pid
@@ -269,7 +269,7 @@ ENDFRAME(tlbprobe)
** resettlb(index) Invalidate the TLB entry specified by index
*/
FRAME(resettlb,sp,0,ra)
-#if defined(CPU_R3000)
+#if __mips == 1
.set noreorder
mfc0 t0,C0_TLBHI # fetch the current hi
mfc0 v0,C0_SR # fetch the status reg.
@@ -289,7 +289,7 @@ FRAME(resettlb,sp,0,ra)
nop
.set reorder
#endif
-#if defined(CPU_R4000)
+#if __mips == 3
li t2,K0BASE&TLBHI_VPN2MASK
mfc0 t0,C0_TLBHI # save current TLBHI
mfc0 v0,C0_SR # save SR and disable interrupts
@@ -311,7 +311,7 @@ FRAME(resettlb,sp,0,ra)
#endif
ENDFRAME(resettlb)
-#if defined(CPU_R3000)
+#if __mips == 1
/*
** Setup TLB entry
**
@@ -340,8 +340,8 @@ FRAME(map_tlb,sp,0,ra)
nop
.set reorder
ENDFRAME(map_tlb)
- #endif
-#if defined(CPU_R4000)
+#endif
+#if __mips == 3
/*
** Setup R4000 TLB entry
**