Skip to content

Commit

Permalink
asrock/a300m-stx: switch to port 0x80 debug output
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Maslowski <info@orangecms.org>
  • Loading branch information
orangecms committed May 14, 2021
1 parent 6115722 commit 7c07aae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/mainboard/asrock/a300m-stx/src/mainboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ where

// WIP: mainboard driver. I mean the concept is a WIP.
pub struct MainBoard {
com1: I8250<IOPort>,
// debug: DebugPort<IOPort>,
// com1: I8250<IOPort>,
debug: DebugPort<IOPort>,
}

impl MainBoard {
pub fn new() -> MainBoard {
// Uncomment for port 0x80 testing, but it's sluggish and mutually
// exclusive on the super I/O
// Self { debug: DebugPort::new(0x80, IOPort {}) }
Self { com1: I8250::new(0x3f8, 0, IOPort {}) }
Self { debug: DebugPort::new(0x80, IOPort {}) }
// Self { com1: I8250::new(0x3f8, 0, IOPort {}) }
}
pub fn text_output_drivers(&mut self) -> [&mut dyn Driver; 1] {
// [&mut self.debug]
[&mut self.com1]
[&mut self.debug]
// [&mut self.com1]
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/mainboard/asrock/a300m-stx/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ movb $0x21, %al ##
outb %al, $0x2f

# 2f -> 40; uncomment to switch to port 0x80 forward instead of 3f8 on UART
##movb $0x2f, %al ##
##outb %al, $0x2e
##movb $0x40, %al ##
##outb %al, $0x2f
movb $0x2f, %al ##
outb %al, $0x2e
movb $0x40, %al ##
outb %al, $0x2f

######## LDN 0x07 ########
## not yet working, probably relies on some global registers
Expand Down

0 comments on commit 7c07aae

Please sign in to comment.