OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [drivers/] [or1200/] [crt0.S] - Diff between revs 485 and 488

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 485 Rev 488
Line 91... Line 91...
 
 
/* ---[ 0x400: Insn Page Fault exception ]------------------------------- */
/* ---[ 0x400: Insn Page Fault exception ]------------------------------- */
        .org 0x400
        .org 0x400
        EXCEPTION_HANDLER
        EXCEPTION_HANDLER
 
 
 
 
/* ---[ 0x500: Timer exception ]----------------------------------------- */
/* ---[ 0x500: Timer exception ]----------------------------------------- */
        .org 0x500
        .org 0x500
#define TIMER_RELOAD_VALUE (SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD))
        EXCEPTION_HANDLER
        //EXCEPTION_HANDLER
 
        /* Simply load timer_ticks variable and increment */
 
        .extern timer_ticks
 
        l.addi  r1, r1, -136
 
        l.sw    0(r1), r25
 
        l.sw    4(r1), r26
 
        l.movhi r25, hi(timer_ticks)
 
        l.ori   r25, r25, lo(timer_ticks)
 
        l.lwz   r26, 0(r25)                     /* Load variable addr.*/
 
        l.addi  r26, r26, 1                     /* Increment variable */
 
        l.sw    0(r25), r26                     /* Store variable */
 
        l.movhi r25, hi(TIMER_RELOAD_VALUE)     /* Load timer value */
 
        l.ori   r25, r25, lo(TIMER_RELOAD_VALUE)
 
        l.mtspr r0, r25, SPR_TTMR               /* Reset timer */
 
        l.lwz   r25, 0(r1)
 
        l.lwz   r26, 4(r1)
 
        l.addi  r1, r1, 136
 
        l.rfe
 
 
 
/* ---[ 0x600: Aligment exception ]-------------------------------------- */
/* ---[ 0x600: Aligment exception ]-------------------------------------- */
        .org 0x600
        .org 0x600
        EXCEPTION_HANDLER
        EXCEPTION_HANDLER
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.