Theseus icon indicating copy to clipboard operation
Theseus copied to clipboard

Debug state for PS/2 real hardware testing with logs

Open hecatia-elegua opened this issue 2 years ago • 5 comments

  • just prints out debug info to vga
  • should loop on error so you can see logs

Please try this as is and type some stuff, then update keyboard.keyboard_scancode_set(ScancodeSet::Set1)?; to use Set2 and maybe Set 3 as well. Some of these might print bogus scancode errors, I'm interested in seeing "ps2_keyboard_handler" logs.

Then also try putting an infinite loop in device_manager after the ps2 setup (I mean after all the ps2 setup is done, not just the controller), so I can see the debug logs of the setup.

(Of course this is just for testing, the real PR will come later)

hecatia-elegua avatar Mar 06 '23 21:03 hecatia-elegua

thanks! I have left comments and log files on discord.

In short, it works on my real hw and in QEMU normally! However, it doesn't work in QEMU with KVM enabled (make run host=yes), as that results in the virtual hw being different. So something's still not fully correct.

kevinaboos avatar Mar 08 '23 23:03 kevinaboos

I'd love to have automatic test runs on different emulators for making changes to something like this.

hecatia-elegua avatar Mar 09 '23 15:03 hecatia-elegua

yeah, that'd be great. We could do a qemu test easily, but everything else would be difficult, even kvm. Not sure about other emulators like VirtualBox or VMware.

kevinaboos avatar Mar 09 '23 19:03 kevinaboos

Shall we close this now that #884 has been merged in? Or did you want to keep it around for future usage?

kevinaboos avatar Mar 20 '23 18:03 kevinaboos

I would like to keep it around, especially for others to test real hardware as well. Might update it. Even better (and I will try this sometime) would be some feature/build option just for debug, or some more flexibility with respect to logging. Something like the log crate but for choosing in which scope debug/trace is enabled.

hecatia-elegua avatar Mar 20 '23 18:03 hecatia-elegua