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

Subversion Repositories openrisc_me

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

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

Rev 393 Rev 425
Line 16... Line 16...
        l.movhi gpr, hi(symbol) ;      \
        l.movhi gpr, hi(symbol) ;      \
        l.ori   gpr, gpr, lo(symbol)
        l.ori   gpr, gpr, lo(symbol)
 
 
        // Really goes to configurable interrupt handler
        // Really goes to configurable interrupt handler
#define UNHANDLED_EXCEPTION            \
#define UNHANDLED_EXCEPTION            \
        l.addi  r1, r1, -128;          \
        l.addi  r1, r1, -256;          \
        l.sw    4(r1), r3;             \
        l.sw    4(r1), r3;             \
        l.sw    8(r1), r4;             \
        l.sw    8(r1), r4;             \
        l.mfspr r3,r0,SPR_NPC;          \
        l.mfspr r3,r0,SPR_NPC;          \
        l.mfspr r4,r0,SPR_EPCR_BASE;   \
        l.mfspr r4,r0,SPR_EPCR_BASE;   \
        l.j default_exception_handler; \
        l.j default_exception_handler; \
Line 69... Line 69...
        .org 0x500
        .org 0x500
#define TIMER_RELOAD_VALUE (SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD))
#define TIMER_RELOAD_VALUE (SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD))
        //UNHANDLED_EXCEPTION
        //UNHANDLED_EXCEPTION
        /* Simply load timer_ticks variable and increment */
        /* Simply load timer_ticks variable and increment */
        .extern timer_ticks
        .extern timer_ticks
        l.addi  r1, r1, -8
        l.addi  r1, r1, -136
        l.sw    0(r1), r25
        l.sw    0(r1), r25
        l.sw    4(r1), r26
        l.sw    4(r1), r26
        l.movhi r25, hi(timer_ticks)
        l.movhi r25, hi(timer_ticks)
        l.ori   r25, r25, lo(timer_ticks)
        l.ori   r25, r25, lo(timer_ticks)
        l.lwz   r26, 0(r25)                     /* Load variable addr.*/
        l.lwz   r26, 0(r25)                     /* Load variable addr.*/
Line 82... Line 82...
        l.movhi r25, hi(TIMER_RELOAD_VALUE)     /* Load timer value */
        l.movhi r25, hi(TIMER_RELOAD_VALUE)     /* Load timer value */
        l.ori   r25, r25, lo(TIMER_RELOAD_VALUE)
        l.ori   r25, r25, lo(TIMER_RELOAD_VALUE)
        l.mtspr r0, r25, SPR_TTMR               /* Reset timer */
        l.mtspr r0, r25, SPR_TTMR               /* Reset timer */
        l.lwz   r25, 0(r1)
        l.lwz   r25, 0(r1)
        l.lwz   r26, 4(r1)
        l.lwz   r26, 4(r1)
        l.addi  r1, r1, 8
        l.addi  r1, r1, 136
        l.rfe
        l.rfe
 
 
/* ---[ 0x600: Aligment exception ]-------------------------------------- */
/* ---[ 0x600: Aligment exception ]-------------------------------------- */
        .org 0x600
        .org 0x600
        UNHANDLED_EXCEPTION
        UNHANDLED_EXCEPTION
Line 389... Line 389...
        l.lwz    r29, 0x6c(r1)
        l.lwz    r29, 0x6c(r1)
        l.lwz    r30, 0x70(r1)
        l.lwz    r30, 0x70(r1)
        l.lwz    r31, 0x74(r1)
        l.lwz    r31, 0x74(r1)
        l.lwz    r32, 0x78(r1)
        l.lwz    r32, 0x78(r1)
 
 
        l.addi  r1, r1, 128
        l.addi  r1, r1, 256
 
 
        l.rfe
        l.rfe
        l.nop
        l.nop
 
 

powered by: WebSVN 2.1.0

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