Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/riscv64/src/asm.S

    r0a78e4f ra35b458  
    8585        li x30, 0
    8686        li x31, 0
    87        
     87
    8888        /* Set up stack, create stack frame */
    8989        la sp, boot_stack + BOOT_STACK_SIZE
    9090        addi sp, sp, -16
    91        
     91
    9292        j bootstrap
    9393
     
    9797        /* Enable performance counters access in supervisor mode */
    9898        csrsi mcounteren, MCOUNTEREN_CY_MASK | MCOUNTEREN_TM_MASK | MCOUNTEREN_IR_MASK
    99        
     99
    100100        /* Setup SV48 paging for supervisor mode */
    101101        la t0, ptl_0
    102102        srli t0, t0, 12
    103        
     103
    104104        li t1, SATP_PFN_MASK
    105105        and t0, t0, t1
    106        
     106
    107107        li t1, SATP_MODE_SV48
    108108        or t0, t0, t1
    109        
     109
    110110        csrw sptbr, t0
    111        
     111
    112112        /* Jump to supervisor mode */
    113113        csrr t0, mstatus
    114        
     114
    115115        li t1, ~MSTATUS_MPP_MASK
    116116        and t0, t0, t1
    117        
     117
    118118        /*
    119119         * TODO: Enable running with Supervisor User Mode
     
    122122        li t1, MSTATUS_MPP_SUPERVISOR | MSTATUS_SUM_MASK
    123123        or t0, t0, t1
    124        
     124
    125125        csrw mstatus, t0
    126        
     126
    127127        li ra, PA2KA(BOOT_OFFSET)
    128128        csrw mepc, ra
    129        
     129
    130130        mret
    131131FUNCTION_END(jump_to_kernel)
Note: See TracChangeset for help on using the changeset viewer.