From 86748ff7edf2cf2fd7e0ed629641f370bd6096c0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 24 Oct 2000 21:50:37 +0000 Subject: 2000-10-24 Alan Cudmore and Joel Sherrill * This is a major reworking of the mips64orion port to use gcc predefines as much as possible and a big push to multilib the mips port. The mips64orion port was copied/renamed to mips to be more like other GNU tools. Alan did most of the technical work of determining how to map old macro names used by the mips64orion port to standard compiler macro definitions. Joel did the merge with CVS magic to keep individual file history and did the BSP modifications. Details follow: * console/led.S: Switch from using to . * console/start.S: Switch from using to . Added define of PMON stacksize. * console/idtmem.S: Switch from using to . Also reworked conditionals to use gcc predefines. * console/idttlb.S: Ditto. --- c/src/lib/libbsp/mips/p4000/ChangeLog | 18 ++++++++++++++++++ c/src/lib/libbsp/mips/p4000/console/led.S | 2 +- c/src/lib/libbsp/mips/p4000/start/start.S | 8 +++++++- c/src/lib/libbsp/mips/p4000/startup/idtmem.S | 16 ++++++++-------- c/src/lib/libbsp/mips/p4000/startup/idttlb.S | 28 ++++++++++++++-------------- 5 files changed, 48 insertions(+), 24 deletions(-) diff --git a/c/src/lib/libbsp/mips/p4000/ChangeLog b/c/src/lib/libbsp/mips/p4000/ChangeLog index 0d3dc91cad..a5a0aa15da 100644 --- a/c/src/lib/libbsp/mips/p4000/ChangeLog +++ b/c/src/lib/libbsp/mips/p4000/ChangeLog @@ -1,3 +1,21 @@ +2000-10-24 Alan Cudmore and + Joel Sherrill + + * This is a major reworking of the mips64orion port to use + gcc predefines as much as possible and a big push to multilib + the mips port. The mips64orion port was copied/renamed to mips + to be more like other GNU tools. Alan did most of the technical + work of determining how to map old macro names used by the mips64orion + port to standard compiler macro definitions. Joel did the merge + with CVS magic to keep individual file history and did the BSP + modifications. Details follow: + * console/led.S: Switch from using to . + * console/start.S: Switch from using to . Added + define of PMON stacksize. + * console/idtmem.S: Switch from using to . Also + reworked conditionals to use gcc predefines. + * console/idttlb.S: Ditto. + 2000-09-04 Ralf Corsepius * console/Makefile.am, liblnk/Makefile.am, start/Makefile.am, diff --git a/c/src/lib/libbsp/mips/p4000/console/led.S b/c/src/lib/libbsp/mips/p4000/console/led.S index 5efd85f81a..6df054faf5 100644 --- a/c/src/lib/libbsp/mips/p4000/console/led.S +++ b/c/src/lib/libbsp/mips/p4000/console/led.S @@ -3,8 +3,8 @@ */ #include -#include #include +#include FRAME(mips_leddisplay,sp,0,ra) diff --git a/c/src/lib/libbsp/mips/p4000/start/start.S b/c/src/lib/libbsp/mips/p4000/start/start.S index 88646f520f..2f35543a99 100644 --- a/c/src/lib/libbsp/mips/p4000/start/start.S +++ b/c/src/lib/libbsp/mips/p4000/start/start.S @@ -33,7 +33,7 @@ LICENSED MATERIAL - PROGRAM PROPERTY OF IDT **************************************************************************/ #include #include -#include +#include .extern _fbss,4 /* this is defined by the linker */ @@ -212,6 +212,12 @@ FRAME(start,sp,0,ra) #endif +/* + * P_STACKSIZE is the size of the Prom Stack. + * the prom stack grows downward + */ +#define P_STACKSIZE 0x2000 /* sets stack size to 8k */ + /************************************************************************** ** 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 #include -#include +#include .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 #include -#include +#include .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 ** -- cgit v1.2.3