forked from Imagelibrary/rtems
incorporate Tony's patches:
+ c/src/lib/libc/support/generic/malloc.c did not initialize the
sbrk amount
+ _Thread_Handler in c/src/exec/rtems/thread.c left a window
during the begin extension which could result in a context switch
fixed places which did not correctly distinguish between an
CPU_isr and a CPU_isr_entry.
This commit is contained in:
@@ -62,6 +62,7 @@ void RTEMS_Malloc_Initialize(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
starting_address = start;
|
starting_address = start;
|
||||||
|
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
|
||||||
|
|
||||||
if (!starting_address) {
|
if (!starting_address) {
|
||||||
u32_address = (unsigned int)sbrk(length);
|
u32_address = (unsigned int)sbrk(length);
|
||||||
|
|||||||
@@ -57,32 +57,32 @@ void print_ipnd_imsk();
|
|||||||
|
|
||||||
unsigned int Xint_2_Group_Map[8] = { 0, 1, 2, 5, 7, 3, 6, 4 };
|
unsigned int Xint_2_Group_Map[8] = { 0, 1, 2, 5, 7, 3, 6, 4 };
|
||||||
|
|
||||||
i960_isr set_vector( /* returns old vector */
|
i960_isr_entry set_vector( /* returns old vector */
|
||||||
rtems_isr_entry func, /* isr routine */
|
rtems_isr_entry func, /* isr routine */
|
||||||
unsigned int xint, /* XINT number */
|
unsigned int xint, /* XINT number */
|
||||||
unsigned int type /* RTEMS or RAW */
|
unsigned int type /* RTEMS or RAW */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
i960_isr *intr_tbl, *cached_intr_tbl;
|
i960_isr_entry *intr_tbl, *cached_intr_tbl;
|
||||||
i960_isr saved_intr;
|
i960_isr_entry saved_intr;
|
||||||
unsigned int vector, group, nibble;
|
unsigned int vector, group, nibble;
|
||||||
unsigned int *imap;
|
unsigned int *imap;
|
||||||
|
|
||||||
if ( xint > 7 )
|
if ( xint > 7 )
|
||||||
exit( 0x80 );
|
exit( 0x80 );
|
||||||
|
|
||||||
cached_intr_tbl = (i960_isr *) 0;
|
cached_intr_tbl = (i960_isr_entry *) 0;
|
||||||
intr_tbl = (i960_isr *) Prcb->intr_tbl;
|
intr_tbl = (i960_isr_entry *) Prcb->intr_tbl;
|
||||||
group = Xint_2_Group_Map[xint]; /* remap XINT to group */
|
group = Xint_2_Group_Map[xint]; /* remap XINT to group */
|
||||||
vector = (group << 4) + 2; /* direct vector num */
|
vector = (group << 4) + 2; /* direct vector num */
|
||||||
|
|
||||||
if ( type )
|
if ( type )
|
||||||
rtems_interrupt_catch( func, vector, (rtems_isr_entry *) &saved_intr );
|
rtems_interrupt_catch( func, vector, (rtems_isr_entry *) &saved_intr );
|
||||||
else {
|
else {
|
||||||
saved_intr = (i960_isr) intr_tbl[ vector ];
|
saved_intr = (i960_isr_entry) intr_tbl[ vector ];
|
||||||
/* return old vector */
|
/* return old vector */
|
||||||
intr_tbl[ vector + 1 ] = /* normal vector table */
|
intr_tbl[ vector + 1 ] = /* normal vector table */
|
||||||
cached_intr_tbl[ group ] = (i960_isr) func; /* cached vector */
|
cached_intr_tbl[ group ] = (i960_isr_entry) func; /* cached vector */
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( xint <= 3 ) imap = &Ctl_tbl->imap0; /* updating IMAP0 */
|
if ( xint <= 3 ) imap = &Ctl_tbl->imap0; /* updating IMAP0 */
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ void RTEMS_Malloc_Initialize(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
starting_address = start;
|
starting_address = start;
|
||||||
|
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
|
||||||
|
|
||||||
if (!starting_address) {
|
if (!starting_address) {
|
||||||
u32_address = (unsigned int)sbrk(length);
|
u32_address = (unsigned int)sbrk(length);
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ void RTEMS_Malloc_Initialize(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
starting_address = start;
|
starting_address = start;
|
||||||
|
RTEMS_Malloc_Sbrk_amount = sbrk_amount;
|
||||||
|
|
||||||
if (!starting_address) {
|
if (!starting_address) {
|
||||||
u32_address = (unsigned int)sbrk(length);
|
u32_address = (unsigned int)sbrk(length);
|
||||||
|
|||||||
Reference in New Issue
Block a user