Debug all driver activity to display:1, use format to avoid line splitting
This commit is contained in:
parent
d71081110e
commit
418149bb07
1 changed files with 43 additions and 70 deletions
|
|
@ -28,6 +28,8 @@ fn main() {
|
|||
let irq_str = args.next().expect("rtl8168d: no irq provided");
|
||||
let irq = irq_str.parse::<u8>().expect("rtl8168d: failed to parse irq");
|
||||
|
||||
print!("{}", format!(" + RTL8168 on: {:X}, IRQ: {}", bar, irq));
|
||||
|
||||
thread::spawn(move || {
|
||||
unsafe {
|
||||
syscall::iopl(3).expect("rtl8168d: failed to get I/O permission");
|
||||
|
|
@ -41,7 +43,7 @@ fn main() {
|
|||
|
||||
let address = unsafe { syscall::physmap(bar, 256, MAP_WRITE).expect("rtl8168d: failed to map address") };
|
||||
{
|
||||
let device = Arc::new(RefCell::new(unsafe { device::Rtl8168::new(address, irq).expect("rtl8168d: failed to allocate device") }));
|
||||
let device = Arc::new(RefCell::new(unsafe { device::Rtl8168::new(address).expect("rtl8168d: failed to allocate device") }));
|
||||
|
||||
let mut event_queue = EventQueue::<usize>::new().expect("rtl8168d: failed to create event queue");
|
||||
|
||||
|
|
@ -56,8 +58,6 @@ fn main() {
|
|||
|
||||
let isr = unsafe { device_irq.borrow_mut().irq() };
|
||||
if isr != 0 {
|
||||
println!("RTL8168 ISR {:X}", isr);
|
||||
|
||||
irq_file.write(&mut irq)?;
|
||||
|
||||
let mut todo = todo_irq.borrow_mut();
|
||||
|
|
|
|||
Loading…
Reference in a new issue