diff --git a/kernel/Makefile b/kernel/Makefile index b156828..ec9f892 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -127,7 +127,7 @@ else ifeq ($(arch), mipsel) ifeq ($(board), malta) qemu_opts += \ -machine $(board) \ - -serial none -serial none -serial mon:stdio \ + -serial mon:stdio \ -kernel $(kernel_img) endif endif diff --git a/kernel/src/arch/mipsel/board/malta/device.dts b/kernel/src/arch/mipsel/board/malta/device.dts index c68424b..ddaaa72 100644 --- a/kernel/src/arch/mipsel/board/malta/device.dts +++ b/kernel/src/arch/mipsel/board/malta/device.dts @@ -24,6 +24,12 @@ reg = <0x00000000 0x10000000>; }; + uart0: serial@b80003f8 { + compatible = "ns16550a"; + reg = <0xb80003f8 0x8>; + clock-frequency = <1843200>; + }; + uart2: serial@bf000900 { compatible = "ns16550a"; reg = <0xbf000900 0x40>; diff --git a/kernel/src/arch/mipsel/board/malta/mod.rs b/kernel/src/arch/mipsel/board/malta/mod.rs index f5f892a..d9b9d0b 100644 --- a/kernel/src/arch/mipsel/board/malta/mod.rs +++ b/kernel/src/arch/mipsel/board/malta/mod.rs @@ -10,7 +10,7 @@ pub mod console; /// Initialize serial port first pub fn init_serial_early() { assert_has_not_been_called!("board::init must be called only once"); - serial::init(0xbf000900); + serial::init(0xb80003f8); println!("Hello QEMU Malta!"); }