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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [boards/] [s3e-500/] [start.s] - Diff between revs 201 and 242

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

Rev 201 Rev 242
Line 1... Line 1...
;
;
; start.s -- ECO32 ROM monitor startup and support routines
; start.s -- ECO32 ROM monitor startup and support routines
;
;
 
 
        .set    CIO_CTL,0x00            ; set console to keyboard/display
        .set    BIO_BASE,0xF1000000     ; board I/O base address
;       .set    CIO_CTL,0x03            ; set console to serial line 0
        .set    BIO_WR,BIO_BASE+0
 
        .set    SPI_EN,0x80000000       ; SPI bus enable ctrl bit
 
        .set    BIO_RD,BIO_BASE+4
 
        .set    CIO_CTRL,0x08           ; this bit controls console I/O
 
 
 
        .set    CIO_KBD_DSP,0x00        ; set console to keyboard/display
 
        .set    CIO_SERIAL_0,0x03       ; set console to serial line 0
 
 
        .set    dmapaddr,0xC0000000     ; base of directly mapped addresses
        .set    dmapaddr,0xC0000000     ; base of directly mapped addresses
        .set    stacktop,0xC0010000     ; monitor stack is at top of 64K
        .set    stacktop,0xC0010000     ; monitor stack is at top of 64K
 
 
        .set    PSW,0                    ; reg # of PSW
        .set    PSW,0                    ; reg # of PSW
Line 19... Line 25...
        .set    BAD_ADDRESS,4           ; reg # of bad address reg
        .set    BAD_ADDRESS,4           ; reg # of bad address reg
        .set    BAD_ACCESS,5            ; reg # of bad access reg
        .set    BAD_ACCESS,5            ; reg # of bad access reg
 
 
        .set    USER_CONTEXT_SIZE,38*4  ; size of user context
        .set    USER_CONTEXT_SIZE,38*4  ; size of user context
 
 
        .set    BIO_OUT,0xF1000000      ; board I/O output port
 
        .set    SPI_EN,0x80000000       ; SPI bus enable ctrl bit
 
 
 
;***************************************************************
;***************************************************************
 
 
        .import _ecode
        .import _ecode
        .import _edata
        .import _edata
        .import _ebss
        .import _ebss
Line 160... Line 163...
        ; let irq/exc vectors point to RAM
        ; let irq/exc vectors point to RAM
        add     $8,$0,V
        add     $8,$0,V
        mvts    $8,PSW
        mvts    $8,PSW
 
 
        ; disable flash ROM, enable SPI bus
        ; disable flash ROM, enable SPI bus
        add     $8,$0,BIO_OUT
        add     $8,$0,BIO_WR
        add     $9,$0,SPI_EN
        add     $9,$0,SPI_EN
        stw     $9,$8,0
        stw     $9,$8,0
 
 
        ; initialize TLB
        ; initialize TLB
        mvts    $0,TLB_ENTRY_LO          ; invalidate all TLB entries
        mvts    $0,TLB_ENTRY_LO          ; invalidate all TLB entries
Line 208... Line 211...
        jal     dspinit                 ; init display
        jal     dspinit                 ; init display
        jal     ser0init                ; init serial line 0
        jal     ser0init                ; init serial line 0
        jal     ser1init                ; init serial line 1
        jal     ser1init                ; init serial line 1
        jal     dskinitctl              ; init disk (controller)
        jal     dskinitctl              ; init disk (controller)
        jal     dskinitser              ; init disk (serial line)
        jal     dskinitser              ; init disk (serial line)
        add     $4,$0,CIO_CTL            ; set console
        ldw     $8,$0,BIO_RD             ; get switch settings
 
        and     $8,$8,CIO_CTRL
 
        add     $4,$0,CIO_SERIAL_0       ; set console to serial line
 
        bne     $8,$0,swtchset
 
        add     $4,$0,CIO_KBD_DSP        ; set console to kbd/dsp
 
swtchset:
        jal     setcio
        jal     setcio
 
 
        ; call main
        ; call main
        jal     main                    ; enter command loop
        jal     main                    ; enter command loop
 
 

powered by: WebSVN 2.1.0

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