ktf
ktf copied to clipboard
[Feature] Add debug-keys support
Is your feature request related to a problem? Please describe. When UART input or PS/2 keyboard support is added, we can add debug keys support for various runtime actions.
Describe the solution you'd like
I would implement a register_debugkey(key, callback, help_msg) interface to assign callback functions to dedicated key combinations.
I would support the following keys:
- [ ] '?' - list all registered keys, functions and help msgs
- [ ] 'p' - pause execution of BSP (or all CPUs - that would require IPI support)
- [ ] 'u' - unpause the above
- [ ] 'r' - dump register content
- [ ] 't' - dump page tables content
- [ ] 'c' - crash
- [ ] '+' - toggle debug mode