Changeset 6067359 in rtems for c


Ignore:
Timestamp:
Sep 23, 2008, 7:53:38 PM (12 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.9
Children:
5edccc1
Parents:
93f8efa
Message:

make sure cahce is ON when MMU is off (important for exception handling)

Location:
c/src/lib/libbsp/powerpc/tqm8xx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/tqm8xx/ChangeLog

    r93f8efa r6067359  
     12008-09-23      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
     2
     3        * startup/cpuinit.c, startup/bspstart.c: initialize mmu, make sure
     4        cache is ENABLED when MMU is disabled
     5
    162008-09-09      Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
    27
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c

    r93f8efa r6067359  
    5454 *  Look in rtems/c/src/lib/libbsp/shared/bsplibc.c.
    5555 */
    56 extern void cpu_init( void);
    57 
    5856void BSP_panic( char *s)
    5957{
     
    157155  myCpu = get_ppc_cpu_type();
    158156  myCpuRevision = get_ppc_cpu_revision();
    159 
    160   /* Basic CPU initialization */
    161   cpu_init();
    162157
    163158  /*
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c

    r93f8efa r6067359  
    2323{
    2424  register uint32_t   r1;
     25  uint32_t msr;
    2526
    2627  /*
     
    123124  _mtspr( M8xx_TBU_WR, r1 );
    124125  _mtspr( M8xx_TBL_WR, r1 );
     126  /* init the MMU */
     127  mmu_init();
     128
     129  /*
     130   * override setting from mmu_init:
     131   * make sure the cache is ON(!!!) when the MMU is disabled
     132   * otherwise the exception code will break
     133   */
     134  r1 = 0x04000e00;
     135  _mtspr( M8xx_MD_CTR, r1 );
     136
     137  /* Read MSR */
     138  msr = ppc_machine_state_register();
     139
     140  /* Enable data and instruction MMU in MSR */
     141  msr |= MSR_DR | MSR_IR;
     142
     143  /* Update MSR */
     144  ppc_set_machine_state_register( msr);
    125145}
    126 /*
    127  * further initialization (called from bsp_start)
    128  */
    129 void cpu_init(void)
    130 {
    131   /* mmu initialization */
    132   mmu_init();
    133 }
Note: See TracChangeset for help on using the changeset viewer.