feat(rtc): rtc driver implementation initial setup #626
Merged
Conversation
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
Signed-off-by: Koichi <koichi.imai.2@tier4.jp>
…o feat/rtc_driver_first
veqcc
reviewed
Aug 8, 2025
veqcc
reviewed
Aug 8, 2025
Collaborator
|
Just curiosity, why did you implement this driver? |
Contributor
Author
Since we need time management system for handling things like access times in the file system. While this may seem redundant once NTP is implemented, it's still good to have a reliable time source to fall back on if NTP synchronization fails. Also, another reason is to build a time management framework into Awkernel now, which will make future integration with NTP much smoother. |
ytakano
approved these changes
Aug 8, 2025
veqcc
approved these changes
Aug 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Implemented rtc driver. This is a initial PR to prepare some register constants and the fundamental functions used.
mc146818 is the real time clock broadly used in x86 architecture, and I've checked that I could successfully get the time.
Related links
mc146818_read
https://github.com/openbsd/src/blob/ca647cfa4ec3ccb8360714bc0ebc32a394f7fb6a/sys/arch/amd64/isa/clock.c#L142
mc146818_write
https://github.com/openbsd/src/blob/ca647cfa4ec3ccb8360714bc0ebc32a394f7fb6a/sys/arch/amd64/isa/clock.c#L150
Registers constant
https://github.com/openbsd/src/blob/ca647cfa4ec3ccb8360714bc0ebc32a394f7fb6a/sys/dev/ic/mc146818reg.h#L65-L112
outb
https://github.com/openbsd/src/blob/ca647cfa4ec3ccb8360714bc0ebc32a394f7fb6a/sys/arch/amd64/include/pio.h#L147
inb
https://github.com/openbsd/src/blob/ca647cfa4ec3ccb8360714bc0ebc32a394f7fb6a/sys/arch/amd64/include/pio.h#L57
How was this PR tested?
Notes for reviewers