diff --git a/Cargo.lock b/Cargo.lock
index a13823d..89ea2f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -35,6 +35,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483"
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
[[package]]
name = "autocfg"
version = "1.4.0"
@@ -173,6 +179,12 @@ dependencies = [
"byteorder",
]
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
[[package]]
name = "float-cmp"
version = "0.9.0"
@@ -182,6 +194,12 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "foldhash"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
+
[[package]]
name = "funty"
version = "2.0.0"
@@ -194,6 +212,17 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
[[package]]
name = "itertools"
version = "0.13.0"
@@ -213,6 +242,7 @@ dependencies = [
"bitvec",
"buddy_system_allocator",
"embedded-graphics",
+ "hashbrown",
"kernel-common",
"log",
"spin",
diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml
index 2ab6488..a4afae0 100644
--- a/kernel/Cargo.toml
+++ b/kernel/Cargo.toml
@@ -11,6 +11,7 @@ bitfield = "0.17.0"
bitvec = {version = "1.0.1", default-features = false, features = ["alloc", "atomic"]}
buddy_system_allocator = "0.11.0"
embedded-graphics = "0.8.1"
+hashbrown = "0.15.2"
kernel-common = {path = "../lib/kernel-common"}
log = "0.4.22"
spin = "0.9.8"
diff --git a/kernel/src/cpu/boot.s b/kernel/src/cpu/boot.s
index 2b211f3..45f0cb3 100644
--- a/kernel/src/cpu/boot.s
+++ b/kernel/src/cpu/boot.s
@@ -11,6 +11,7 @@ _start:
call rdrand
mov %rax, __stack_chk_guard
call early_main
+
.section .bss
.align 8
.global __stack_chk_guard
diff --git a/kernel/src/cpu/mod.rs b/kernel/src/cpu/mod.rs
index fdb7f9e..3ed47e8 100644
--- a/kernel/src/cpu/mod.rs
+++ b/kernel/src/cpu/mod.rs
@@ -2,3 +2,4 @@ pub mod gdt;
pub mod idt;
pub mod isr;
pub mod paging;
+pub mod smp;
diff --git a/kernel/src/cpu/paging.rs b/kernel/src/cpu/paging.rs
index 750c182..83dc583 100644
--- a/kernel/src/cpu/paging.rs
+++ b/kernel/src/cpu/paging.rs
@@ -25,7 +25,7 @@ extern "C" {
}
static PAGING_ACTIVE: AtomicBool = AtomicBool::new(false);
-static CURRENT_PML4: Mutex