mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-23 00:16:17 +04:00
Move text base to higher location to avoid colliding with qemu BIOS
This commit is contained in:
parent
fb08410cb5
commit
9a9e8048cb
@ -22,7 +22,7 @@ _start:
|
||||
mtc0 t0, $12
|
||||
|
||||
# directly jump to main function
|
||||
b rust_main
|
||||
j rust_main
|
||||
nop
|
||||
|
||||
.section .bss.stack
|
||||
|
@ -4,7 +4,7 @@
|
||||
OUTPUT_ARCH(riscv)
|
||||
ENTRY(_start)
|
||||
|
||||
BASE_ADDRESS = 0x80000000;
|
||||
BASE_ADDRESS = 0x80100000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
pub use super::board::consts::*;
|
||||
|
||||
pub const KERNEL_OFFSET: usize = 0x80000000;
|
||||
pub const KERNEL_OFFSET: usize = 0x80100000;
|
||||
|
||||
pub const MEMORY_OFFSET: usize = 0x8000_0000;
|
||||
|
||||
|
@ -54,9 +54,9 @@ lazy_static! {
|
||||
fn _user_img_start();
|
||||
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) })
|
||||
};
|
||||
|
||||
let sfs = SimpleFileSystem::open(device).expect("failed to open SFS");
|
||||
sfs.root_inode()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user