forked from rcore-os/zCore
fix(d1): 修复在 d1 无法启动的问题
This commit is contained in:
parent
0f658c8158
commit
b6bca47e94
|
@ -227,7 +227,7 @@ endif
|
|||
|
||||
ifeq ($(ARCH), x86_64)
|
||||
gdb := gdb
|
||||
else
|
||||
else
|
||||
gdb := riscv64-unknown-elf-gdb
|
||||
endif
|
||||
|
||||
|
@ -289,7 +289,7 @@ ifeq ($(PLATFORM), d1)
|
|||
run_d1: build
|
||||
$(OBJCOPY) ../prebuilt/firmware/d1/fw_payload.elf --strip-all -O binary ./zcore_d1.bin
|
||||
dd if=$(kernel_img) of=zcore_d1.bin bs=512 seek=2048
|
||||
xfel ddr ddr3
|
||||
xfel ddr d1
|
||||
xfel write 0x40000000 zcore_d1.bin
|
||||
xfel exec 0x40000000
|
||||
endif
|
||||
|
|
|
@ -50,8 +50,8 @@ impl BootPageTable {
|
|||
// 设置线程指针
|
||||
asm!("mv tp, {}", in(reg) hartid);
|
||||
// 设置内核可访问用户页
|
||||
let sstatus: usize;
|
||||
asm!("csrrsi {}, sstatus, 18", out(reg) sstatus);
|
||||
let mut sstatus = 1usize << 18;
|
||||
asm!("csrrs {0}, sstatus, {0}", inlateout(reg) sstatus);
|
||||
sstatus
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue