Changeset a86f3aac in rtems for c/src/lib/libbsp/powerpc/ep1a


Ignore:
Timestamp:
Jul 11, 2008, 10:01:37 AM (12 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 4.9, master
Children:
25a92bc1
Parents:
69effbb4
Message:

adapted powerpc BSPs to new exception code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c

    r69effbb4 ra86f3aac  
    1414 *  $Id$
    1515 */
     16
     17#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
    1618
    1719#include <string.h>
     
    4648uint32_t bsp_clicks_per_usec;
    4749
    48 SPR_RW(SPRG0)
    4950SPR_RW(SPRG1)
    5051
     
    328329{
    329330  unsigned char *stack;
    330   register uint32_t  intrStack;
    331   register uint32_t *intrStackPtr;
     331  uint32_t intrStackStart;
     332  uint32_t intrStackSize;
    332333  unsigned char *work_space_start;
    333334  ppc_cpu_id_t myCpu;
     
    374375
    375376  /*
    376    * Initialize the interrupt related settings
    377    * SPRG1 = software managed IRQ stack
    378    *
    379    * This could be done latter (e.g in IRQ_INIT) but it helps to understand
    380    * some settings below...
    381    */
    382   intrStack = ((uint32_t) __rtems_end) +
    383     INIT_STACK_SIZE + rtems_configuration_get_interrupt_stack_size() -
    384     PPC_MINIMUM_STACK_FRAME_SIZE;
    385 
    386   /* make sure it's properly aligned */
    387   intrStack &= ~(CPU_STACK_ALIGNMENT-1);
    388 
    389   /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
    390   intrStackPtr = (uint32_t*) intrStack;
    391   *intrStackPtr = 0;
    392 
    393   _write_SPRG1((unsigned int)intrStack);
    394 
    395   /* signal them that we have fixed PR288 - eventually, this should go away */
    396   _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
    397 
    398   /*
    399    * Initialize default raw exception hanlders. See vectors/vectors_init.c
    400    */
    401   initialize_exceptions();
     377   * Initialize the interrupt related settings.
     378   */
     379  intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
     380  intrStackSize = rtems_configuration_get_interrupt_stack_size();
     381
     382  /*
     383   * Initialize default raw exception hanlders.
     384   */
     385  ppc_exc_initialize(
     386    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
     387    intrStackStart,
     388    intrStackSize
     389  );
    402390
    403391  /*
Note: See TracChangeset for help on using the changeset viewer.