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

refac(hal-x86_64): move pit and tsc into time #356

Merged
merged 3 commits into from
Oct 22, 2022
Merged

refac(hal-x86_64): move pit and tsc into time #356

merged 3 commits into from
Oct 22, 2022

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Oct 22, 2022

This commit moves the pit and tsc modules out of interrupt and cpu, and into a new time module. This feels like a better organization of things, IMO.

This commit moves the `pit` and `tsc` modules out of `interrupt` and
`cpu`, and into a new `time` module. This feels like a better
organization of things, IMO.
@hawkw hawkw closed this Oct 22, 2022
@hawkw hawkw reopened this Oct 22, 2022
@hawkw hawkw marked this pull request as ready for review October 22, 2022 17:49
@hawkw hawkw enabled auto-merge (squash) October 22, 2022 17:49
@hawkw hawkw disabled auto-merge October 22, 2022 18:04
@hawkw hawkw merged commit b99fb81 into main Oct 22, 2022
@hawkw hawkw deleted the eliza/x86-time branch October 22, 2022 18:04
hawkw added a commit that referenced this pull request Oct 22, 2022
This branch adds support for APIC interrupt handling on x86_64 systems.
In order to support Survival MultiPlayer, we need to be able to handle
interrupts using the APIC rather than the PICs, because the APIC
interrupt model allows multiple CPU cores to handle interrupts.

This is part of the work towards SMP support (#345).

This is a large change to the `hal-x86_64` crate's `interrupt` module in
order to add types representing the `LocalApic` and `IoApic`, and to
change the interrupt controller abstraction to switch to handling
interrupts using APICs if the system has APICs. If APICs are not
detected, we continue to use the PICs, but cannot support SMP.

In addition, the kernel is updated to use the new HAL APIs.

Several smaller changes to other parts of mycelium have been factored
out from this PR to merge separately:

* b99fb81 refac(hal-x86_64): move `pit` and `tsc` into `time` (#356)
* 9994cd5 feat(hal-x86_64): add PIT driver (#355)
* 30431a9 fix(trace): weird indentation on new spans (#354)
* 91e97b7 feat(hal-x86_64): add `cpu::Msr` type for accessing MSRs
  (#353)

We'll probably want to make additional changes to the new interrupt code
in subsequent PRs, but this is enough to get mycelium to use the APICs,
and demonstrate that he `maitake` timer wheel still works using the
local APIC timer).
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