Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kernel): parse timebase-frequency into hart local state #183

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

JonasKruckenberg
Copy link
Owner

@JonasKruckenberg JonasKruckenberg commented Dec 17, 2024

This change restructures the kernels MachineInfo struct into a MachineInfo and a TLS HartLocalMachineInfo. The reason for doing so is that HartLocalMachineInfo now tracks the hart-local timebase-frequency property required for converting the Riscv logical realtime clock value into a wall-clock value.

It also introduces the necessary low-level riscv::register::time primitives to read the realtime clock register.

This change restructures the kernels `MachineInfo` struct into a `MachineInfo` and a TLS `HartLocalMachineInfo`. The reason for doing so is that `HartLocalMachineInfo` now tracks the hart-local `timebase-frequency` property required for converting the Riscv logical realtime clock value into a wall-clock value.
@JonasKruckenberg JonasKruckenberg changed the title feat(kernel): hart local machine info & timebase-frequency feat(kernel): parse timebase-frequency into hart local state Dec 17, 2024
@JonasKruckenberg JonasKruckenberg merged commit e8d73a1 into main Dec 17, 2024
8 checks passed
@JonasKruckenberg JonasKruckenberg deleted the jonas/feat-hart-local-machine-info branch December 29, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant