KVM and serial additions #125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the timer and initialization subsystems to improve portability and support for both physical hardware and virtualized environments. It replaces the previous HPET-only timer implementation with a unified timer abstraction that automatically selects the appropriate timer source (HPET or KVM) based on the environment. Additionally, it enhances initialization progress reporting by outputting status messages via serial when framebuffer (LFB) output is unavailable, improving visibility for headless or serial-only systems.
Timer subsystem refactor:
drivers/hpet.asm) and replaced it with a new, unified timer driver (drivers/timer.asm) that supports both HPET and KVM timers, automatically selecting the correct source during initialization. [1] [2] [3]os_timer_initinstead of the HPET-specificos_hpet_init, ensuring the timer subsystem works in both physical and virtualized environments.Serial and output initialization improvements:
os_debug_stringsyscall for serial output and refactored progress reporting throughout initialization to use serial output when LFB is unavailable, ensuring status messages are visible in headless or serial-only setups. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Boot mode detection:
These changes improve hardware abstraction, initialization reliability, and diagnostics in diverse environments.