chore: kernel source patches, local recipe updates, and build artifacts

Kernel source (ephemeral — changes durable in local/patches/kernel/):
- P20 x2apic ICR mode fix, P21 x2apic SMP fix applied
- ACPI MADT, RSDP, SDT improvements
- Context switch, percpu, event, IRQ scheme updates
- MSI/vector allocation, NUMA/SLIT/SRAT support

Local recipe source updates:
- redox-driver-acpi: bus/prt hardening
- redox-drm: Intel display, KMS connector improvements
- driver-manager: config/scheme hardening
- thermald: main.rs fix
- uutils-tar, ninja-build: source updates

Other:
- bootloader, installer, redoxfs, relibc, userutils source updates
- recipe.toml.backup, libxcvt source directory
This commit is contained in:
2026-05-18 14:20:54 +03:00
parent f6c2eb2a8e
commit ecc120b013
72 changed files with 5058 additions and 599 deletions
@@ -74,14 +74,16 @@ impl MemoryEntry {
}
struct MemoryMap {
entries: [MemoryEntry; 512],
entries: [MemoryEntry; 1024],
size: usize,
}
impl MemoryMap {
fn register(&mut self, base: usize, size: usize, kind: BootloaderMemoryKind) {
if self.size >= self.entries.len() {
panic!("Early memory map overflow!");
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
unsafe { core::arch::asm!("out dx, al", in("dx") 0x3F8u16, in("al") b'!', options(nostack, preserves_flags)); }
panic!("Early memory map overflow at entry {} (max {})", self.size, self.entries.len());
}
let start = if kind == BootloaderMemoryKind::Free {
align_up(base)
@@ -134,7 +136,7 @@ static MEMORY_MAP: SyncUnsafeCell<MemoryMap> = SyncUnsafeCell::new(MemoryMap {
start: 0,
end: 0,
kind: BootloaderMemoryKind::Null,
}; 512],
}; 1024],
size: 0,
});
@@ -323,7 +325,16 @@ unsafe fn map_memory<A: Arch>(areas: &[MemoryArea], mut bump_allocator: &mut Bum
}
}
let kernel_area = (*MEMORY_MAP.get()).kernel().unwrap();
let kernel_area = match (*MEMORY_MAP.get()).kernel() {
Some(area) => area,
None => {
println!("FATAL: kernel memory area not found in boot memory map");
println!("Cannot determine kernel base address. Halting.");
loop {
core::hint::spin_loop();
}
}
};
let kernel_base = kernel_area.start;
let kernel_size = kernel_area.end.saturating_sub(kernel_area.start);
// Map kernel at KERNEL_OFFSET
+10 -3
View File
@@ -149,6 +149,15 @@ static BOOTSTRAP: spin::Once<Bootstrap> = spin::Once::new();
pub(crate) static AP_READY: AtomicBool = AtomicBool::new(false);
static BSP_READY: AtomicBool = AtomicBool::new(false);
#[cold]
fn halt_boot(message: &str) -> ! {
print!("{message}");
println!("Kernel boot cannot continue. Halting.");
loop {
hint::spin_loop();
}
}
/// This is the kernel entry point for the primary CPU. The arch crate is responsible for calling this
pub(crate) fn kmain(bootstrap: Bootstrap) -> ! {
let mut token = unsafe { CleanLockToken::new() };
@@ -180,9 +189,7 @@ pub(crate) fn kmain(bootstrap: Bootstrap) -> ! {
context.euid = 0;
context.egid = 0;
}
Err(err) => {
panic!("failed to spawn userspace_init: {:?}", err);
}
Err(_err) => halt_boot("FATAL: failed to spawn first userspace process userspace_init\n"),
}
run_userspace(&mut token)