Files
RedBear-OS/recipes/core/kernel/recipe.toml
T
vasilito bb4f757ba0 kernel: Add MONITOR/MWAIT C1 idle support (P24)
Implement CPU power-saving idle loop using x86 MONITOR/MWAIT:
- Add monitor(), mwait(), enable_and_mwait() to interrupt module
- Detect MWAIT availability via CPUID at boot
- Use MONITOR+MWAIT instead of STI+HLT when supported
- Expose /scheme/sys/cstate_policy for userspace control
- Add RdWr Kind variant to sys scheme for read+write files
2026-05-20 16:49:48 +03:00

59 lines
3.2 KiB
TOML

[source]
git = "https://gitlab.redox-os.org/redox-os/kernel.git"
rev = "866dfad0"
patches = [
"../../../local/patches/kernel/redbear-consolidated.patch",
"../../../local/patches/kernel/P8-msi.patch",
"../../../local/patches/kernel/P8-msi-foundation-v2.patch",
"../../../local/patches/kernel/P2-rebrand-start-message.patch",
"../../../local/patches/kernel/P0-eventfd-kernel.patch",
"../../../local/patches/kernel/P0-rsdp-checksum.patch",
"../../../local/patches/kernel/P1-mkfifo-fifo-support-v2.patch",
"../../../local/patches/kernel/P1-ioapic-hpet-nmi-v2.patch",
"../../../local/patches/kernel/P9-numa-topology.patch",
"../../../local/patches/kernel/P9-proc-lock-ordering.patch",
"../../../local/patches/kernel/P9-percpu-context-switch.patch",
"../../../local/patches/kernel/P9-broadcast-tlb-shootdown.patch",
"../../../local/patches/kernel/P9-ioapic-irq-affinity.patch",
"../../../local/patches/kernel/P10-irq-affinity-wiring.patch",
"../../../local/patches/kernel/P11-mcs-lock.patch",
"../../../local/patches/kernel/P12-range-tlb-flush.patch",
"../../../local/patches/kernel/P13-priority-inheritance.patch",
"../../../local/patches/kernel/P14-numa-topology.patch",
"../../../local/patches/kernel/P15-1-ap-cpu-id-race.patch",
"../../../local/patches/kernel/P15-4-mcs-pi-ordering.patch",
"../../../local/patches/kernel/P15-10-tlb-range-ordering.patch",
"../../../local/patches/kernel/P16-3-max-cpu-256.patch",
"../../../local/patches/kernel/P16-1-sipi-timing.patch",
"../../../local/patches/kernel/P16-4a-sdt-checksum.patch",
"../../../local/patches/kernel/P16-4b-madt-validation.patch",
"../../../local/patches/kernel/P17-2a-percpu-waiting.patch",
"../../../local/patches/kernel/P17-2b-transitive-pi.patch",
"../../../local/patches/kernel/P17-4-configurable-preempt.patch",
"../../../local/patches/kernel/P17-1-numa-selection.patch",
"../../../local/patches/kernel/P17-3-sched-affinity.patch",
"../../../local/patches/kernel/P17-3-syscall-dispatch.patch",
"../../../local/patches/kernel/P19-2-irq-debug.patch",
# P20: x2APIC ICR mode fix (32-bit dest field for x2APIC, 8-bit for xAPIC)
"../../../local/patches/kernel/P20-x2apic-icr-mode-fix.patch",
# P21: x2APIC SMP bring-up fix — skip 8-bit LocalApic entries when x2APIC
# is active (BSP ID mismatch causes all APs to be skipped on bare metal Intel)
"../../../local/patches/kernel/P21-x2apic-smp-fix.patch",
# P22: x2APIC MADT fallback — when x2APIC is active but MADT has no
# LocalX2Apic entries (QEMU, some BIOS), fall back to processing LocalApic
# entries with zero-extended IDs using x2APIC 64-bit ICR format
"../../../local/patches/kernel/P22-x2apic-madt-fallback.patch",
# P23: sys:msr scheme — kernel MSR read/write via /scheme/sys/msr/<cpu>/<msr>
"../../../local/patches/kernel/P23-sys-msr-scheme.patch",
# P24: C-state idle loop with MONITOR/MWAIT support
"../../../local/patches/kernel/P24-cstate-mwait-idle.patch",
]
[build]
template = "custom"
script = """
make -f ${COOKBOOK_SOURCE}/Makefile
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
cp -v kernel "${COOKBOOK_STAGE}/usr/lib/boot"
"""