diff --git a/.gitignore b/.gitignore
index 777461401..e8e47462d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-target
-/config.toml
-.gitlab-ci-local/
+target
+/config.toml
+.gitlab-ci-local/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3efafbee..8cee6d99d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,30 +1,30 @@
-image: "redoxos/redoxer:latest"
-
-variables:
- GIT_SUBMODULE_STRATEGY: recursive
-
-stages:
- - host
- - build
- - test
- # TODO: benchmarks and profiling (maybe manually enabled for relevant MRs)?
-
-build:
- stage: build
- script:
- - mkdir -p target/${ARCH}
- - TARGET=${ARCH}-unknown-redox redoxer env make BUILD=target/${ARCH}
- parallel:
- matrix:
- - ARCH: [x86_64, i686, aarch64, riscv64gc]
-
-fmt:
- stage: host
- script:
- - rustup component add rustfmt-preview
- - cargo fmt -- --check
-
-unit_test:
- stage: test
- script:
- - TARGET=x86_64-unknown-redox redoxer test
+image: "redoxos/redoxer:latest"
+
+variables:
+ GIT_SUBMODULE_STRATEGY: recursive
+
+stages:
+ - host
+ - build
+ - test
+ # TODO: benchmarks and profiling (maybe manually enabled for relevant MRs)?
+
+build:
+ stage: build
+ script:
+ - mkdir -p target/${ARCH}
+ - TARGET=${ARCH}-unknown-redox redoxer env make BUILD=target/${ARCH}
+ parallel:
+ matrix:
+ - ARCH: [x86_64, i686, aarch64, riscv64gc]
+
+fmt:
+ stage: host
+ script:
+ - rustup component add rustfmt-preview
+ - cargo fmt -- --check
+
+unit_test:
+ stage: test
+ script:
+ - TARGET=x86_64-unknown-redox redoxer test
diff --git a/.gitmodules b/.gitmodules
index 0a0f6ac82..e723d989a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,11 +1,11 @@
-[submodule "slab_allocator"]
- path = slab_allocator
- url = https://gitlab.redox-os.org/redox-os/slab_allocator
-[submodule "rmm"]
- path = rmm
- url = https://gitlab.redox-os.org/redox-os/rmm.git
- branch = master
-[submodule "redox-path"]
- path = redox-path
- url = https://gitlab.redox-os.org/redox-os/redox-path.git
- branch = main
+[submodule "slab_allocator"]
+ path = slab_allocator
+ url = https://gitlab.redox-os.org/redox-os/slab_allocator
+[submodule "rmm"]
+ path = rmm
+ url = https://gitlab.redox-os.org/redox-os/rmm.git
+ branch = master
+[submodule "redox-path"]
+ path = redox-path
+ url = https://gitlab.redox-os.org/redox-os/redox-path.git
+ branch = main
diff --git a/.helix/config.toml b/.helix/config.toml
index a1ec3e0a6..7ae9b1506 100644
--- a/.helix/config.toml
+++ b/.helix/config.toml
@@ -1,2 +1,2 @@
-[editor]
-auto-format = false
+[editor]
+auto-format = false
diff --git a/.helix/languages.toml b/.helix/languages.toml
index c86c7b8a5..1606824b8 100644
--- a/.helix/languages.toml
+++ b/.helix/languages.toml
@@ -1,13 +1,13 @@
-[[language]]
-name = "rust"
-
-[[language-server.rust-analyzer.config.cargo]]
-extraEnv = ["RUST_TARGET_PATH=targets"]
-# Select one of targets to make lsp work for your confguration
-# Do not commit this change
-# TODO: find a better way to do this
-# target = "aarch64-unknown-kernel"
-
-[[language-server.rust-analyzer.config.check]]
-targets = ["x86_64-unknown-kernel", "i686-unknown-kernel", "aarch64-unknown-kernel"]
-
+[[language]]
+name = "rust"
+
+[[language-server.rust-analyzer.config.cargo]]
+extraEnv = ["RUST_TARGET_PATH=targets"]
+# Select one of targets to make lsp work for your confguration
+# Do not commit this change
+# TODO: find a better way to do this
+# target = "aarch64-unknown-kernel"
+
+[[language-server.rust-analyzer.config.check]]
+targets = ["x86_64-unknown-kernel", "i686-unknown-kernel", "aarch64-unknown-kernel"]
+
diff --git a/ARM-AARCH64-PORT-OUTLINE.md b/ARM-AARCH64-PORT-OUTLINE.md
index 8ae61e196..7e53ff5d8 100644
--- a/ARM-AARCH64-PORT-OUTLINE.md
+++ b/ARM-AARCH64-PORT-OUTLINE.md
@@ -1,79 +1,79 @@
-# Porting the core Redox kernel to arm AArch64: An outline
-
-## Intro
-
-This document is [my](https://github.com/raw-bin) attempt at:
-
-* Capturing thinking on the work needed for a core Redox kernel port
-* Sharing progress with the community as things evolve
-* Creating a template that can be used for ports to other architectures
-
-Core Redox kernel means everything needed to get to a non-graphical console-only multi-user shell.
-
-Only the 64-bit execution state (AArch64) with the 64-bit instruction set architecture (A64) shall be supported for the moment. For more background/context read [this](https://developer.arm.com/products/architecture/a-profile/docs/den0024/latest/introduction).
-
-This document is intended to be kept *live*. It will be updated to reflect the current state of work and any feedback received.
-
-It is hard~futile to come up with a strict sequence of work for such ports but this document is a reasonable template to follow.
-
-## Intended target platform
-
-The primary focus is on [qemu's virt machine platform emulation for the AArch64 architecture](https://github.com/qemu/qemu/blob/master/hw/arm/virt.c#L127).
-
-Targeting a virtual platform is a convenient way to bring up the mechanics of architectural support and makes the jump to silicon easier. The preferred boot chain for AArch64 (explained later) is well supported on this platform and boot-over-tftp from localhost makes the debug cycle very efficient.
-
-Once the core kernel port is complete a similar follow on document will be created that is dedicated to silicon bring-up.
-
-## Boot protocol elements
-
-Item | Notes
------|-------
-[Linux kernel boot protocol for AArch64](https://www.kernel.org/doc/Documentation/arm64/booting.txt) | The linked document describes assumptions made from the bootloader which are field tested and worthwhile to have for Redox an AArch64.
The intent is to consider most of the document except anything tied to the Linux kernel itself.
-[Flattened Device Tree](https://elinux.org/Device_Tree_Reference) | FDT binary blobs supplied by the bootloader shall provide the Redox kernel with misc platform \{memory, interrupt, devicemem} maps. Qemu's virt machine platform synthetically creates an FDT blob at a specific address which is very handy.
-
-## Boot flow elements
-
-The following table lists the boot flow in order.
-
-Item | Notes
------|-------
-[ARM Trusted Firmware (TF-A)](https://github.com/ARM-software/arm-trusted-firmware) | TF-A is a de-facto standard reference firmware implementation and proven in the field.
TF-A runs post power-on on Armv8-A implementations and eventually hands off to further stages of the boot flow.
For qemu's virt machine platform, it is essentially absent but I mean to rely on it heavily for silicon bring up hence mentioning it here.
-[u-boot](https://www.denx.de/wiki/U-Boot) | u-boot will handle early console access, media access for fetching redox kernel images from non-volatile storage/misc disk subsystems/off the network.
u-boot supports loading EFI applications. If EFI support to AArch64 Redox is added in the future that should essentially work out of the box.
u-boot will load redox and FDT binary blobs into RAM and jump to the redox kernel.
-Redox early-init stub | For AArch64, the redox kernel will contain an A64 assembly stub that will setup the MMU from scratch. This is akin to the [x86_64 redox bootloader](https://github.com/redox-os/bootloader/blob/master/x86_64/startup-x86_64.asm).
This stub sets up identity maps for MMU initialization, maps the kernel image itself as well as the device memory for the UART console. At present this stub shall be a part of the kernel itself for simplicity.
-Redox kstart entry | The early init stub hands off here. kstart will then re-init the MMU more comprehensively.
-
-## Supported devices
-
-The following devices shall be supported. All necessary information specific to these devices will be provided to the redox kernel by the platform specific FDT binary blob.
-
-Device | Notes
--------|-------
-[Generic Interrupt Controller v2](https://developer.arm.com/products/architecture/a-profile/docs/ihi0048/b/arm-generic-interrupt-controller-architecture-version-20-architecture-specification) | The GIC is an Arm-v8A architectural element and is supported by all architecturally compliant processor implementations. GICv2 is supported by qemu's virt machine emulation and most subsequent GIC implementations are backward compatible to GICv2.
-[Generic Timer](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500d/BGBBIJCB.html) | The Generic Timer Architecture is an Arm-v8A architectural element and is implemented by all compliant processor implementations. It is supported by qemu.
-[PrimeCell UART PL011](http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf) | The PL011 UART is supported by qemu and most ARM systems.
-
-## Intended development sequence and status
-
-Item | Description | Status | Notes
------|-------|-----|-----
-Redox AArch64 toolchain | Create an usable redox AArch64 toolchain specification | Done | Using this JSON spec in isolated tests produces valid AArch64 soft float code
-Stubbed kernel image | Stub out AArch64 kernel support using the existing x86_64 arch code as a template
Modify redox kernel build glue and work iteratively to get a linkable (non-functional) image | Not done yet |
-Boot flow | Create a self hosted u-boot -> redox kernel workflow
Should obtain the stubbed image from a local TFTP server, load it into RAM and jump to it | Not done yet |
-GDB Debug flow | Create a debug workflow centered around qemu's GDB stub
This should allow connecting to qemu's GDB stub and debug u-boot/redox stub via a GDB client and single stepping through code | Not done yet |
-Verify Redox entry | Verify that control reaches the redox kernel from u-boot | Not done yet |
-AArch64 early init stub | Add support for raw asm code for early AArch64 init in the redox kernel
Verify that this code is located appropriately in the link map and that control reaches this code from u-boot | Not done yet |
-Basic DTB support | Integrate the [device_tree crate](https://mbr.github.io/device_tree-rs/device_tree/)
Use the crate to access the qemu supplied DTB image and extract the memory map | Not done yet |
-Basic UART support | Use the device_tree crate to get the UART address from the DTB image and set up the initial console
This is a polling mode only setup | Not done yet |
-Initial MMU support | Implement initial MMU support in the early init stub
This forces the MMU into a clean state overriding any bootloader specific setup
Create an identity map for MMU init
Create a mapping for the kernel image
Create a mapping for any devices needed at this stage (UART)| Not done yet |
-kmain entry | Verify that kmain entry works post early MMU init | Not done yet |
-Basic Redox MMU support | Get Redox to create a final set of mappings for everything
Verify that this works as expected| Not done yet |
-Basic libc support | Flesh out a basic set of libc calls as required for simple user-land apps | Not done yet |
-userspace_init entry | Verify user-space entry and /sbin/init invocation | Not done yet |
-Basic Interrupt controller support | Add a GIC driver
Verify functionality | Not done yet |
-Basic Timer support | Add a Generic Timer driver
Verify functionality | Not done yet |
-UART interrupt support | Add support for UART interrupts | Not done yet |
-Task context switch support | Add context switching support
Verify functionality | Not done yet |
-Login shell | Iteratively add and verify multi-user login shell support | Not done yet |
-Publish development branch on github | Work with the community to post work done after employer approval | Not done yet |
-Break out the Bubbly | Drink copious quantities of alcohol to celebrate | Not done yet |
-Silicon bring-up | Plan silicon bring-up | Not done yet |
+# Porting the core Redox kernel to arm AArch64: An outline
+
+## Intro
+
+This document is [my](https://github.com/raw-bin) attempt at:
+
+* Capturing thinking on the work needed for a core Redox kernel port
+* Sharing progress with the community as things evolve
+* Creating a template that can be used for ports to other architectures
+
+Core Redox kernel means everything needed to get to a non-graphical console-only multi-user shell.
+
+Only the 64-bit execution state (AArch64) with the 64-bit instruction set architecture (A64) shall be supported for the moment. For more background/context read [this](https://developer.arm.com/products/architecture/a-profile/docs/den0024/latest/introduction).
+
+This document is intended to be kept *live*. It will be updated to reflect the current state of work and any feedback received.
+
+It is hard~futile to come up with a strict sequence of work for such ports but this document is a reasonable template to follow.
+
+## Intended target platform
+
+The primary focus is on [qemu's virt machine platform emulation for the AArch64 architecture](https://github.com/qemu/qemu/blob/master/hw/arm/virt.c#L127).
+
+Targeting a virtual platform is a convenient way to bring up the mechanics of architectural support and makes the jump to silicon easier. The preferred boot chain for AArch64 (explained later) is well supported on this platform and boot-over-tftp from localhost makes the debug cycle very efficient.
+
+Once the core kernel port is complete a similar follow on document will be created that is dedicated to silicon bring-up.
+
+## Boot protocol elements
+
+Item | Notes
+-----|-------
+[Linux kernel boot protocol for AArch64](https://www.kernel.org/doc/Documentation/arm64/booting.txt) | The linked document describes assumptions made from the bootloader which are field tested and worthwhile to have for Redox an AArch64.
The intent is to consider most of the document except anything tied to the Linux kernel itself.
+[Flattened Device Tree](https://elinux.org/Device_Tree_Reference) | FDT binary blobs supplied by the bootloader shall provide the Redox kernel with misc platform \{memory, interrupt, devicemem} maps. Qemu's virt machine platform synthetically creates an FDT blob at a specific address which is very handy.
+
+## Boot flow elements
+
+The following table lists the boot flow in order.
+
+Item | Notes
+-----|-------
+[ARM Trusted Firmware (TF-A)](https://github.com/ARM-software/arm-trusted-firmware) | TF-A is a de-facto standard reference firmware implementation and proven in the field.
TF-A runs post power-on on Armv8-A implementations and eventually hands off to further stages of the boot flow.
For qemu's virt machine platform, it is essentially absent but I mean to rely on it heavily for silicon bring up hence mentioning it here.
+[u-boot](https://www.denx.de/wiki/U-Boot) | u-boot will handle early console access, media access for fetching redox kernel images from non-volatile storage/misc disk subsystems/off the network.
u-boot supports loading EFI applications. If EFI support to AArch64 Redox is added in the future that should essentially work out of the box.
u-boot will load redox and FDT binary blobs into RAM and jump to the redox kernel.
+Redox early-init stub | For AArch64, the redox kernel will contain an A64 assembly stub that will setup the MMU from scratch. This is akin to the [x86_64 redox bootloader](https://github.com/redox-os/bootloader/blob/master/x86_64/startup-x86_64.asm).
This stub sets up identity maps for MMU initialization, maps the kernel image itself as well as the device memory for the UART console. At present this stub shall be a part of the kernel itself for simplicity.
+Redox kstart entry | The early init stub hands off here. kstart will then re-init the MMU more comprehensively.
+
+## Supported devices
+
+The following devices shall be supported. All necessary information specific to these devices will be provided to the redox kernel by the platform specific FDT binary blob.
+
+Device | Notes
+-------|-------
+[Generic Interrupt Controller v2](https://developer.arm.com/products/architecture/a-profile/docs/ihi0048/b/arm-generic-interrupt-controller-architecture-version-20-architecture-specification) | The GIC is an Arm-v8A architectural element and is supported by all architecturally compliant processor implementations. GICv2 is supported by qemu's virt machine emulation and most subsequent GIC implementations are backward compatible to GICv2.
+[Generic Timer](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500d/BGBBIJCB.html) | The Generic Timer Architecture is an Arm-v8A architectural element and is implemented by all compliant processor implementations. It is supported by qemu.
+[PrimeCell UART PL011](http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf) | The PL011 UART is supported by qemu and most ARM systems.
+
+## Intended development sequence and status
+
+Item | Description | Status | Notes
+-----|-------|-----|-----
+Redox AArch64 toolchain | Create an usable redox AArch64 toolchain specification | Done | Using this JSON spec in isolated tests produces valid AArch64 soft float code
+Stubbed kernel image | Stub out AArch64 kernel support using the existing x86_64 arch code as a template
Modify redox kernel build glue and work iteratively to get a linkable (non-functional) image | Not done yet |
+Boot flow | Create a self hosted u-boot -> redox kernel workflow
Should obtain the stubbed image from a local TFTP server, load it into RAM and jump to it | Not done yet |
+GDB Debug flow | Create a debug workflow centered around qemu's GDB stub
This should allow connecting to qemu's GDB stub and debug u-boot/redox stub via a GDB client and single stepping through code | Not done yet |
+Verify Redox entry | Verify that control reaches the redox kernel from u-boot | Not done yet |
+AArch64 early init stub | Add support for raw asm code for early AArch64 init in the redox kernel
Verify that this code is located appropriately in the link map and that control reaches this code from u-boot | Not done yet |
+Basic DTB support | Integrate the [device_tree crate](https://mbr.github.io/device_tree-rs/device_tree/)
Use the crate to access the qemu supplied DTB image and extract the memory map | Not done yet |
+Basic UART support | Use the device_tree crate to get the UART address from the DTB image and set up the initial console
This is a polling mode only setup | Not done yet |
+Initial MMU support | Implement initial MMU support in the early init stub
This forces the MMU into a clean state overriding any bootloader specific setup
Create an identity map for MMU init
Create a mapping for the kernel image
Create a mapping for any devices needed at this stage (UART)| Not done yet |
+kmain entry | Verify that kmain entry works post early MMU init | Not done yet |
+Basic Redox MMU support | Get Redox to create a final set of mappings for everything
Verify that this works as expected| Not done yet |
+Basic libc support | Flesh out a basic set of libc calls as required for simple user-land apps | Not done yet |
+userspace_init entry | Verify user-space entry and /sbin/init invocation | Not done yet |
+Basic Interrupt controller support | Add a GIC driver
Verify functionality | Not done yet |
+Basic Timer support | Add a Generic Timer driver
Verify functionality | Not done yet |
+UART interrupt support | Add support for UART interrupts | Not done yet |
+Task context switch support | Add context switching support
Verify functionality | Not done yet |
+Login shell | Iteratively add and verify multi-user login shell support | Not done yet |
+Publish development branch on github | Work with the community to post work done after employer approval | Not done yet |
+Break out the Bubbly | Drink copious quantities of alcohol to celebrate | Not done yet |
+Silicon bring-up | Plan silicon bring-up | Not done yet |
diff --git a/Cargo.lock b/Cargo.lock
index 6901c00bf..9543feb8c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,502 +1,1005 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 4
-
-[[package]]
-name = "ahash"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
-dependencies = [
- "cfg-if",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
-[[package]]
-name = "arrayvec"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
-
-[[package]]
-name = "autocfg"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
-
-[[package]]
-name = "bit_field"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
-
-[[package]]
-name = "bitfield"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719"
-
-[[package]]
-name = "bitflags"
-version = "1.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
-
-[[package]]
-name = "bitflags"
-version = "2.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
-
-[[package]]
-name = "byteorder"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
-
-[[package]]
-name = "cc"
-version = "1.2.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0"
-dependencies = [
- "shlex",
-]
-
-[[package]]
-name = "cfg-if"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-
-[[package]]
-name = "equivalent"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
-
-[[package]]
-name = "fdt"
-version = "0.2.0-alpha1"
-source = "git+https://github.com/repnop/fdt.git?rev=2fb1409edd1877c714a0aa36b6a7c5351004be54#2fb1409edd1877c714a0aa36b6a7c5351004be54"
-
-[[package]]
-name = "goblin"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884"
-dependencies = [
- "plain",
- "scroll",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.14.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-dependencies = [
- "ahash",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.15.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
-
-[[package]]
-name = "indexmap"
-version = "2.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
-dependencies = [
- "equivalent",
- "hashbrown 0.15.3",
-]
-
-[[package]]
-name = "kernel"
-version = "0.5.12"
-dependencies = [
- "arrayvec",
- "bitfield",
- "bitflags 2.9.0",
- "byteorder",
- "cc",
- "fdt",
- "goblin",
- "hashbrown 0.14.5",
- "indexmap",
- "linked_list_allocator 0.9.1",
- "log",
- "raw-cpuid",
- "redox-path",
- "redox_syscall",
- "rmm",
- "rustc-cfg",
- "rustc-demangle",
- "sbi-rt",
- "slab",
- "slab_allocator",
- "spin 0.9.8",
- "spinning_top 0.3.0",
- "toml",
- "x86",
-]
-
-[[package]]
-name = "linked_list_allocator"
-version = "0.6.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47de1a43fad0250ee197e9e124e5b5deab3d7b39d4428ae8a6d741ceb340c362"
-dependencies = [
- "spin 0.5.2",
-]
-
-[[package]]
-name = "linked_list_allocator"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "549ce1740e46b291953c4340adcd74c59bcf4308f4cac050fd33ba91b7168f4a"
-dependencies = [
- "spinning_top 0.2.5",
-]
-
-[[package]]
-name = "lock_api"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
-dependencies = [
- "autocfg",
- "scopeguard",
-]
-
-[[package]]
-name = "log"
-version = "0.4.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
-
-[[package]]
-name = "memchr"
-version = "2.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
-
-[[package]]
-name = "once_cell"
-version = "1.21.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
-
-[[package]]
-name = "plain"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.95"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "raw-cpuid"
-version = "10.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox-path"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64072665120942deff5fd5425d6c1811b854f4939e7f1c01ce755f64432bbea7"
-
-[[package]]
-name = "redox_syscall"
-version = "0.5.17"
-source = "git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=master#a9880ccf50d093e662f3b31c1aa13f0951cc2b4d"
-dependencies = [
- "bitflags 2.9.0",
-]
-
-[[package]]
-name = "rmm"
-version = "0.1.0"
-
-[[package]]
-name = "rustc-cfg"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ddf7a5e441e8003a5a88aab97f1c6113043ddde252d789ef9dea3871b78633a"
-dependencies = [
- "thiserror",
-]
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
-
-[[package]]
-name = "sbi-rt"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fbaa69be1eedc61c426e6d489b2260482e928b465360576900d52d496a58bd0"
-dependencies = [
- "sbi-spec",
-]
-
-[[package]]
-name = "sbi-spec"
-version = "0.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890"
-
-[[package]]
-name = "scopeguard"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
-
-[[package]]
-name = "scroll"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
-
-[[package]]
-name = "serde"
-version = "1.0.219"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
-dependencies = [
- "serde_derive",
-]
-
-[[package]]
-name = "serde_derive"
-version = "1.0.219"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "serde_spanned"
-version = "0.6.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "shlex"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
-
-[[package]]
-name = "slab"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "slab_allocator"
-version = "0.3.1"
-dependencies = [
- "linked_list_allocator 0.6.6",
- "spin 0.4.10",
-]
-
-[[package]]
-name = "spin"
-version = "0.4.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f"
-
-[[package]]
-name = "spin"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
-
-[[package]]
-name = "spin"
-version = "0.9.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
-dependencies = [
- "lock_api",
-]
-
-[[package]]
-name = "spinning_top"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b9eb1a2f4c41445a3a0ff9abc5221c5fcd28e1f13cd7c0397706f9ac938ddb0"
-dependencies = [
- "lock_api",
-]
-
-[[package]]
-name = "spinning_top"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300"
-dependencies = [
- "lock_api",
-]
-
-[[package]]
-name = "syn"
-version = "2.0.101"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "thiserror"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
-dependencies = [
- "thiserror-impl",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "toml"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae"
-dependencies = [
- "serde",
- "serde_spanned",
- "toml_datetime",
- "toml_edit",
-]
-
-[[package]]
-name = "toml_datetime"
-version = "0.6.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.22.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
-dependencies = [
- "indexmap",
- "serde",
- "serde_spanned",
- "toml_datetime",
- "toml_write",
- "winnow",
-]
-
-[[package]]
-name = "toml_write"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076"
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
-
-[[package]]
-name = "version_check"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
-
-[[package]]
-name = "winnow"
-version = "0.7.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "x86"
-version = "0.47.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55b5be8cc34d017d8aabec95bc45a43d0f20e8b2a31a453cabc804fe996f8dca"
-dependencies = [
- "bit_field",
- "bitflags 1.3.2",
- "raw-cpuid",
-]
-
-[[package]]
-name = "zerocopy"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
-dependencies = [
- "zerocopy-derive",
-]
-
-[[package]]
-name = "zerocopy-derive"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "ahash"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
+[[package]]
+name = "bitfield"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "cc"
+version = "1.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "fdt"
+version = "0.2.0-alpha1"
+source = "git+https://github.com/repnop/fdt.git?rev=2fb1409edd1877c714a0aa36b6a7c5351004be54#2fb1409edd1877c714a0aa36b6a7c5351004be54"
+
+[[package]]
+name = "goblin"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884"
+dependencies = [
+ "plain",
+ "scroll",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
+
+[[package]]
+name = "indexmap"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.3",
+]
+
+[[package]]
+name = "kernel"
+version = "0.5.12"
+dependencies = [
+ "arrayvec",
+ "bitfield",
+ "bitflags 2.9.0",
+ "byteorder",
+ "cc",
+ "fdt",
+ "goblin",
+ "hashbrown 0.14.5",
+ "indexmap",
+ "linked_list_allocator 0.9.1",
+ "log",
+ "raw-cpuid",
+ "redox-path",
+ "redox_syscall",
+ "rmm",
+ "rustc-cfg",
+ "rustc-demangle",
+ "sbi-rt",
+ "slab",
+ "slab_allocator",
+ "spin 0.9.8",
+ "spinning_top 0.3.0",
+ "toml",
+ "x86",
+]
+
+[[package]]
+name = "linked_list_allocator"
+version = "0.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47de1a43fad0250ee197e9e124e5b5deab3d7b39d4428ae8a6d741ceb340c362"
+dependencies = [
+ "spin 0.5.2",
+]
+
+[[package]]
+name = "linked_list_allocator"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "549ce1740e46b291953c4340adcd74c59bcf4308f4cac050fd33ba91b7168f4a"
+dependencies = [
+ "spinning_top 0.2.5",
+]
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "once_cell"
+version = "1.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "raw-cpuid"
+version = "10.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox-path"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64072665120942deff5fd5425d6c1811b854f4939e7f1c01ce755f64432bbea7"
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.12"
+source = "git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=master#fe32c6b89dae51e609d5c53880dec1834ec9bde0"
+dependencies = [
+ "bitflags 2.9.0",
+]
+
+[[package]]
+name = "rmm"
+version = "0.1.0"
+
+[[package]]
+name = "rustc-cfg"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ddf7a5e441e8003a5a88aab97f1c6113043ddde252d789ef9dea3871b78633a"
+dependencies = [
+ "thiserror",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "sbi-rt"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fbaa69be1eedc61c426e6d489b2260482e928b465360576900d52d496a58bd0"
+dependencies = [
+ "sbi-spec",
+]
+
+[[package]]
+name = "sbi-spec"
+version = "0.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "scroll"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
+
+[[package]]
+name = "serde"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "slab_allocator"
+version = "0.3.1"
+dependencies = [
+ "linked_list_allocator 0.6.6",
+ "spin 0.4.10",
+]
+
+[[package]]
+name = "spin"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f"
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "spinning_top"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b9eb1a2f4c41445a3a0ff9abc5221c5fcd28e1f13cd7c0397706f9ac938ddb0"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "spinning_top"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.101"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.22.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_write",
+ "winnow",
+]
+
+[[package]]
+name = "toml_write"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "winnow"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "x86"
+version = "0.47.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55b5be8cc34d017d8aabec95bc45a43d0f20e8b2a31a453cabc804fe996f8dca"
+dependencies = [
+ "bit_field",
+ "bitflags 1.3.2",
+ "raw-cpuid",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+=======
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "ahash"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
+[[package]]
+name = "bitfield"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "cc"
+version = "1.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "fdt"
+version = "0.2.0-alpha1"
+source = "git+https://github.com/repnop/fdt.git?rev=2fb1409edd1877c714a0aa36b6a7c5351004be54#2fb1409edd1877c714a0aa36b6a7c5351004be54"
+
+[[package]]
+name = "goblin"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884"
+dependencies = [
+ "plain",
+ "scroll",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
+
+[[package]]
+name = "indexmap"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.3",
+]
+
+[[package]]
+name = "kernel"
+version = "0.5.12"
+dependencies = [
+ "arrayvec",
+ "bitfield",
+ "bitflags 2.9.0",
+ "byteorder",
+ "cc",
+ "fdt",
+ "goblin",
+ "hashbrown 0.14.5",
+ "indexmap",
+ "linked_list_allocator 0.9.1",
+ "log",
+ "raw-cpuid",
+ "redox-path",
+ "redox_syscall",
+ "rmm",
+ "rustc-cfg",
+ "rustc-demangle",
+ "sbi-rt",
+ "slab",
+ "slab_allocator",
+ "spin 0.9.8",
+ "spinning_top 0.3.0",
+ "toml",
+ "x86",
+]
+
+[[package]]
+name = "linked_list_allocator"
+version = "0.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47de1a43fad0250ee197e9e124e5b5deab3d7b39d4428ae8a6d741ceb340c362"
+dependencies = [
+ "spin 0.5.2",
+]
+
+[[package]]
+name = "linked_list_allocator"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "549ce1740e46b291953c4340adcd74c59bcf4308f4cac050fd33ba91b7168f4a"
+dependencies = [
+ "spinning_top 0.2.5",
+]
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "once_cell"
+version = "1.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "raw-cpuid"
+version = "10.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox-path"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64072665120942deff5fd5425d6c1811b854f4939e7f1c01ce755f64432bbea7"
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.17"
+source = "git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=master#a9880ccf50d093e662f3b31c1aa13f0951cc2b4d"
+dependencies = [
+ "bitflags 2.9.0",
+]
+
+[[package]]
+name = "rmm"
+version = "0.1.0"
+
+[[package]]
+name = "rustc-cfg"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ddf7a5e441e8003a5a88aab97f1c6113043ddde252d789ef9dea3871b78633a"
+dependencies = [
+ "thiserror",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "sbi-rt"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fbaa69be1eedc61c426e6d489b2260482e928b465360576900d52d496a58bd0"
+dependencies = [
+ "sbi-spec",
+]
+
+[[package]]
+name = "sbi-spec"
+version = "0.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "scroll"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
+
+[[package]]
+name = "serde"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.219"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "slab_allocator"
+version = "0.3.1"
+dependencies = [
+ "linked_list_allocator 0.6.6",
+ "spin 0.4.10",
+]
+
+[[package]]
+name = "spin"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f"
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "spinning_top"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b9eb1a2f4c41445a3a0ff9abc5221c5fcd28e1f13cd7c0397706f9ac938ddb0"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "spinning_top"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.101"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.22.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_write",
+ "winnow",
+]
+
+[[package]]
+name = "toml_write"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "winnow"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "x86"
+version = "0.47.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55b5be8cc34d017d8aabec95bc45a43d0f20e8b2a31a453cabc804fe996f8dca"
+dependencies = [
+ "bit_field",
+ "bitflags 1.3.2",
+ "raw-cpuid",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 97151bcf0..f826fb9bd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,93 +1,96 @@
-[package]
-name = "kernel"
-version = "0.5.12"
-build = "build.rs"
-edition = "2021"
-
-[build-dependencies]
-cc = "1.0"
-rustc-cfg = "0.5"
-toml = "0.8"
-
-[dependencies]
-bitflags = "2"
-bitfield = "0.13.2"
-hashbrown = { version = "0.14.3", default-features = false, features = ["ahash", "inline-more"] }
-linked_list_allocator = "0.9.0"
-log = "0.4"
-redox-path = "0.2.0"
-redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall.git", branch = "master", default-features = false }
-slab_allocator = { path = "slab_allocator", optional = true }
-spin = "0.9.8"
-spinning_top = { version = "0.3", features = ["arc_lock"] }
-rmm = { path = "rmm", default-features = false }
-arrayvec = { version = "0.7.4", default-features = false }
-slab = { version = "0.4", default-features = false }
-# TODO: Remove
-indexmap = { version = "2.5.0", default-features = false }
-
-[dependencies.goblin]
-version = "0.2.1"
-default-features = false
-features = ["elf32", "elf64"]
-
-[dependencies.rustc-demangle]
-version = "0.1.16"
-default-features = false
-
-[target.'cfg(any(target_arch = "aarch64", target_arch = "riscv64"))'.dependencies]
-byteorder = { version = "1", default-features = false }
-fdt = { git = "https://github.com/repnop/fdt.git", rev = "2fb1409edd1877c714a0aa36b6a7c5351004be54" }
-
-[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
-raw-cpuid = "10.2.0"
-x86 = { version = "0.47.0", default-features = false }
-
-[target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies]
-sbi-rt = "0.0.3"
-
-[features]
-default = [
- "acpi",
- #TODO: issues with Alder Lake and newer CPUs: "multi_core",
- # This may be because of mismatch between cpu id and apic id
- "graphical_debug",
- "serial_debug",
- "self_modifying",
- "x86_kvm_pv",
- #"syscall_debug"
-]
-
-# Activates some limited code-overwriting optimizations, based on CPU features.
-self_modifying = []
-
-acpi = []
-graphical_debug = []
-lpss_debug = []
-multi_core = ["acpi"]
-profiling = []
-#TODO: remove when threading issues are fixed
-pti = []
-qemu_debug = []
-serial_debug = []
-system76_ec_debug = []
-slab = ["slab_allocator"]
-sys_stat = []
-x86_kvm_pv = []
-
-debugger = ["syscall_debug"]
-syscall_debug = []
-
-sys_fdstat = []
-
-[profile.dev]
-# Avoids having to define the eh_personality lang item and reduces kernel size
-panic = "abort"
-
-[profile.release]
-# Avoids having to define the eh_personality lang item and reduces kernel size
-panic = "abort"
-
-#lto = true
-
-debug = "full"
+[package]
+name = "kernel"
+version = "0.5.12"
+build = "build.rs"
+edition = "2021"
+
+[build-dependencies]
+cc = "1.0"
+rustc-cfg = "0.5"
+toml = "0.8"
+
+[dependencies]
+bitflags = "2"
+bitfield = "0.13.2"
+hashbrown = { version = "0.14.3", default-features = false, features = ["ahash", "inline-more"] }
+linked_list_allocator = "0.9.0"
+log = "0.4"
+redox-path = "0.2.0"
+redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall.git", branch = "master", default-features = false }
+slab_allocator = { path = "slab_allocator", optional = true }
+spin = "0.9.8"
+spinning_top = { version = "0.3", features = ["arc_lock"] }
+rmm = { path = "rmm", default-features = false }
+arrayvec = { version = "0.7.4", default-features = false }
+slab = { version = "0.4", default-features = false }
+# TODO: Remove
+indexmap = { version = "2.5.0", default-features = false }
+
+[dependencies.goblin]
+version = "0.2.1"
+default-features = false
+features = ["elf32", "elf64"]
+
+[dependencies.rustc-demangle]
+version = "0.1.16"
+default-features = false
+
+[target.'cfg(any(target_arch = "aarch64", target_arch = "riscv64"))'.dependencies]
+byteorder = { version = "1", default-features = false }
+fdt = { git = "https://github.com/repnop/fdt.git", rev = "2fb1409edd1877c714a0aa36b6a7c5351004be54" }
+
+[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
+raw-cpuid = "10.2.0"
+x86 = { version = "0.47.0", default-features = false }
+
+[target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies]
+sbi-rt = "0.0.3"
+
+[features]
+default = [
+ "acpi",
+ # TODO: Re-enable after comprehensive testing of hybrid CPU topology fixes
+ # Previous issues with Alder Lake+ CPUs due to APIC ID vs CPU ID mismatch
+ # should now be better handled with extended topology detection (CPUID 1F/0B)
+ # and proper P-core/E-core identification. Enable cautiously for testing.
+ #"multi_core",
+ "graphical_debug",
+ "serial_debug",
+ "self_modifying",
+ "x86_kvm_pv",
+ #"syscall_debug"
+]
+
+# Activates some limited code-overwriting optimizations, based on CPU features.
+self_modifying = []
+
+acpi = []
+graphical_debug = []
+lpss_debug = []
+multi_core = ["acpi"]
+profiling = []
+#TODO: remove when threading issues are fixed
+pti = []
+qemu_debug = []
+serial_debug = []
+system76_ec_debug = []
+slab = ["slab_allocator"]
+sys_stat = []
+x86_kvm_pv = []
+
+debugger = ["syscall_debug"]
+syscall_debug = []
+
+sys_fdstat = []
+
+[profile.dev]
+# Avoids having to define the eh_personality lang item and reduces kernel size
+panic = "abort"
+
+[profile.release]
+# Avoids having to define the eh_personality lang item and reduces kernel size
+panic = "abort"
+
+#lto = true
+
+debug = "full"
diff --git a/LICENSE b/LICENSE
index eeb7504cd..2386159ea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,21 @@
-MIT License
-
-Copyright (c) 2017 Jeremy Soller
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+MIT License
+
+Copyright (c) 2017 Jeremy Soller
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Makefile b/Makefile
index 5703ee2f9..8058213e7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,44 +1,44 @@
-SOURCE:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
-BUILD?=$(CURDIR)
-export RUST_TARGET_PATH=$(SOURCE)/targets
-
-ifeq ($(TARGET),)
- ARCH?=$(shell uname -m)
-else
- ARCH?=$(shell echo "$(TARGET)" | cut -d - -f1)
-endif
-
-ifeq ($(ARCH),riscv64gc)
- override ARCH:=riscv64
-endif
-GNU_TARGET=$(ARCH)-unknown-redox
-
-
-all: $(BUILD)/kernel $(BUILD)/kernel.sym
-
-LD_SCRIPT=$(SOURCE)/linkers/$(ARCH).ld
-TARGET_SPEC=$(RUST_TARGET_PATH)/$(ARCH)-unknown-kernel.json
-
-$(BUILD)/kernel.all: $(LD_SCRIPT) $(TARGET_SPEC) $(shell find $(SOURCE) -name "*.rs" -type f)
- cargo rustc \
- --bin kernel \
- --manifest-path "$(SOURCE)/Cargo.toml" \
- --target "$(TARGET_SPEC)" \
- --release \
- -Z build-std=core,alloc \
- -- \
- -C link-arg=-T -Clink-arg="$(LD_SCRIPT)" \
- -C link-arg=-z -Clink-arg=max-page-size=0x1000 \
- --emit link="$(BUILD)/kernel.all"
-
-$(BUILD)/kernel.sym: $(BUILD)/kernel.all
- $(GNU_TARGET)-objcopy \
- --only-keep-debug \
- "$(BUILD)/kernel.all" \
- "$(BUILD)/kernel.sym"
-
-$(BUILD)/kernel: $(BUILD)/kernel.all
- $(GNU_TARGET)-objcopy \
- --strip-debug \
- "$(BUILD)/kernel.all" \
- "$(BUILD)/kernel"
+SOURCE:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+BUILD?=$(CURDIR)
+export RUST_TARGET_PATH=$(SOURCE)/targets
+
+ifeq ($(TARGET),)
+ ARCH?=$(shell uname -m)
+else
+ ARCH?=$(shell echo "$(TARGET)" | cut -d - -f1)
+endif
+
+ifeq ($(ARCH),riscv64gc)
+ override ARCH:=riscv64
+endif
+GNU_TARGET=$(ARCH)-unknown-redox
+
+
+all: $(BUILD)/kernel $(BUILD)/kernel.sym
+
+LD_SCRIPT=$(SOURCE)/linkers/$(ARCH).ld
+TARGET_SPEC=$(RUST_TARGET_PATH)/$(ARCH)-unknown-kernel.json
+
+$(BUILD)/kernel.all: $(LD_SCRIPT) $(TARGET_SPEC) $(shell find $(SOURCE) -name "*.rs" -type f)
+ cargo rustc \
+ --bin kernel \
+ --manifest-path "$(SOURCE)/Cargo.toml" \
+ --target "$(TARGET_SPEC)" \
+ --release \
+ -Z build-std=core,alloc \
+ -- \
+ -C link-arg=-T -Clink-arg="$(LD_SCRIPT)" \
+ -C link-arg=-z -Clink-arg=max-page-size=0x1000 \
+ --emit link="$(BUILD)/kernel.all"
+
+$(BUILD)/kernel.sym: $(BUILD)/kernel.all
+ $(GNU_TARGET)-objcopy \
+ --only-keep-debug \
+ "$(BUILD)/kernel.all" \
+ "$(BUILD)/kernel.sym"
+
+$(BUILD)/kernel: $(BUILD)/kernel.all
+ $(GNU_TARGET)-objcopy \
+ --strip-debug \
+ "$(BUILD)/kernel.all" \
+ "$(BUILD)/kernel"
diff --git a/README.md b/README.md
index cf54d099e..2a4428f77 100644
--- a/README.md
+++ b/README.md
@@ -1,81 +1,81 @@
-# Kernel
-
-Redox OS Microkernel
-
-[](https://docs.rs/redox_syscall/latest/syscall/)
-[](https://github.com/XAMPPRocky/tokei)
-[](./LICENSE)
-
-## Requirements
-
-* [`nasm`](https://nasm.us/) needs to be available on the PATH at build time.
-
-## Building The Documentation
-
-Use this command:
-
-```sh
-cargo doc --open --target x86_64-unknown-none
-```
-
-## Debugging
-
-### QEMU
-
-Running [QEMU](https://www.qemu.org) with the `-s` flag will set up QEMU to listen on port `1234` for a GDB client to connect to it. To debug the redox kernel run.
-
-```sh
-make qemu gdb=yes
-```
-
-This will start a virtual machine with and listen on port `1234` for a GDB or LLDB client.
-
-### GDB
-
-If you are going to use [GDB](https://www.gnu.org/software/gdb/), run these commands to load debug symbols and connect to your running kernel:
-
-```
-(gdb) symbol-file build/kernel.sym
-(gdb) target remote localhost:1234
-```
-
-### LLDB
-
-If you are going to use [LLDB](https://lldb.llvm.org/), run these commands to start debugging:
-
-```
-(lldb) target create -s build/kernel.sym build/kernel
-(lldb) gdb-remote localhost:1234
-```
-
-After connecting to your kernel you can set some interesting breakpoints and `continue`
-the process. See your debuggers man page for more information on useful commands to run.
-
-## Notes
-
-- Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working.
-
-- If you receive a kernel panic in QEMU, use `pkill qemu-system` to kill the frozen QEMU process.
-
-## How To Contribute
-
-To learn how to contribute to this system component you need to read the following document:
-
-- [CONTRIBUTING.md](https://gitlab.redox-os.org/redox-os/redox/-/blob/master/CONTRIBUTING.md)
-
-## Development
-
-To learn how to do development with this system component inside the Redox build system you need to read the [Build System](https://doc.redox-os.org/book/build-system-reference.html) and [Coding and Building](https://doc.redox-os.org/book/coding-and-building.html) pages.
-
-### How To Build
-
-To build this system component you need to download the Redox build system, you can learn how to do it on the [Building Redox](https://doc.redox-os.org/book/podman-build.html) page.
-
-This is necessary because they only work with cross-compilation to a Redox virtual machine, but you can do some testing from Linux.
-
-## Funding - _Unix-style Signals and Process Management_
-
-This project is funded through [NGI Zero Core](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/RedoxOS-Signals).
-
-[
](https://nlnet.nl)
-[
](https://nlnet.nl/core)
+# Kernel
+
+Redox OS Microkernel
+
+[](https://docs.rs/redox_syscall/latest/syscall/)
+[](https://github.com/XAMPPRocky/tokei)
+[](./LICENSE)
+
+## Requirements
+
+* [`nasm`](https://nasm.us/) needs to be available on the PATH at build time.
+
+## Building The Documentation
+
+Use this command:
+
+```sh
+cargo doc --open --target x86_64-unknown-none
+```
+
+## Debugging
+
+### QEMU
+
+Running [QEMU](https://www.qemu.org) with the `-s` flag will set up QEMU to listen on port `1234` for a GDB client to connect to it. To debug the redox kernel run.
+
+```sh
+make qemu gdb=yes
+```
+
+This will start a virtual machine with and listen on port `1234` for a GDB or LLDB client.
+
+### GDB
+
+If you are going to use [GDB](https://www.gnu.org/software/gdb/), run these commands to load debug symbols and connect to your running kernel:
+
+```
+(gdb) symbol-file build/kernel.sym
+(gdb) target remote localhost:1234
+```
+
+### LLDB
+
+If you are going to use [LLDB](https://lldb.llvm.org/), run these commands to start debugging:
+
+```
+(lldb) target create -s build/kernel.sym build/kernel
+(lldb) gdb-remote localhost:1234
+```
+
+After connecting to your kernel you can set some interesting breakpoints and `continue`
+the process. See your debuggers man page for more information on useful commands to run.
+
+## Notes
+
+- Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working.
+
+- If you receive a kernel panic in QEMU, use `pkill qemu-system` to kill the frozen QEMU process.
+
+## How To Contribute
+
+To learn how to contribute to this system component you need to read the following document:
+
+- [CONTRIBUTING.md](https://gitlab.redox-os.org/redox-os/redox/-/blob/master/CONTRIBUTING.md)
+
+## Development
+
+To learn how to do development with this system component inside the Redox build system you need to read the [Build System](https://doc.redox-os.org/book/build-system-reference.html) and [Coding and Building](https://doc.redox-os.org/book/coding-and-building.html) pages.
+
+### How To Build
+
+To build this system component you need to download the Redox build system, you can learn how to do it on the [Building Redox](https://doc.redox-os.org/book/podman-build.html) page.
+
+This is necessary because they only work with cross-compilation to a Redox virtual machine, but you can do some testing from Linux.
+
+## Funding - _Unix-style Signals and Process Management_
+
+This project is funded through [NGI Zero Core](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/RedoxOS-Signals).
+
+[
](https://nlnet.nl)
+[
](https://nlnet.nl/core)
diff --git a/clippy.sh b/clippy.sh
index 655f1b893..9b937b65c 100755
--- a/clippy.sh
+++ b/clippy.sh
@@ -1,7 +1,7 @@
-#!/usr/bin/env bash
-
-set -e
-
-export RUST_TARGET_PATH="${PWD}/targets"
-export RUSTFLAGS="-C soft-float -C debuginfo=2"
-cargo clippy --lib --release --target x86_64-unknown-none "$@"
+#!/usr/bin/env bash
+
+set -e
+
+export RUST_TARGET_PATH="${PWD}/targets"
+export RUSTFLAGS="-C soft-float -C debuginfo=2"
+cargo clippy --lib --release --target x86_64-unknown-none "$@"
diff --git a/config.toml.example b/config.toml.example
index b3cdb9e7f..c79841e15 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -1,7 +1,7 @@
-[arch.x86_64.features]
-smap = "auto"
-fsgsbase = "auto"
-xsave = "auto"
-xsaveopt = "auto"
-
-# vim: ft=toml
+[arch.x86_64.features]
+smap = "auto"
+fsgsbase = "auto"
+xsave = "auto"
+xsaveopt = "auto"
+
+# vim: ft=toml
diff --git a/linkers/aarch64.ld b/linkers/aarch64.ld
index f679c9af3..303223eba 100644
--- a/linkers/aarch64.ld
+++ b/linkers/aarch64.ld
@@ -1,62 +1,62 @@
-ENTRY(kstart)
-OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
-
-KERNEL_OFFSET = 0xFFFFFF0000000000;
-
-SECTIONS {
- . = KERNEL_OFFSET;
-
- . += SIZEOF_HEADERS;
-
- /* Force the zero page to be part of a segment by creating a
- * dummy section in the zero page.
- * Limine will map the segment with the lowest vaddr value at
- * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
- * As such without the zero page being part of a segment, the
- * kernel would be loaded at an offset from the expected
- * location. As the redox kernel is not currently relocatable,
- * this would result in a crash. A similar issue likely exists
- * with multiboot/multiboot2 and the paddr of the segment.
- */
- .dummy ALIGN(8) : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
-
- . = ALIGN(4096);
-
- .text : AT(ADDR(.text) - KERNEL_OFFSET) {
- __text_start = .;
- *(.text*)
- __usercopy_start = .;
- *(.usercopy-fns)
- __usercopy_end = .;
- . = ALIGN(4096);
- __text_end = .;
- }
-
- .rodata : AT(ADDR(.rodata) - KERNEL_OFFSET) {
- __rodata_start = .;
- *(.rodata*)
- . = ALIGN(4096);
- __rodata_end = .;
- }
-
- .data : AT(ADDR(.data) - KERNEL_OFFSET) {
- __data_start = .;
- *(.data*)
- . = ALIGN(4096);
- __data_end = .;
- __bss_start = .;
- *(.bss*)
- . = ALIGN(4096);
- __bss_end = .;
- }
-
- __end = .;
-
- /DISCARD/ : {
- *(.comment*)
- *(.eh_frame*)
- *(.gcc_except_table*)
- *(.note*)
- *(.rel.eh_frame*)
- }
-}
+ENTRY(kstart)
+OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
+
+KERNEL_OFFSET = 0xFFFFFF0000000000;
+
+SECTIONS {
+ . = KERNEL_OFFSET;
+
+ . += SIZEOF_HEADERS;
+
+ /* Force the zero page to be part of a segment by creating a
+ * dummy section in the zero page.
+ * Limine will map the segment with the lowest vaddr value at
+ * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
+ * As such without the zero page being part of a segment, the
+ * kernel would be loaded at an offset from the expected
+ * location. As the redox kernel is not currently relocatable,
+ * this would result in a crash. A similar issue likely exists
+ * with multiboot/multiboot2 and the paddr of the segment.
+ */
+ .dummy ALIGN(8) : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
+
+ . = ALIGN(4096);
+
+ .text : AT(ADDR(.text) - KERNEL_OFFSET) {
+ __text_start = .;
+ *(.text*)
+ __usercopy_start = .;
+ *(.usercopy-fns)
+ __usercopy_end = .;
+ . = ALIGN(4096);
+ __text_end = .;
+ }
+
+ .rodata : AT(ADDR(.rodata) - KERNEL_OFFSET) {
+ __rodata_start = .;
+ *(.rodata*)
+ . = ALIGN(4096);
+ __rodata_end = .;
+ }
+
+ .data : AT(ADDR(.data) - KERNEL_OFFSET) {
+ __data_start = .;
+ *(.data*)
+ . = ALIGN(4096);
+ __data_end = .;
+ __bss_start = .;
+ *(.bss*)
+ . = ALIGN(4096);
+ __bss_end = .;
+ }
+
+ __end = .;
+
+ /DISCARD/ : {
+ *(.comment*)
+ *(.eh_frame*)
+ *(.gcc_except_table*)
+ *(.note*)
+ *(.rel.eh_frame*)
+ }
+}
diff --git a/linkers/i686.ld b/linkers/i686.ld
index f7eb9c429..def4c2102 100644
--- a/linkers/i686.ld
+++ b/linkers/i686.ld
@@ -1,57 +1,57 @@
-ENTRY(kstart)
-OUTPUT_FORMAT(elf32-i386)
-
-KERNEL_OFFSET = 0xC0000000;
-
-SECTIONS {
- . = KERNEL_OFFSET;
-
- . += SIZEOF_HEADERS;
-
- /* Force the zero page to be part of a segment by creating a
- * dummy section in the zero page.
- * Limine will map the segment with the lowest vaddr value at
- * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
- * As such without the zero page being part of a segment, the
- * kernel would be loaded at an offset from the expected
- * location. As the redox kernel is not currently relocatable,
- * this would result in a crash. A similar issue likely exists
- * with multiboot/multiboot2 and the paddr of the segment.
- */
- .dummy : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
-
- .text ALIGN(4K) : AT(ADDR(.text) - KERNEL_OFFSET) {
- __text_start = .;
- *(.text*)
- __usercopy_start = .;
- *(.usercopy-fns)
- __usercopy_end = .;
- }
-
- .rodata ALIGN(4K) : AT(ADDR(.rodata) - KERNEL_OFFSET) {
- __text_end = .;
- __rodata_start = .;
- *(.rodata*)
- }
-
- .data ALIGN(4K) : AT(ADDR(.data) - KERNEL_OFFSET) {
- __rodata_end = .;
- __data_start = .;
- *(.data*)
- . = ALIGN(4K);
- __data_end = .;
- __bss_start = .;
- *(.bss*)
- . = ALIGN(4K);
- }
-
- __end = .;
-
- /DISCARD/ : {
- *(.comment*)
- *(.eh_frame*)
- *(.gcc_except_table*)
- *(.note*)
- *(.rel.eh_frame*)
- }
-}
+ENTRY(kstart)
+OUTPUT_FORMAT(elf32-i386)
+
+KERNEL_OFFSET = 0xC0000000;
+
+SECTIONS {
+ . = KERNEL_OFFSET;
+
+ . += SIZEOF_HEADERS;
+
+ /* Force the zero page to be part of a segment by creating a
+ * dummy section in the zero page.
+ * Limine will map the segment with the lowest vaddr value at
+ * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
+ * As such without the zero page being part of a segment, the
+ * kernel would be loaded at an offset from the expected
+ * location. As the redox kernel is not currently relocatable,
+ * this would result in a crash. A similar issue likely exists
+ * with multiboot/multiboot2 and the paddr of the segment.
+ */
+ .dummy : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
+
+ .text ALIGN(4K) : AT(ADDR(.text) - KERNEL_OFFSET) {
+ __text_start = .;
+ *(.text*)
+ __usercopy_start = .;
+ *(.usercopy-fns)
+ __usercopy_end = .;
+ }
+
+ .rodata ALIGN(4K) : AT(ADDR(.rodata) - KERNEL_OFFSET) {
+ __text_end = .;
+ __rodata_start = .;
+ *(.rodata*)
+ }
+
+ .data ALIGN(4K) : AT(ADDR(.data) - KERNEL_OFFSET) {
+ __rodata_end = .;
+ __data_start = .;
+ *(.data*)
+ . = ALIGN(4K);
+ __data_end = .;
+ __bss_start = .;
+ *(.bss*)
+ . = ALIGN(4K);
+ }
+
+ __end = .;
+
+ /DISCARD/ : {
+ *(.comment*)
+ *(.eh_frame*)
+ *(.gcc_except_table*)
+ *(.note*)
+ *(.rel.eh_frame*)
+ }
+}
diff --git a/linkers/riscv64.ld b/linkers/riscv64.ld
index 634b5c2ca..cd88e1c93 100644
--- a/linkers/riscv64.ld
+++ b/linkers/riscv64.ld
@@ -1,68 +1,68 @@
-ENTRY(kstart)
-OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv" )
-
-KERNEL_OFFSET = 0xFFFFFF0000000000;
-
-SECTIONS {
- . = KERNEL_OFFSET;
-
- . += SIZEOF_HEADERS;
-
- /* Force the zero page to be part of a segment by creating a
- * dummy section in the zero page.
- * Linker will map the segment with the lowest vaddr value at
- * 0xFFFFFF0000000000 even if the segment has a higher vaddr.
- * As such without the zero page being part of a segment, the
- * kernel would be loaded at an offset from the expected
- * location. As the redox kernel is not currently relocatable,
- * this would result in a crash. A similar issue likely exists
- * with multiboot/multiboot2 and the paddr of the segment.
- */
- .dummy ALIGN(8) : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
-
- . = ALIGN(4096);
-
- .text : AT(ADDR(.text) - KERNEL_OFFSET) {
- __text_start = .;
- *(.early_init.text*)
- . = ALIGN(4096);
- *(.text*)
- __usercopy_start = .;
- *(.usercopy-fns)
- __usercopy_end = .;
- . = ALIGN(4096);
- __text_end = .;
- }
-
- .rodata : AT(ADDR(.rodata) - KERNEL_OFFSET) {
- __rodata_start = .;
- *(.rodata*)
- . = ALIGN(4096);
- __rodata_end = .;
- }
-
- .data : AT(ADDR(.data) - KERNEL_OFFSET) {
- __data_start = .;
- *(.data*)
- *(.sdata*)
- . = ALIGN(4096);
- __data_end = .;
- *(.got*)
- . = ALIGN(4096);
- __bss_start = .;
- *(.bss*)
- *(.sbss*)
- . = ALIGN(4096);
- __bss_end = .;
- }
-
- __end = .;
-
- /DISCARD/ : {
- *(.comment*)
- *(.eh_frame*)
- *(.gcc_except_table*)
- *(.note*)
- *(.rel.eh_frame*)
- }
-}
+ENTRY(kstart)
+OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv" )
+
+KERNEL_OFFSET = 0xFFFFFF0000000000;
+
+SECTIONS {
+ . = KERNEL_OFFSET;
+
+ . += SIZEOF_HEADERS;
+
+ /* Force the zero page to be part of a segment by creating a
+ * dummy section in the zero page.
+ * Linker will map the segment with the lowest vaddr value at
+ * 0xFFFFFF0000000000 even if the segment has a higher vaddr.
+ * As such without the zero page being part of a segment, the
+ * kernel would be loaded at an offset from the expected
+ * location. As the redox kernel is not currently relocatable,
+ * this would result in a crash. A similar issue likely exists
+ * with multiboot/multiboot2 and the paddr of the segment.
+ */
+ .dummy ALIGN(8) : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
+
+ . = ALIGN(4096);
+
+ .text : AT(ADDR(.text) - KERNEL_OFFSET) {
+ __text_start = .;
+ *(.early_init.text*)
+ . = ALIGN(4096);
+ *(.text*)
+ __usercopy_start = .;
+ *(.usercopy-fns)
+ __usercopy_end = .;
+ . = ALIGN(4096);
+ __text_end = .;
+ }
+
+ .rodata : AT(ADDR(.rodata) - KERNEL_OFFSET) {
+ __rodata_start = .;
+ *(.rodata*)
+ . = ALIGN(4096);
+ __rodata_end = .;
+ }
+
+ .data : AT(ADDR(.data) - KERNEL_OFFSET) {
+ __data_start = .;
+ *(.data*)
+ *(.sdata*)
+ . = ALIGN(4096);
+ __data_end = .;
+ *(.got*)
+ . = ALIGN(4096);
+ __bss_start = .;
+ *(.bss*)
+ *(.sbss*)
+ . = ALIGN(4096);
+ __bss_end = .;
+ }
+
+ __end = .;
+
+ /DISCARD/ : {
+ *(.comment*)
+ *(.eh_frame*)
+ *(.gcc_except_table*)
+ *(.note*)
+ *(.rel.eh_frame*)
+ }
+}
diff --git a/linkers/x86_64.ld b/linkers/x86_64.ld
index 6610509ae..495f18084 100644
--- a/linkers/x86_64.ld
+++ b/linkers/x86_64.ld
@@ -1,66 +1,66 @@
-ENTRY(kstart)
-OUTPUT_FORMAT(elf64-x86-64)
-
-KERNEL_OFFSET = 0xFFFFFFFF80000000;
-
-SECTIONS {
- . = KERNEL_OFFSET;
-
- . += SIZEOF_HEADERS;
-
- /* Force the zero page to be part of a segment by creating a
- * dummy section in the zero page.
- * Limine will map the segment with the lowest vaddr value at
- * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
- * As such without the zero page being part of a segment, the
- * kernel would be loaded at an offset from the expected
- * location. As the redox kernel is not currently relocatable,
- * this would result in a crash. A similar issue likely exists
- * with multiboot/multiboot2 and the paddr of the segment.
- */
- .dummy : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
-
- .text ALIGN(4K) : AT(ADDR(.text) - KERNEL_OFFSET) {
- __text_start = .;
- *(.text*)
- __usercopy_start = .;
- *(.usercopy-fns)
- __usercopy_end = .;
- }
-
- .rodata ALIGN(4K) : AT(ADDR(.rodata) - KERNEL_OFFSET) {
- __text_end = .;
- __rodata_start = .;
- *(.rodata*)
- __altcode_start = .;
- KEEP(*(.altcode*))
- __altcode_end = .;
- . = ALIGN(8);
- __altrelocs_start = .;
- KEEP(*(.altrelocs*))
- __altrelocs_end = .;
- __altfeatures_start = .;
- KEEP(*(.altfeatures*))
- __altfeatures_end = .;
- }
-
- .data ALIGN(4K) : AT(ADDR(.data) - KERNEL_OFFSET) {
- __rodata_end = .;
- __data_start = .;
- *(.data*)
- . = ALIGN(4K);
- __data_end = .;
- __bss_start = .;
- *(.bss*)
- }
-
- __end = .;
-
- /DISCARD/ : {
- *(.comment*)
- *(.eh_frame*)
- *(.gcc_except_table*)
- *(.note*)
- *(.rel.eh_frame*)
- }
-}
+ENTRY(kstart)
+OUTPUT_FORMAT(elf64-x86-64)
+
+KERNEL_OFFSET = 0xFFFFFFFF80000000;
+
+SECTIONS {
+ . = KERNEL_OFFSET;
+
+ . += SIZEOF_HEADERS;
+
+ /* Force the zero page to be part of a segment by creating a
+ * dummy section in the zero page.
+ * Limine will map the segment with the lowest vaddr value at
+ * 0xFFFFFFFF80000000 even if the segment has a higher vaddr.
+ * As such without the zero page being part of a segment, the
+ * kernel would be loaded at an offset from the expected
+ * location. As the redox kernel is not currently relocatable,
+ * this would result in a crash. A similar issue likely exists
+ * with multiboot/multiboot2 and the paddr of the segment.
+ */
+ .dummy : AT(ADDR(.dummy) - KERNEL_OFFSET) {}
+
+ .text ALIGN(4K) : AT(ADDR(.text) - KERNEL_OFFSET) {
+ __text_start = .;
+ *(.text*)
+ __usercopy_start = .;
+ *(.usercopy-fns)
+ __usercopy_end = .;
+ }
+
+ .rodata ALIGN(4K) : AT(ADDR(.rodata) - KERNEL_OFFSET) {
+ __text_end = .;
+ __rodata_start = .;
+ *(.rodata*)
+ __altcode_start = .;
+ KEEP(*(.altcode*))
+ __altcode_end = .;
+ . = ALIGN(8);
+ __altrelocs_start = .;
+ KEEP(*(.altrelocs*))
+ __altrelocs_end = .;
+ __altfeatures_start = .;
+ KEEP(*(.altfeatures*))
+ __altfeatures_end = .;
+ }
+
+ .data ALIGN(4K) : AT(ADDR(.data) - KERNEL_OFFSET) {
+ __rodata_end = .;
+ __data_start = .;
+ *(.data*)
+ . = ALIGN(4K);
+ __data_end = .;
+ __bss_start = .;
+ *(.bss*)
+ }
+
+ __end = .;
+
+ /DISCARD/ : {
+ *(.comment*)
+ *(.eh_frame*)
+ *(.gcc_except_table*)
+ *(.note*)
+ *(.rel.eh_frame*)
+ }
+}
diff --git a/rustfmt.toml b/rustfmt.toml
index becbe9e6e..eda5d8844 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1,21 +1,21 @@
-blank_lines_lower_bound = 0 # default
-blank_lines_upper_bound = 1 # default
-brace_style = "SameLineWhere" # default
-disable_all_formatting = false # default
-edition = "2021"
-empty_item_single_line = true # default
-fn_single_line = false # default
-force_explicit_abi = true # default
-format_strings = false # default
-hard_tabs = false # default
-show_parse_errors = true # default
-imports_granularity = "Crate" # default = Preserve
-imports_indent = "Block" # default
-imports_layout = "Mixed" # default
-indent_style = "Block" # default
-max_width = 100 # default
-newline_style = "Unix" # default = Auto
-skip_children = false # default
-tab_spaces = 4 # default
-trailing_comma = "Vertical" # default
-where_single_line = false # default
+blank_lines_lower_bound = 0 # default
+blank_lines_upper_bound = 1 # default
+brace_style = "SameLineWhere" # default
+disable_all_formatting = false # default
+edition = "2021"
+empty_item_single_line = true # default
+fn_single_line = false # default
+force_explicit_abi = true # default
+format_strings = false # default
+hard_tabs = false # default
+show_parse_errors = true # default
+imports_granularity = "Crate" # default = Preserve
+imports_indent = "Block" # default
+imports_layout = "Mixed" # default
+indent_style = "Block" # default
+max_width = 100 # default
+newline_style = "Unix" # default = Auto
+skip_children = false # default
+tab_spaces = 4 # default
+trailing_comma = "Vertical" # default
+where_single_line = false # default
diff --git a/src/acpi/madt/arch/x86.rs b/src/acpi/madt/arch/x86.rs
index a8121c687..df65cb20c 100644
--- a/src/acpi/madt/arch/x86.rs
+++ b/src/acpi/madt/arch/x86.rs
@@ -23,6 +23,15 @@ pub(super) fn init(madt: Madt) {
println!(" XAPIC {}: {:>08X}", me, local_apic.address);
}
+ // Validate APIC ID consistency with detected topology
+ let current_apic_id = local_apic.id();
+ if !crate::cpu_topology::validate_acpi_apic_id(current_apic_id) {
+ log::warn!(
+ "BSP APIC ID {} from MADT doesn't match detected topology",
+ current_apic_id
+ );
+ }
+
if cfg!(feature = "multi_core") {
// Map trampoline
let trampoline_frame = Frame::containing(PhysicalAddress::new(TRAMPOLINE));
@@ -57,6 +66,15 @@ pub(super) fn init(madt: Madt) {
println!(" This is my local APIC");
} else {
if ap_local_apic.flags & 1 == 1 {
+ // Validate APIC ID against detected topology
+ if !crate::cpu_topology::validate_acpi_apic_id(ap_local_apic.id.into())
+ {
+ log::warn!(
+ "AP APIC ID {} from MADT not found in detected topology - may cause issues on hybrid CPUs",
+ ap_local_apic.id
+ );
+ }
+
// Increase CPU ID
CPU_COUNT.fetch_add(1, Ordering::SeqCst);
diff --git a/src/arch/riscv64/device/irqchip/clint.rs b/src/arch/riscv64/device/irqchip/clint.rs
index 560d86df0..b8afd66d7 100644
--- a/src/arch/riscv64/device/irqchip/clint.rs
+++ b/src/arch/riscv64/device/irqchip/clint.rs
@@ -1,42 +1,42 @@
-use spin::Mutex;
-use syscall::{Io, Mmio};
-use crate::context::switch::tick;
-
-#[repr(packed(4))]
-#[repr(C)]
-struct ClintRegs {
- /// per-hart MSIP registers
- /// bit 0: trigger IPI for the hart
- msip: [Mmio; 4095], // +0000 -- 3fff
- _rsrv1: u32,
- /// per-hart MTIMECMP registers
- /// timer interrupt trigger threshold
- mtimecmp: [Mmio; 4095], // +4000 - bff7
- mtime: Mmio // current time
-}
-
-pub struct Clint {
- regs: &'static mut ClintRegs,
- freq: u64
-}
-
-pub static CLINT: Mutex