Commit Graph

158 Commits

Author SHA1 Message Date
Mintsuki
65a4eaed9d sys/lapic: Skip MADT type 4 NMI entries for x2APIC UIDs above 0xfe 2026-04-20 18:02:57 +02:00
Mintsuki
e0b5fd0d21 sys/cpu_riscv: Validate RHCT hart_info offsets array bounds 2026-04-19 00:36:18 +02:00
Mintsuki
f69b2b5c67 sys/cpu: Add memory clobber to LoongArch IOCSR accessors 2026-04-19 00:35:14 +02:00
Mintsuki
caad1ecfe4 sys/cpu: Fix misleading comment in TSC calibration 2026-04-19 00:35:14 +02:00
Mintsuki
58083a725a sys/cpu: Fix locked_write asm constraint to declare memory operand as output 2026-04-19 00:28:37 +02:00
Mintsuki
4929ccdf52 sys/cpu: Improve TSC calibration accuracy on UEFI and BIOS 2026-04-09 13:07:12 +02:00
Mintsuki
8e842edecf sys/cpu: Add PIT-based TSC calibration for BIOS 2026-04-06 19:04:22 +02:00
Mintsuki
dd2354bae9 sys/cpu: Add retry limit to rdrand/rdseed macros 2026-04-02 22:21:54 +02:00
Mintsuki
198bd3b8b0 sys/smp: Use fence instruction for RISC-V AP trampoline store ordering 2026-04-02 01:44:59 +02:00
Mintsuki
947a9b2c3a sys/lapic, sys/smp: Validate MADT entry length against table boundary 2026-04-02 01:44:58 +02:00
Mintsuki
f7c265f806 sys/cpu: Fix locked_read memory operand constraint to input+output 2026-04-02 01:44:58 +02:00
Mintsuki
d7f0160ddc mm/pmm: Add ext_mem_alloc_counted(), use it everywhere for checked array allocations 2026-03-31 15:31:50 +02:00
Mintsuki
165e05ff3d protos/limine: Make aarch64 EL2 entry automatic based on firmware state 2026-03-20 14:01:31 +01:00
Mintsuki
96029d8f5e sys/smp: Fix loongarch64 AP poll loop to use stall() instead of removed delay() 2026-03-18 11:41:59 +01:00
Mintsuki
3cfb0f37f9 sys/smp: Fix loongarch64 AP trampoline register state at kernel entry 2026-03-18 11:41:59 +01:00
Mintsuki
b58da8372a Merge pull request 'loongarch64: Add smp support' (#50) from lihanrui/Limine:trunk into trunk
Reviewed-on: https://codeberg.org/Limine/Limine/pulls/50
2026-03-18 11:08:35 +01:00
Mintsuki
d634d8d32d sys/smp: Zero gp in riscv64 AP trampoline 2026-03-17 08:26:50 +01:00
Mintsuki
81c5dc1b7e protos/limine: Tighten riscv64 machine state to match spec 2026-03-17 08:26:50 +01:00
Mintsuki
5c0635a118 protos/limine: Tighten aarch64 machine state to match spec 2026-03-16 04:01:50 +01:00
Mintsuki
ae7399eb8e sys/cpu: Use Q constraint for aarch64 locked_read to avoid ldar offset 2026-03-16 00:12:19 +01:00
Mintsuki
6446cb757b sys/smp: Fix aarch64 AP trampoline EL2 stay path for non-VHE APs 2026-03-15 21:39:14 +01:00
Mintsuki
ef4d1b42c0 sys/smp: Do not set SPSR in MMU enable fault window in aarch64 AP trampoline 2026-03-15 21:39:14 +01:00
Mintsuki
397824ada9 sys/smp: Avoid literal pool in aarch64 AP trampoline EL2 stay path 2026-03-15 21:39:14 +01:00
Mintsuki
102449250d protos/limine: Implement aarch64 EL2 entry request 2026-03-15 09:58:07 +01:00
Mintsuki
43235f07ec smp: Use EL12 register aliases for aarch64 AP trampoline under VHE 2026-03-15 03:49:03 +01:00
Mintsuki
c1d98eb350 sys/smp: Widen bsp_lapic_id to uint32_t to avoid x2APIC ID truncation 2026-03-07 00:26:46 +01:00
Mintsuki
4f7aa2ed5d sys/lapic: Preserve LAPIC register state across x2APIC-to-xAPIC transition 2026-03-03 18:24:50 +01:00
Mintsuki
57d6fb0d8f Revert "sys/pic: Reinitialise PICs in pic_flush() to clear stale IRR/ISR state"
This reverts commit bfde2899fc.
2026-02-26 00:47:37 +01:00
Mintsuki
27b209aee8 sys/lapic: Preserve I/O APIC redirection entries when masking 2026-02-25 04:09:06 +01:00
Mintsuki
ab5936bd58 sys/lapic: Preserve LVT entries with SMI/INIT/reserved delivery modes 2026-02-25 04:09:06 +01:00
Mintsuki
bfde2899fc sys/pic: Reinitialise PICs in pic_flush() to clear stale IRR/ISR state 2026-02-25 04:09:06 +01:00
Mintsuki
706bbac234 sys/cpu: Round up stall() tick count for sub-MHz timer frequencies 2026-02-25 04:09:06 +01:00
Mintsuki
aad4f66fec sys/cpu: Fix rdtsc_usec() intermediate overflow 2026-02-25 04:09:06 +01:00
Mintsuki
57188a10d8 sys/iommu: Remove VT-d polling timeout and fix poll loop order 2026-02-25 04:09:06 +01:00
Mintsuki
c5c2e7909e sys/cpu: Add memory clobber to rdtsc inline assembly 2026-02-25 04:09:05 +01:00
Mintsuki
b627a65d58 sys/smp: Add xAPIC ICR delivery status checks to INIT-SIPI-SIPI sequence 2026-02-25 04:09:05 +01:00
Mintsuki
6e8a10e9d0 sys/iommu: Fix VT-d disable order to TE, IRE, QIE 2026-02-25 04:09:05 +01:00
Mintsuki
5cf6d7f80d Revert "sys/exceptions: Remove unnecessary exception number bounds check"
This reverts commit cdc875073c.
2026-02-22 18:29:01 +01:00
Mintsuki
66d6d8402d sys/cpu: Fix integer truncation in stall() 2026-02-22 18:29:01 +01:00
Mintsuki
fa4a4f1ba8 protos/limine: Strictly define x86-64 machine state for base revision 5 2026-02-22 15:16:41 +01:00
Mintsuki
3e9f531b95 sys/smp: Try to disable x2APIC when kernel does not support it 2026-02-20 21:58:07 +01:00
Mintsuki
1cec138d5c protos/limine: Implement base revision 5 2026-02-20 03:51:24 +01:00
Mintsuki
db5c4fd991 sys/iommu: Disable Intel VT-d and AMD-Vi IOMMUs before kernel entry 2026-02-20 03:47:18 +01:00
Mintsuki
9d3e231834 sys/cpu: Replace cycle-based delay() with calibrated stall() 2026-02-17 08:07:11 +01:00
Mintsuki
cdc875073c sys/exceptions: Remove unnecessary exception number bounds check 2026-02-16 13:08:01 +01:00
lihanrui2913
57ae8f017a loongarch64: Add smp support 2026-02-15 10:29:09 +08:00
Mintsuki
e120f87ae3 sys/smp: Use smp_trampoline_size for AArch64 cache maintenance range 2026-02-09 13:02:39 +01:00
Mintsuki
e700741d9e sys/cpu: Use rdtime.d and CPUCFG for LoongArch64 performance timing 2026-02-09 13:02:39 +01:00
Mintsuki
f6de46a7fc sys/cpu: Use rdtime and time_base_frequency for RISC-V performance timing 2026-02-09 13:02:39 +01:00
Mintsuki
6e8755845e sys/smp: Reject address_cells == 0 in AArch64 DTB SMP enumeration 2026-02-09 13:02:39 +01:00