forked from Imagelibrary/rtems
2005-02-10 Ralf Corsepius <ralf.corsepius@rtems.org>
* cpu.c, cpu_asm.S, irq_stub.S, rtems/score/ppc_offs.h: Remove PPC_ABI_POWEROPEN.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2005-02-10 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* cpu.c, cpu_asm.S, irq_stub.S, rtems/score/ppc_offs.h:
|
||||
Remove PPC_ABI_POWEROPEN.
|
||||
|
||||
2005-02-09 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* cpu.c, cpu_asm.S, irq_stub.S, rtems/score/ppc_offs.h:
|
||||
|
||||
@@ -63,7 +63,6 @@ void _CPU_Initialize(
|
||||
#if (PPC_USE_SPRG)
|
||||
int i;
|
||||
#endif
|
||||
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
||||
register uint32_t r2 = 0;
|
||||
register uint32_t r13 = 0;
|
||||
|
||||
@@ -72,14 +71,10 @@ void _CPU_Initialize(
|
||||
|
||||
asm ("mr %0,2" : "=r" ((r2)) : "0" ((r2)));
|
||||
_CPU_IRQ_info.Default_r2 = r2;
|
||||
#endif
|
||||
|
||||
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
||||
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
||||
/* fill in _CPU_IRQ_info.Vector_table later */
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
_CPU_IRQ_info.Dispatch_r2 = ((uint32_t*)_Thread_Dispatch)[1];
|
||||
#endif
|
||||
_CPU_IRQ_info.Switch_necessary = &_Context_Switch_necessary;
|
||||
_CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing;
|
||||
|
||||
@@ -224,11 +219,8 @@ uint32_t _CPU_ISR_Get_level( void )
|
||||
* _CPU_Context_Initialize
|
||||
*/
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
#define CPU_MINIMUM_STACK_FRAME_SIZE 56
|
||||
#else /* PPC_ABI_SVR4 or PPC_ABI_EABI */
|
||||
/* PPC_ABI_SVR4 or PPC_ABI_EABI */
|
||||
#define CPU_MINIMUM_STACK_FRAME_SIZE 8
|
||||
#endif
|
||||
|
||||
void _CPU_Context_Initialize(
|
||||
Context_Control *the_context,
|
||||
@@ -272,14 +264,6 @@ void _CPU_Context_Initialize(
|
||||
the_context->msr |= PPC_MSR_RI;
|
||||
the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
{ uint32_t *desc = (uint32_t*)entry_point;
|
||||
|
||||
the_context->pc = desc[0];
|
||||
the_context->gpr2 = desc[1];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_SVR4)
|
||||
{ unsigned r13 = 0;
|
||||
asm volatile ("mr %0, 13" : "=r" ((r13)));
|
||||
@@ -354,11 +338,8 @@ void _CPU_ISR_install_vector(
|
||||
|
||||
void _CPU_Install_interrupt_stack( void )
|
||||
{
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
_CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 56;
|
||||
#else
|
||||
/* PPC_ABI_EABI */
|
||||
_CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Handle a spurious interrupt */
|
||||
@@ -410,18 +391,7 @@ void _CPU_Fatal_error(uint32_t _error)
|
||||
|
||||
const CPU_Trap_table_entry _CPU_Trap_slot_template = {
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
#error " Vector install not tested."
|
||||
#if (PPC_HAS_FPU)
|
||||
#error " Vector install not tested."
|
||||
0x9421feb0, /* stwu r1, -(20*4 + 18*8 + IP_END)(r1) */
|
||||
#else
|
||||
#error " Vector install not tested."
|
||||
0x9421ff40, /* stwu r1, -(20*4 + IP_END)(r1) */
|
||||
#endif
|
||||
#else
|
||||
0x9421ff90, /* stwu r1, -(IP_END)(r1) */
|
||||
#endif
|
||||
|
||||
0x90010008, /* stw %r0, IP_0(%r1) */
|
||||
0x38000000, /* li %r0, PPC_IRQ */
|
||||
|
||||
@@ -570,15 +570,7 @@ PROC (_CPU_Context_restore):
|
||||
blr
|
||||
|
||||
/* Individual interrupt prologues look like this:
|
||||
* #if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
* #if (PPC_HAS_FPU)
|
||||
* stwu r1, -(20*4 + 18*8 + IP_END)(r1)
|
||||
* #else
|
||||
* stwu r1, -(20*4 + IP_END)(r1)
|
||||
* #endif
|
||||
* #else
|
||||
* stwu r1, -(IP_END)(r1)
|
||||
* #endif
|
||||
* stw r0, IP_0(r1)
|
||||
*
|
||||
* li r0, vectornum
|
||||
@@ -636,17 +628,3 @@ PROC (_ISR_HandlerC):
|
||||
#include "irq_stub.S"
|
||||
rfci
|
||||
#endif
|
||||
|
||||
/* PowerOpen descriptors for indirect function calls.
|
||||
*/
|
||||
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
DESCRIPTOR (_CPU_Context_save_fp)
|
||||
DESCRIPTOR (_CPU_Context_restore_fp)
|
||||
DESCRIPTOR (_CPU_Context_switch)
|
||||
DESCRIPTOR (_CPU_Context_restore)
|
||||
DESCRIPTOR (_ISR_Handler)
|
||||
#if (PPC_HAS_RFCI == 1)
|
||||
DESCRIPTOR (_ISR_HandlerC)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -128,12 +128,6 @@ LABEL (nested):
|
||||
/*
|
||||
* (*_ISR_Vector_table[ vector ])( vector );
|
||||
*/
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
lwz r6,0(r4)
|
||||
lwz r2,4(r4)
|
||||
mtlr r6
|
||||
lwz r11,8(r4)
|
||||
#endif
|
||||
#if (PPC_ABI == PPC_ABI_SVR4 || PPC_ABI == PPC_ABI_EABI)
|
||||
mtlr r4
|
||||
lwz r2, Default_r2(r11)
|
||||
@@ -210,11 +204,7 @@ LABEL (switch):
|
||||
stw r6, 0(r31)
|
||||
/* Re-enable interrupts */
|
||||
lwz r0, IP_MSR(r1)
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
lwz r2, Dispatch_r2(r11)
|
||||
#else
|
||||
/* R2 and R13 still hold their values from the last call */
|
||||
#endif
|
||||
mtmsr r0
|
||||
bl SYM (_Thread_Dispatch)
|
||||
/* NOP marker for debuggers */
|
||||
|
||||
@@ -106,11 +106,8 @@
|
||||
#endif
|
||||
|
||||
.set IP_LINK, 0
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
.set IP_0, (IP_LINK + 56)
|
||||
#else
|
||||
/* PPC_ABI_EABI */
|
||||
.set IP_0, (IP_LINK + 8)
|
||||
#endif
|
||||
.set IP_2, (IP_0 + 4)
|
||||
|
||||
.set IP_3, (IP_2 + 4)
|
||||
@@ -148,14 +145,11 @@
|
||||
.set Disable_level, 4
|
||||
.set Vector_table, 8
|
||||
.set Stack, 12
|
||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||
.set Dispatch_r2, 16
|
||||
.set Switch_necessary, 20
|
||||
#else
|
||||
/* PPC_ABI_EABI */
|
||||
.set Default_r2, 16
|
||||
.set Default_r13, 20
|
||||
.set Switch_necessary, 24
|
||||
#endif
|
||||
|
||||
.set Signal, Switch_necessary + 4
|
||||
.set msr_initial, Signal + 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user