Move text base to higher location to avoid colliding with qemu BIOS

master
Yuhao Zhou 6 years ago
parent fb08410cb5
commit 9a9e8048cb

@ -22,7 +22,7 @@ _start:
mtc0 t0, $12 mtc0 t0, $12
# directly jump to main function # directly jump to main function
b rust_main j rust_main
nop nop
.section .bss.stack .section .bss.stack

@ -4,7 +4,7 @@
OUTPUT_ARCH(riscv) OUTPUT_ARCH(riscv)
ENTRY(_start) ENTRY(_start)
BASE_ADDRESS = 0x80000000; BASE_ADDRESS = 0x80100000;
SECTIONS SECTIONS
{ {

@ -3,7 +3,7 @@
pub use super::board::consts::*; pub use super::board::consts::*;
pub const KERNEL_OFFSET: usize = 0x80000000; pub const KERNEL_OFFSET: usize = 0x80100000;
pub const MEMORY_OFFSET: usize = 0x8000_0000; pub const MEMORY_OFFSET: usize = 0x8000_0000;

@ -54,9 +54,9 @@ lazy_static! {
fn _user_img_start(); fn _user_img_start();
fn _user_img_end(); fn _user_img_end();
} }
println!("Sfs start {:x}, end {:x}", _user_img_start as usize, _user_img_end as usize);
Arc::new(unsafe { device::MemBuf::new(_user_img_start, _user_img_end) }) Arc::new(unsafe { device::MemBuf::new(_user_img_start, _user_img_end) })
}; };
let sfs = SimpleFileSystem::open(device).expect("failed to open SFS"); let sfs = SimpleFileSystem::open(device).expect("failed to open SFS");
sfs.root_inode() sfs.root_inode()
}; };

Loading…
Cancel
Save