Changeset b3ac6a8d in rtems


Ignore:
Timestamp:
Sep 12, 1995, 7:45:42 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
3652ad35
Parents:
4b61ebfb
Message:

Initial attempt at building HP PA-RISC using Solaris hosted tools.

Changed back to Newlib for Solaris UNIX simulator.

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/newlibc.c

    r4b61ebfb rb3ac6a8d  
    120120     * tid of 0, which is treated specially (optimized, actually)
    121121     * by rtems_task_set_note
    122      */
    123 
    124     impure_value = (rtems_unsigned32) _REENT;
    125     MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     122     *
     123     * NOTE:  The above comment is no longer true and we need to use
     124     *        the extension data areas added about the same time.
     125     */
     126
     127    /*
     128     *  Don't touch the outgoing task if it has been deleted.
     129     */
     130
     131    if ( !_States_Is_transient( current_task->current_state ) ) {
     132      impure_value = (rtems_unsigned32) _REENT;
     133      MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     134    }
    126135
    127136    _REENT = (struct _reent *) MY_task_get_note(heir_task, LIBC_NOTEPAD);
     
    172181    }
    173182
    174     if (ptr)
     183    /* if (ptr) */
     184    if (ptr && ptr != &libc_global_reent)
    175185    {
    176186        _wrapup_reent(ptr);
  • c/src/exec/score/cpu/hppa1.1/cpu.c

    r4b61ebfb rb3ac6a8d  
    3434 */
    3535
    36 typedef rtems_isr ( *hppa_rtems_isr_entry )(
    37     rtems_vector_number,
     36typedef void ( *hppa_rtems_isr_entry )(
     37    ISR_Vector_number,
    3838    CPU_Interrupt_frame *
    3939 );
     
    194194hppa_external_interrupt_initialize(void)
    195195{
    196     rtems_isr_entry ignore;
     196    hppa_rtems_isr_entry ignore;
    197197
    198198    /* mark them all unused */
  • c/src/exec/score/src/mpci.c

    r4b61ebfb rb3ac6a8d  
    6868    STATES_WAITING_FOR_RPC_REPLY,
    6969    NULL,
    70     RTEMS_TIMEOUT
     70    RTEMS_TIMEOUT   /* XXX */
    7171  );
    7272}
  • c/src/exec/score/src/thread.c

    r4b61ebfb rb3ac6a8d  
    472472  if ( the_thread->extensions )
    473473    (void) _Workspace_Free( the_thread->extensions );
     474
     475  the_thread->Start.stack = NULL;
     476  the_thread->extensions = NULL;
    474477}
    475478
  • c/src/exec/score/tools/hppa1.1/genoffsets.c

    r4b61ebfb rb3ac6a8d  
    2424
    2525#include <rtems/system.h>
     26
     27void print_information( void );
    2628
    2729int main(
     
    3032)
    3133{
    32   unsigned int size;
     34  unsigned int size = 0;
    3335
    3436  /*
     
    6062);
    6163
    62 /*
    63  *  Offsets of elements in the Context_control structure.
    64  */
    65 
    6664#define PRINT_IT( STRING, TYPE, FIELD ) \
    6765  printf( "#define\t%s\t0x%p\t\t/* %d */\n", \
     
    8482    "\n"        \
    8583  );
     84
     85#if defined(hpux) && defined(__hppa__)
     86
     87/*
     88 *  Offsets of elements in the Context_control structure.
     89 */
    8690
    8791  PRINT_COMMENT("Context_Control information");
     
    173177  printf( "#define\tCPU_INTERRUPT_FRAME_SIZE\t%d\t\t/* 0x%x */\n", size, size );
    174178
     179#else
     180
     181  print_information();
     182
     183#endif
     184
    175185#undef PRINT_IT
    176186#undef PRINT_SIZE
     
    190200  return 0;
    191201}
     202
     203void print_information( void )
     204{
     205
     206#define PRINT_IT( STRING, NUMBER ) \
     207  printf( "#define\t%s\t0x%x\t\t/* %d */\n", \
     208          STRING, \
     209          NUMBER, \
     210          NUMBER );
     211
     212#define PRINT_SIZE( STRING, NUMBER ) \
     213  printf( "#define\t%s\t0x%x\t\t/* %d */\n", \
     214          STRING, \
     215          NUMBER, \
     216          NUMBER );
     217
     218#define PRINT_COMMENT( STRING ) \
     219  printf(       \
     220    "\n"        \
     221    "/*\n"      \
     222    " * " STRING "\n" \
     223    " */\n"     \
     224    "\n"        \
     225  );
     226
     227/*
     228 *  Offsets of elements in the Context_control structure.
     229 */
     230
     231  PRINT_COMMENT("Context_Control information");
     232
     233  PRINT_IT( "FLAGS_OFFSET",  0x00 );
     234  PRINT_IT( "R1_OFFSET",     0x04 );
     235  PRINT_IT( "R2_OFFSET",     0x08 );
     236  PRINT_IT( "R3_OFFSET",     0x0c );
     237  PRINT_IT( "R4_OFFSET",     0x00 );
     238  PRINT_IT( "R5_OFFSET",     0x14 );
     239  PRINT_IT( "R6_OFFSET",     0x18 );
     240  PRINT_IT( "R7_OFFSET",     0x1c );
     241  PRINT_IT( "R8_OFFSET",     0x20 );
     242  PRINT_IT( "R9_OFFSET",     0x24 );
     243  PRINT_IT( "R10_OFFSET",    0x28 );
     244  PRINT_IT( "R11_OFFSET",    0x2c );
     245  PRINT_IT( "R12_OFFSET",    0x30 );
     246  PRINT_IT( "R13_OFFSET",    0x34 );
     247  PRINT_IT( "R14_OFFSET",    0x38 );
     248  PRINT_IT( "R15_OFFSET",    0x3c );
     249  PRINT_IT( "R16_OFFSET",    0x40 );
     250  PRINT_IT( "R17_OFFSET",    0x44 );
     251  PRINT_IT( "R18_OFFSET",    0x48 );
     252  PRINT_IT( "R19_OFFSET",    0x4c );
     253  PRINT_IT( "R20_OFFSET",    0x50 );
     254  PRINT_IT( "R21_OFFSET",    0x54 );
     255  PRINT_IT( "R22_OFFSET",    0x58 );
     256  PRINT_IT( "R23_OFFSET",    0x5c );
     257  PRINT_IT( "R24_OFFSET",    0x60 );
     258  PRINT_IT( "R25_OFFSET",    0x64 );
     259  PRINT_IT( "R26_OFFSET",    0x68 );
     260  PRINT_IT( "R27_OFFSET",    0x6c );
     261  PRINT_IT( "R28_OFFSET",    0x70 );
     262  PRINT_IT( "R29_OFFSET",    0x74 );
     263  PRINT_IT( "R30_OFFSET",    0x78 );
     264  PRINT_IT( "R31_OFFSET",    0x7c );
     265
     266  /*
     267   * And common aliases for the above
     268   */
     269
     270  PRINT_COMMENT("Common aliases for above");
     271
     272  PRINT_IT( "RP_OFFSET",   0x08 );
     273  PRINT_IT( "ARG3_OFFSET", 0x5c );
     274  PRINT_IT( "ARG2_OFFSET", 0x60 );
     275  PRINT_IT( "ARG1_OFFSET", 0x64 );
     276  PRINT_IT( "ARG0_OFFSET", 0x68 );
     277  PRINT_IT( "SP_OFFSET",   0x78 );
     278  PRINT_IT( "DP_OFFSET",   0x6c );
     279  PRINT_IT( "RET0_OFFSET", 0x74 );
     280  PRINT_IT( "RET1_OFFSET", 0x74 );
     281
     282  PRINT_SIZE("CPU_CONTEXT_SIZE", 168 );
     283
     284  PRINT_COMMENT("Context_Control_fp information");
     285
     286  PRINT_SIZE("CPU_CONTEXT_FP_SIZE", 256);
     287
     288  /*
     289   *  And the control registers
     290   */
     291
     292  PRINT_COMMENT("Control register portion of context");
     293
     294  PRINT_IT( "SAR_OFFSET",        0x80 );
     295  PRINT_IT( "IPSW_OFFSET",       0x84 );
     296  PRINT_IT( "IIR_OFFSET",        0x88 );
     297  PRINT_IT( "IOR_OFFSET",        0x8c );
     298  PRINT_IT( "ISR_OFFSET",        0x90 );
     299  PRINT_IT( "PCOQFRONT_OFFSET",  0x94 );
     300  PRINT_IT( "PCOQBACK_OFFSET",   0x98 );
     301  PRINT_IT( "PCSQFRONT_OFFSET",  0x9c );
     302  PRINT_IT( "PCSQBACK_OFFSET",   0xa0 );
     303  PRINT_IT( "ITIMER_OFFSET",     0xa4 );
     304
     305  /*
     306   *  Full interrupt frame (integer + float)
     307   */
     308
     309  PRINT_COMMENT("Interrupt frame information");
     310
     311  PRINT_IT( "INTEGER_CONTEXT_OFFSET",   0x00 );
     312  PRINT_IT( "FP_CONTEXT_OFFSET",        0xa8 );
     313  PRINT_SIZE( "CPU_INTERRUPT_FRAME_SIZE", 448 );
     314
     315}
  • c/src/lib/libc/newlibc.c

    r4b61ebfb rb3ac6a8d  
    120120     * tid of 0, which is treated specially (optimized, actually)
    121121     * by rtems_task_set_note
    122      */
    123 
    124     impure_value = (rtems_unsigned32) _REENT;
    125     MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     122     *
     123     * NOTE:  The above comment is no longer true and we need to use
     124     *        the extension data areas added about the same time.
     125     */
     126
     127    /*
     128     *  Don't touch the outgoing task if it has been deleted.
     129     */
     130
     131    if ( !_States_Is_transient( current_task->current_state ) ) {
     132      impure_value = (rtems_unsigned32) _REENT;
     133      MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     134    }
    126135
    127136    _REENT = (struct _reent *) MY_task_get_note(heir_task, LIBC_NOTEPAD);
     
    172181    }
    173182
    174     if (ptr)
     183    /* if (ptr) */
     184    if (ptr && ptr != &libc_global_reent)
    175185    {
    176186        _wrapup_reent(ptr);
  • c/src/lib/libc/support.c

    r4b61ebfb rb3ac6a8d  
    2626  api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
    2727
    28   api->Notepads[ notepad ] = note;
     28  if ( api )
     29    api->Notepads[ notepad ] = note;
    2930}
    3031
  • cpukit/libcsupport/src/newlibc.c

    r4b61ebfb rb3ac6a8d  
    120120     * tid of 0, which is treated specially (optimized, actually)
    121121     * by rtems_task_set_note
    122      */
    123 
    124     impure_value = (rtems_unsigned32) _REENT;
    125     MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     122     *
     123     * NOTE:  The above comment is no longer true and we need to use
     124     *        the extension data areas added about the same time.
     125     */
     126
     127    /*
     128     *  Don't touch the outgoing task if it has been deleted.
     129     */
     130
     131    if ( !_States_Is_transient( current_task->current_state ) ) {
     132      impure_value = (rtems_unsigned32) _REENT;
     133      MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value);
     134    }
    126135
    127136    _REENT = (struct _reent *) MY_task_get_note(heir_task, LIBC_NOTEPAD);
     
    172181    }
    173182
    174     if (ptr)
     183    /* if (ptr) */
     184    if (ptr && ptr != &libc_global_reent)
    175185    {
    176186        _wrapup_reent(ptr);
  • cpukit/score/cpu/hppa1.1/cpu.c

    r4b61ebfb rb3ac6a8d  
    3434 */
    3535
    36 typedef rtems_isr ( *hppa_rtems_isr_entry )(
    37     rtems_vector_number,
     36typedef void ( *hppa_rtems_isr_entry )(
     37    ISR_Vector_number,
    3838    CPU_Interrupt_frame *
    3939 );
     
    194194hppa_external_interrupt_initialize(void)
    195195{
    196     rtems_isr_entry ignore;
     196    hppa_rtems_isr_entry ignore;
    197197
    198198    /* mark them all unused */
  • cpukit/score/src/mpci.c

    r4b61ebfb rb3ac6a8d  
    6868    STATES_WAITING_FOR_RPC_REPLY,
    6969    NULL,
    70     RTEMS_TIMEOUT
     70    RTEMS_TIMEOUT   /* XXX */
    7171  );
    7272}
  • cpukit/score/src/thread.c

    r4b61ebfb rb3ac6a8d  
    472472  if ( the_thread->extensions )
    473473    (void) _Workspace_Free( the_thread->extensions );
     474
     475  the_thread->Start.stack = NULL;
     476  the_thread->extensions = NULL;
    474477}
    475478
  • tools/cpu/hppa1.1/genoffsets.c

    r4b61ebfb rb3ac6a8d  
    2424
    2525#include <rtems/system.h>
     26
     27void print_information( void );
    2628
    2729int main(
     
    3032)
    3133{
    32   unsigned int size;
     34  unsigned int size = 0;
    3335
    3436  /*
     
    6062);
    6163
    62 /*
    63  *  Offsets of elements in the Context_control structure.
    64  */
    65 
    6664#define PRINT_IT( STRING, TYPE, FIELD ) \
    6765  printf( "#define\t%s\t0x%p\t\t/* %d */\n", \
     
    8482    "\n"        \
    8583  );
     84
     85#if defined(hpux) && defined(__hppa__)
     86
     87/*
     88 *  Offsets of elements in the Context_control structure.
     89 */
    8690
    8791  PRINT_COMMENT("Context_Control information");
     
    173177  printf( "#define\tCPU_INTERRUPT_FRAME_SIZE\t%d\t\t/* 0x%x */\n", size, size );
    174178
     179#else
     180
     181  print_information();
     182
     183#endif
     184
    175185#undef PRINT_IT
    176186#undef PRINT_SIZE
     
    190200  return 0;
    191201}
     202
     203void print_information( void )
     204{
     205
     206#define PRINT_IT( STRING, NUMBER ) \
     207  printf( "#define\t%s\t0x%x\t\t/* %d */\n", \
     208          STRING, \
     209          NUMBER, \
     210          NUMBER );
     211
     212#define PRINT_SIZE( STRING, NUMBER ) \
     213  printf( "#define\t%s\t0x%x\t\t/* %d */\n", \
     214          STRING, \
     215          NUMBER, \
     216          NUMBER );
     217
     218#define PRINT_COMMENT( STRING ) \
     219  printf(       \
     220    "\n"        \
     221    "/*\n"      \
     222    " * " STRING "\n" \
     223    " */\n"     \
     224    "\n"        \
     225  );
     226
     227/*
     228 *  Offsets of elements in the Context_control structure.
     229 */
     230
     231  PRINT_COMMENT("Context_Control information");
     232
     233  PRINT_IT( "FLAGS_OFFSET",  0x00 );
     234  PRINT_IT( "R1_OFFSET",     0x04 );
     235  PRINT_IT( "R2_OFFSET",     0x08 );
     236  PRINT_IT( "R3_OFFSET",     0x0c );
     237  PRINT_IT( "R4_OFFSET",     0x00 );
     238  PRINT_IT( "R5_OFFSET",     0x14 );
     239  PRINT_IT( "R6_OFFSET",     0x18 );
     240  PRINT_IT( "R7_OFFSET",     0x1c );
     241  PRINT_IT( "R8_OFFSET",     0x20 );
     242  PRINT_IT( "R9_OFFSET",     0x24 );
     243  PRINT_IT( "R10_OFFSET",    0x28 );
     244  PRINT_IT( "R11_OFFSET",    0x2c );
     245  PRINT_IT( "R12_OFFSET",    0x30 );
     246  PRINT_IT( "R13_OFFSET",    0x34 );
     247  PRINT_IT( "R14_OFFSET",    0x38 );
     248  PRINT_IT( "R15_OFFSET",    0x3c );
     249  PRINT_IT( "R16_OFFSET",    0x40 );
     250  PRINT_IT( "R17_OFFSET",    0x44 );
     251  PRINT_IT( "R18_OFFSET",    0x48 );
     252  PRINT_IT( "R19_OFFSET",    0x4c );
     253  PRINT_IT( "R20_OFFSET",    0x50 );
     254  PRINT_IT( "R21_OFFSET",    0x54 );
     255  PRINT_IT( "R22_OFFSET",    0x58 );
     256  PRINT_IT( "R23_OFFSET",    0x5c );
     257  PRINT_IT( "R24_OFFSET",    0x60 );
     258  PRINT_IT( "R25_OFFSET",    0x64 );
     259  PRINT_IT( "R26_OFFSET",    0x68 );
     260  PRINT_IT( "R27_OFFSET",    0x6c );
     261  PRINT_IT( "R28_OFFSET",    0x70 );
     262  PRINT_IT( "R29_OFFSET",    0x74 );
     263  PRINT_IT( "R30_OFFSET",    0x78 );
     264  PRINT_IT( "R31_OFFSET",    0x7c );
     265
     266  /*
     267   * And common aliases for the above
     268   */
     269
     270  PRINT_COMMENT("Common aliases for above");
     271
     272  PRINT_IT( "RP_OFFSET",   0x08 );
     273  PRINT_IT( "ARG3_OFFSET", 0x5c );
     274  PRINT_IT( "ARG2_OFFSET", 0x60 );
     275  PRINT_IT( "ARG1_OFFSET", 0x64 );
     276  PRINT_IT( "ARG0_OFFSET", 0x68 );
     277  PRINT_IT( "SP_OFFSET",   0x78 );
     278  PRINT_IT( "DP_OFFSET",   0x6c );
     279  PRINT_IT( "RET0_OFFSET", 0x74 );
     280  PRINT_IT( "RET1_OFFSET", 0x74 );
     281
     282  PRINT_SIZE("CPU_CONTEXT_SIZE", 168 );
     283
     284  PRINT_COMMENT("Context_Control_fp information");
     285
     286  PRINT_SIZE("CPU_CONTEXT_FP_SIZE", 256);
     287
     288  /*
     289   *  And the control registers
     290   */
     291
     292  PRINT_COMMENT("Control register portion of context");
     293
     294  PRINT_IT( "SAR_OFFSET",        0x80 );
     295  PRINT_IT( "IPSW_OFFSET",       0x84 );
     296  PRINT_IT( "IIR_OFFSET",        0x88 );
     297  PRINT_IT( "IOR_OFFSET",        0x8c );
     298  PRINT_IT( "ISR_OFFSET",        0x90 );
     299  PRINT_IT( "PCOQFRONT_OFFSET",  0x94 );
     300  PRINT_IT( "PCOQBACK_OFFSET",   0x98 );
     301  PRINT_IT( "PCSQFRONT_OFFSET",  0x9c );
     302  PRINT_IT( "PCSQBACK_OFFSET",   0xa0 );
     303  PRINT_IT( "ITIMER_OFFSET",     0xa4 );
     304
     305  /*
     306   *  Full interrupt frame (integer + float)
     307   */
     308
     309  PRINT_COMMENT("Interrupt frame information");
     310
     311  PRINT_IT( "INTEGER_CONTEXT_OFFSET",   0x00 );
     312  PRINT_IT( "FP_CONTEXT_OFFSET",        0xa8 );
     313  PRINT_SIZE( "CPU_INTERRUPT_FRAME_SIZE", 448 );
     314
     315}
Note: See TracChangeset for help on using the changeset viewer.