Signed-off-by: Harry Chen <i@harrychen.xyz>master
parent
3d083eec0c
commit
a2e98d73fd
@ -1,3 +1,3 @@
|
|||||||
/// board specific constants for malta
|
/// board specific constants
|
||||||
pub const MEMORY_END: usize = 0x8800_0000;
|
pub const MEMORY_END: usize = 0x8800_0000;
|
||||||
pub const KERNEL_HEAP_SIZE: usize = 0x00a0_0000;
|
pub const KERNEL_HEAP_SIZE: usize = 0x00a0_0000;
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
/// board specific constants
|
||||||
|
pub const MEMORY_END: usize = 0x8800_0000;
|
||||||
|
pub const KERNEL_HEAP_SIZE: usize = 0x00a0_0000;
|
@ -0,0 +1,36 @@
|
|||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "qemu mipssim";
|
||||||
|
compatible = "qemu,mipssim";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdio = &uart0;
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases { };
|
||||||
|
|
||||||
|
cpu_intc: interrupt-controller {
|
||||||
|
compatible = "mti,cpu-interrupt-controller";
|
||||||
|
interrupt-controller;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
main_memory: memory@0 {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x00000000 0x10000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0: serial@bfd003f8 {
|
||||||
|
compatible = "ns16550a";
|
||||||
|
reg = <0xbfd003f8 0x8>;
|
||||||
|
clock-frequency = <1843200>;
|
||||||
|
/* attached to the MIPS CPU INT2 pin, ie interrupt 4 */
|
||||||
|
interrupt-parent = <&cpu_intc>;
|
||||||
|
interrupts = <4>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,27 @@
|
|||||||
|
use once::*;
|
||||||
|
use alloc::string::String;
|
||||||
|
|
||||||
|
#[path = "../../../../drivers/serial/16550_reg.rs"]
|
||||||
|
pub mod serial;
|
||||||
|
#[path = "../../../../drivers/gpu/fb.rs"]
|
||||||
|
pub mod fb;
|
||||||
|
#[path = "../../../../drivers/console/mod.rs"]
|
||||||
|
pub mod console;
|
||||||
|
pub mod consts;
|
||||||
|
|
||||||
|
/// Initialize serial port first
|
||||||
|
pub fn init_serial_early() {
|
||||||
|
assert_has_not_been_called!("board::init must be called only once");
|
||||||
|
serial::init(0xbfd003f8);
|
||||||
|
println!("Hello QEMU MIPSSIM!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Initialize other board drivers
|
||||||
|
pub fn init_driver() {
|
||||||
|
// TODO: add possibly more drivers
|
||||||
|
// timer::init();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn probe_fb_info(_width: u32, _height: u32, _depth: u32) -> Result<(fb::FramebufferInfo, usize), String> {
|
||||||
|
Err(String::from("Framebuffer not usable on mipssim board"))
|
||||||
|
}
|
@ -1,3 +1,3 @@
|
|||||||
/// board specific constants for thinpad
|
/// board specific constants
|
||||||
pub const MEMORY_END: usize = 0x8080_0000;
|
pub const MEMORY_END: usize = 0x8080_0000;
|
||||||
pub const KERNEL_HEAP_SIZE: usize = 0x0020_0000;
|
pub const KERNEL_HEAP_SIZE: usize = 0x0020_0000;
|
||||||
|
Loading…
Reference in new issue