mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-21 23:56:18 +04:00
Add conditional compilation for mipsel, fix heap size for thinpad
Signed-off-by: Harry Chen <i@harrychen.xyz>
This commit is contained in:
parent
22d29a6257
commit
fbca9a6e3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
build
|
||||
target
|
||||
/kernel/src/arch/x86_64/interrupt/vector.asm
|
||||
/kernel/src/arch/mipsel/boot/linker.ld
|
||||
*.gen.s
|
||||
*.dtb
|
||||
|
||||
|
@ -348,6 +348,7 @@ else ifeq ($(arch), mipsel)
|
||||
@for file in context entry trap ; do \
|
||||
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/$${file}.S -o src/arch/$(arch)/boot/$${file}.gen.s ; \
|
||||
done
|
||||
$(hostcc) -Dboard_$(board) -E src/arch/$(arch)/boot/linker.ld.S -o src/arch/$(arch)/boot/linker.ld
|
||||
@cargo xbuild $(build_args)
|
||||
endif
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
/// board specific constants
|
||||
pub const MEMORY_END: usize = 0x8080_0000;
|
||||
pub const KERNEL_HEAP_SIZE: usize = 0x0044_0000;
|
||||
pub const KERNEL_HEAP_SIZE: usize = 0x0038_0000;
|
||||
|
@ -4,7 +4,11 @@
|
||||
OUTPUT_ARCH(riscv)
|
||||
ENTRY(_start)
|
||||
|
||||
#ifdef board_thinpad
|
||||
BASE_ADDRESS = 0x80000000;
|
||||
#else
|
||||
BASE_ADDRESS = 0x80100000;
|
||||
#endif
|
||||
|
||||
SECTIONS
|
||||
{
|
@ -2,11 +2,16 @@
|
||||
///
|
||||
pub use super::board::consts::*;
|
||||
|
||||
pub const MEMORY_OFFSET: usize = 0x80000000;
|
||||
pub const KERNEL_OFFSET: usize = 0x80100000;
|
||||
pub const PHYSICAL_MEMORY_OFFSET: usize = 0x80000000;
|
||||
pub const MEMORY_OFFSET: usize = 0x8000_0000;
|
||||
|
||||
pub const USER_STACK_OFFSET: usize = 0x70000000 - USER_STACK_SIZE;
|
||||
#[cfg(feature = "board_thinpad")]
|
||||
pub const KERNEL_OFFSET: usize = 0x8000_0000;
|
||||
#[cfg(feature = "board_malta")]
|
||||
pub const KERNEL_OFFSET: usize = 0x8010_0000;
|
||||
|
||||
pub const PHYSICAL_MEMORY_OFFSET: usize = 0x8000_0000;
|
||||
|
||||
pub const USER_STACK_OFFSET: usize = 0x7000_0000 - USER_STACK_SIZE;
|
||||
pub const USER_STACK_SIZE: usize = 0x10000;
|
||||
|
||||
pub const MAX_DTB_SIZE: usize = 0x2000;
|
||||
|
@ -10,7 +10,7 @@ pub mod console;
|
||||
/// Initialize common drivers
|
||||
pub fn init() {
|
||||
board::init_driver();
|
||||
// console::init();
|
||||
console::init();
|
||||
if let Some(con) = console::CONSOLE.lock().as_mut() {
|
||||
con.clear();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user