Reworked score/cpu/sparc so it can be safely compiled multilib. All

routines and structures that require CPU model specific information
are now in libcpu.  This primarily required moving erc32 specific
information from score/cpu files to libcpu/sparc and the erc32 BSP.
This commit is contained in:
Joel Sherrill
2000-07-11 21:16:53 +00:00
parent f38d829af4
commit 4159370f5d
29 changed files with 105 additions and 796 deletions

View File

@@ -19,8 +19,8 @@
* $Id$
*/
#ifndef __SIS_h
#define __SIS_h
#ifndef __ERC32_BSP_h
#define __ERC32_BSP_h
#ifdef __cplusplus
extern "C" {
@@ -28,7 +28,7 @@ extern "C" {
#include <rtems.h>
#include <iosupp.h>
#include <erc32.h>
#include <libcpu/erc32.h>
#include <clockdrv.h>
#include <console.h>

View File

@@ -11,7 +11,7 @@
*/
#include <asm.h>
#include <erc32.h>
#include <libcpu/erc32.h>
/*
* Unexpected trap will halt the processor by forcing it to error state

View File

@@ -44,6 +44,12 @@ rtems_cpu_table Cpu_table;
extern rtems_unsigned32 rdb_start;
/*
* Mirror of the Timer Control Register
*/
unsigned32 _ERC32_MEC_Timer_Control_Mirror;
/*
* Amount to increment itimer by each pass
* It is a variable instead of a #define to allow the 'looptest'
@@ -164,6 +170,21 @@ void bsp_pretasking_hook(void)
bsp_spurious_initialize();
}
/*
* ERC32_Idle_thread_body
*
* ERC32 specific idle task that enters low power mode.
*/
void ERC32_Idle_thread_body( void )
{
while (1) {
ERC32_MEC.Power_Down = 0; /* value is irrelevant */
}
}
/*
* bsp_start
*
@@ -191,6 +212,15 @@ void bsp_start( void )
ERC32_MEC.Wait_State_Configuration = 0;
}
/*
* Initialize the mirror of the Timer Control register.
*/
_ERC32_MEC_Timer_Control_Mirror = 0;
ERC32_MEC.Timer_Control = 0;
ERC32_MEC.Control |= ERC32_CONFIGURATION_POWER_DOWN_ALLOWED;
/*
* Set up our hooks
@@ -208,6 +238,12 @@ void bsp_start( void )
*/
Cpu_table.do_zero_of_workspace = TRUE;
/*
* ERC32 specific idle task.
*/
Cpu_table.idle_task = ERC32_Idle_thread_body;
/*
* This should be enough interrupt stack.
*/