Changes in boot/arch/riscv64/src/asm.S [0a78e4f:a35b458] in mainline
- File:
-
- 1 edited
-
boot/arch/riscv64/src/asm.S (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/riscv64/src/asm.S
r0a78e4f ra35b458 85 85 li x30, 0 86 86 li x31, 0 87 87 88 88 /* Set up stack, create stack frame */ 89 89 la sp, boot_stack + BOOT_STACK_SIZE 90 90 addi sp, sp, -16 91 91 92 92 j bootstrap 93 93 … … 97 97 /* Enable performance counters access in supervisor mode */ 98 98 csrsi mcounteren, MCOUNTEREN_CY_MASK | MCOUNTEREN_TM_MASK | MCOUNTEREN_IR_MASK 99 99 100 100 /* Setup SV48 paging for supervisor mode */ 101 101 la t0, ptl_0 102 102 srli t0, t0, 12 103 103 104 104 li t1, SATP_PFN_MASK 105 105 and t0, t0, t1 106 106 107 107 li t1, SATP_MODE_SV48 108 108 or t0, t0, t1 109 109 110 110 csrw sptbr, t0 111 111 112 112 /* Jump to supervisor mode */ 113 113 csrr t0, mstatus 114 114 115 115 li t1, ~MSTATUS_MPP_MASK 116 116 and t0, t0, t1 117 117 118 118 /* 119 119 * TODO: Enable running with Supervisor User Mode … … 122 122 li t1, MSTATUS_MPP_SUPERVISOR | MSTATUS_SUM_MASK 123 123 or t0, t0, t1 124 124 125 125 csrw mstatus, t0 126 126 127 127 li ra, PA2KA(BOOT_OFFSET) 128 128 csrw mepc, ra 129 129 130 130 mret 131 131 FUNCTION_END(jump_to_kernel)
Note:
See TracChangeset
for help on using the changeset viewer.
