Skip to content

Commit

Permalink
Don't change the uart at this point
Browse files Browse the repository at this point in the history
Signed-off-by: Graham MacDonald <[email protected]>
  • Loading branch information
gmacd authored and orangecms committed Apr 19, 2023
1 parent f79d972 commit 207a8a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions aarch64/src/devcons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::mem::MaybeUninit;
use port::devcons::Console;
use port::fdt::DeviceTree;

use crate::uartpl011::Pl011Uart;
use crate::uartmini::MiniUart;

// The aarch64 devcons implementation is focussed on Raspberry Pi 3, 4 for now.

Expand Down Expand Up @@ -34,11 +34,11 @@ use crate::uartpl011::Pl011Uart;
pub fn init(dt: &DeviceTree) {
// Create early console because aarch64 can't use locks until MMU is set up
Console::new_early(|| {
let uart = Pl011Uart::new(dt);
// let uart = MiniUart::new(dt);
// let uart = Pl011Uart::new(dt);
let uart = MiniUart::new(dt);
uart.init();

static mut UART: MaybeUninit<Pl011Uart> = MaybeUninit::uninit();
static mut UART: MaybeUninit<MiniUart> = MaybeUninit::uninit();
unsafe {
UART.write(uart);
UART.assume_init_mut()
Expand Down
2 changes: 1 addition & 1 deletion aarch64/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub extern "C" fn main9(dtb_ptr: u64) {
print_binary_sections();

// Assume we've got MMU set up, so drop early console for the locking console
//port::devcons::drop_early_console();
port::devcons::drop_early_console();

print_physical_memory_map();

Expand Down
10 changes: 5 additions & 5 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ fn run(build_params: &BuildParams) -> Result<()> {

// TODO Choose UART at cmdline
// If using UART0 (PL011), this enables serial
cmd.arg("-nographic");
//cmd.arg("-nographic");

// If using UART1 (MiniUART), this enables serial
// cmd.arg("-serial");
// cmd.arg("null");
// cmd.arg("-serial");
// cmd.arg("stdio");
cmd.arg("-serial");
cmd.arg("null");
cmd.arg("-serial");
cmd.arg("stdio");

cmd.arg("-M");
cmd.arg("raspi3b");
Expand Down

0 comments on commit 207a8a5

Please sign in to comment.