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

start on SMP bringup #347

Merged
merged 6 commits into from
Oct 14, 2022
Merged

start on SMP bringup #347

merged 6 commits into from
Oct 14, 2022

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Oct 14, 2022

No description provided.

This commit implements the `AcpiHandler` glue trait from the `acpi`
crate to allow using `acpi` in the kernel. This trait is responsible for
mapping physical memory regions that contain ACPI tables.

In this case, we know these memory regions are identity mapped, so we
don't actually have to map and unmap pages in order to implement this
trait. Instead, we just have to calculate the virtual address based on
the kernel's virtual memory offset and tell the `acpi` crate to use that
region.
hawkw added a commit that referenced this pull request Oct 14, 2022
The `x86_64.rs` file has just kind of been a dumping ground for random
arch stuff for a while. This commit pulls out the `bootloader` crate
glue code and the tests into separate files.
hawkw added a commit that referenced this pull request Oct 14, 2022
This commit starts on #345 by using the `acpi` crate to read information
from the ACPI tables related to SMP. It adds an `acpi::bringup_smp`
function in `arch::x86_64`, but this function doesn't *currently*
actually bring up application processors. Instead, it just reads data
from the ACPI tables and logs it as a way to check that we are, in fact,
able to find the information we need.

Additionally, I added a new `ArchInfo` struct that contains opaque
architecture-specific data from the bootloader's boot info. This is
passed into the `kernel_start` function, but the cross-platform kernel
code doesn't consume it --- instead, it's just provided so it can be
passed back into `arch_init` once we've done cross-platform setup stuff.
This felt better than sticking the RSDP addr in a global variable or
something...

This is a first step towards #345. Future commits will actually switch
to IOAPIC interrupt handling and then start the application processors.
The `x86_64.rs` file has just kind of been a dumping ground for random
arch stuff for a while. This commit pulls out the `bootloader` crate
glue code and the tests into separate files.
This commit starts on #345 by using the `acpi` crate to read information
from the ACPI tables related to SMP. It adds an `acpi::bringup_smp`
function in `arch::x86_64`, but this function doesn't *currently*
actually bring up application processors. Instead, it just reads data
from the ACPI tables and logs it as a way to check that we are, in fact,
able to find the information we need.

Additionally, I added a new `ArchInfo` struct that contains opaque
architecture-specific data from the bootloader's boot info. This is
passed into the `kernel_start` function, but the cross-platform kernel
code doesn't consume it --- instead, it's just provided so it can be
passed back into `arch_init` once we've done cross-platform setup stuff.
This felt better than sticking the RSDP addr in a global variable or
something...

This is a first step towards #345. Future commits will actually switch
to IOAPIC interrupt handling and then start the application processors.
@hawkw hawkw enabled auto-merge (rebase) October 14, 2022 18:16
@hawkw hawkw merged commit 8980407 into main Oct 14, 2022
@hawkw hawkw deleted the eliza/smp-bringup branch October 14, 2022 18:27
hawkw added a commit that referenced this pull request Oct 14, 2022
The `x86_64.rs` file has just kind of been a dumping ground for random
arch stuff for a while. This commit pulls out the `bootloader` crate
glue code and the tests into separate files.
hawkw added a commit that referenced this pull request Oct 14, 2022
This commit starts on #345 by using the `acpi` crate to read information
from the ACPI tables related to SMP. It adds an `acpi::bringup_smp`
function in `arch::x86_64`, but this function doesn't *currently*
actually bring up application processors. Instead, it just reads data
from the ACPI tables and logs it as a way to check that we are, in fact,
able to find the information we need.

Additionally, I added a new `ArchInfo` struct that contains opaque
architecture-specific data from the bootloader's boot info. This is
passed into the `kernel_start` function, but the cross-platform kernel
code doesn't consume it --- instead, it's just provided so it can be
passed back into `arch_init` once we've done cross-platform setup stuff.
This felt better than sticking the RSDP addr in a global variable or
something...

This is a first step towards #345. Future commits will actually switch
to IOAPIC interrupt handling and then start the application processors.
hawkw added a commit that referenced this pull request Oct 14, 2022
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