#2
Valenciax2020-06-26 05:54
|
程序代码:
.set noreorder
.globl _start
.globl start
_start:
start:
.globl stack
stack = start - 0x4000
mtc0 zero, COP_0_STATUS_REG
mtc0 zero, COP_0_CAUSE_REG
li t0, SR_BOOT_EXC_VEC
mtc0 t0, COP_0_STATUS_REG
la sp, stack
bal uncached /* Switch to uncached address space */
nop
uncached:
or ra, UNCACHED_MEMORY_ADDR
j ra
nop
.globl _start
.globl start
_start:
start:
.globl stack
stack = start - 0x4000
mtc0 zero, COP_0_STATUS_REG
mtc0 zero, COP_0_CAUSE_REG
li t0, SR_BOOT_EXC_VEC
mtc0 t0, COP_0_STATUS_REG
la sp, stack
bal uncached /* Switch to uncached address space */
nop
uncached:
or ra, UNCACHED_MEMORY_ADDR
j ra
nop
引导代码bal为什么能够跳转到uncached执行(地址怎么计算的)?目的是什么?