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

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [boot-loader-ethmac/] [start.S] - Diff between revs 61 and 78

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

Rev 61 Rev 78
Line 190... Line 190...
        mov     r0, #0
        mov     r0, #0
        mov     pc, r4
        mov     pc, r4
 
 
 
 
service_irq:
service_irq:
        @ Save all registers to the stack
        @ As this is an interrupt, need tp save all registers to the stack
        stmfd   sp!, {r0-r12, lr}
        stmfd   sp!, {r0-r3, lr}
 
 
        @ is it a timer interrupt ?
        @ is it a timer interrupt ?
        ldr     r0, AdrInterruptStatus
        ldr     r0, AdrInterruptStatus
        ldr     r1, [r0]
        ldr     r3, [r0]
        ands    r2, r1, #0x20
        ands    r2, r3, #0x20
        beq     1f  @ not timer int, jump
        beq     1f  @ not timer int, jump
 
        @ Remember that registers r0 to r2 can be changed by this function
        .extern timer_interrupt
        .extern timer_interrupt
        bl timer_interrupt
        bl timer_interrupt
 
 
        @ is it an ethernet interrupt ?
        @ is it an ethernet interrupt ?
1:      ands    r2, r1, #0x100
1:      ands    r2, r3, #0x100
        beq     2f  @ not ethmac int, jump
        beq     2f  @ not ethmac int, jump
        .extern ethmac_interrupt
        .extern ethmac_interrupt
 
        @ Remember that registers r0 to r2 can be changed by this function
        bl ethmac_interrupt
        bl ethmac_interrupt
 
 
 
 
2:      @ Restore all registers from the stack
2:      @ Restore all registers from the stack
        ldmfd   sp!, {r0-r12, lr}
        ldmfd   sp!, {r0-r3, lr}
 
 
        @ Jump straight back to normal execution
        @ Jump straight back to normal execution
        subs    pc, lr, #4
        subs    pc, lr, #4
 
 
 
 
Line 460... Line 462...
        str     r2, [r1]
        str     r2, [r1]
 
 
        mov     pc, lr
        mov     pc, lr
 
 
 
 
 
        .global serial_putchar_
 
serial_putchar_:
 
        ldr     r1, AdrUARTDR
 
        ldr     r3, AdrUARTFR
 
        @ Check the tx_full flag
 
1:      ldr     r2, [r3]
 
        and     r2, r2, #0x20
 
        cmp     r2, #0
 
        streqb  r0, [r1]
 
        moveqs  pc, lr          @ return
 
        bne     1b
 
 
 
 
/* stack at top of ddr3 memory space */
/* stack at top of ddr3 memory space */
AdrJumpPoint:               .word _jump_point
AdrJumpPoint:               .word _jump_point
AdrExecBase:                .word ADR_EXEC_BASE
AdrExecBase:                .word ADR_EXEC_BASE
AdrStack:                   .word ADR_STACK
AdrStack:                   .word ADR_STACK
AdrIRQStack:                .word ADR_IRQ_STACK
AdrIRQStack:                .word ADR_IRQ_STACK
Line 473... Line 488...
 
 
AdrMemCtrl:                 .word ADR_AMBER_TEST_MEM_CTRL
AdrMemCtrl:                 .word ADR_AMBER_TEST_MEM_CTRL
AdrTestStatus:              .word ADR_AMBER_TEST_STATUS
AdrTestStatus:              .word ADR_AMBER_TEST_STATUS
AdrInterruptStatus:         .word ADR_AMBER_IC_IRQ0_STATUS
AdrInterruptStatus:         .word ADR_AMBER_IC_IRQ0_STATUS
 
 
 
AdrUARTDR:                  .word ADR_AMBER_UART0_DR
 
AdrUARTFR:                  .word ADR_AMBER_UART0_FR
 
 
                            .align 2
                            .align 2
AdrATAGBase:                .word ATAGBase
AdrATAGBase:                .word ATAGBase
AdeEndATAG:                 .word EndATAG
AdeEndATAG:                 .word EndATAG
 
 
ATAGBase:                   .word ATAG_CORE_SIZE
ATAGBase:                   .word ATAG_CORE_SIZE

powered by: WebSVN 2.1.0

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