2005-10-05 Jiri Gaisler <jiri@gaisler.com>

Edvin Catovic <edvin@gaisler.com>
            Konrad Eisele <konrad@gaisler.com>

	PR 827/bsps
	* ChangeLog, cpu.c, cpu_asm.S, rtems/score/cpu.h: Portion of large
	update of SPARC BSPs. Includes addition of sis, leon2 and leon3 BSPs,
	deletion of leon BSP, addition of SMC91111 NIC driver and much more.
This commit is contained in:
Joel Sherrill
2005-10-05 19:30:18 +00:00
parent 3ffa814199
commit 59d55753a8
4 changed files with 46 additions and 11 deletions

View File

@@ -1,3 +1,20 @@
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
Edvin Catovic <edvin@gaisler.com>
Konrad Eisele <konrad@gaisler.com>
PR 827/bsps
* ChangeLog, cpu.c, cpu_asm.S, rtems/score/cpu.h: Portion of large
update of SPARC BSPs. Includes addition of sis, leon2 and leon3 BSPs,
deletion of leon BSP, addition of SMC91111 NIC driver and much more.
2004-06-16 Edvin Catovic <edvin@gaisler.com>
* cpu_asm.S: Added FP context initialization routine
_CPU_Context_initialize_fp
* cpu.c: Changed FP context initialization.
* rtems/score/sparc.h: Defined SPARC_HAS_FPU to be 1 (Non-FP BSPs
erc32nfp and leon1 are removed)
2004-02-26 Andreas Karlsson <andreas.karlsson@space.se>
604/bsps

View File

@@ -53,18 +53,15 @@ void _CPU_Initialize(
void (*thread_dispatch) /* ignored on this CPU */
)
{
#if (SPARC_HAS_FPU == 1)
void *pointer;
/*
* This seems to be the most appropriate way to obtain an initial
* FP context on the SPARC. The NULL fp context is copied it to
* FP context is initialized. The NULL fp context is copied it to
* the task's FP context during Context_Initialize.
*/
pointer = &_CPU_Null_fp_context;
_CPU_Context_save_fp( &pointer );
#endif
_CPU_Context_initialize_fp(pointer);
/*
* Grab our own copy of the user's CPU table.
@@ -316,7 +313,6 @@ void _CPU_Context_Initialize(
tmp_psr |= (new_level << 8) & SPARC_PSR_PIL_MASK;
tmp_psr &= ~SPARC_PSR_EF_MASK; /* disabled by default */
#if (SPARC_HAS_FPU == 1)
/*
* If this bit is not set, then a task gets a fault when it accesses
* a floating point register. This is a nice way to detect floating
@@ -325,6 +321,6 @@ void _CPU_Context_Initialize(
if ( is_fp )
tmp_psr |= SPARC_PSR_EF_MASK;
#endif
the_context->psr = tmp_psr;
}

View File

@@ -23,7 +23,31 @@
#include <asm.h>
#if (SPARC_HAS_FPU == 1)
/*
* void _CPU_Context_initialize_fp(
* void *fp_context_ptr
* )
*
* This routine is responsible for initializing the FP context
* at *fp_context_ptr. All registers and FSR in the FP context
* are initailized to 0.
*
*/
.align 4
PUBLIC(_CPU_Context_initialize_fp)
SYM(_CPU_Context_initialize_fp):
set 0, %l1
fpcontextinit:
std %g0, [%o0] ! write register fields of the FP context
add %l1, 1, %l1
cmp %l1, 16
bne fpcontextinit
add %o0, 8, %o0
retl
st %g0, [%o0] ! write fsr field of the FP context
/*
* void _CPU_Context_save_fp(
@@ -123,8 +147,6 @@ SYM(_CPU_Context_restore_fp):
ret
restore
#endif /* SPARC_HAS_FPU */
/*
* void _CPU_Context_switch(
* Context_Control *run,

View File

@@ -154,7 +154,7 @@ extern "C" {
* not provide one.
*/
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
/*
* Does the stack grow up (toward higher addresses) or down