678980521c
Kernel: - T1.1 msi.rs: MSI message composition (MsiMessage), validation (is_valid_msi_address, is_valid_msi_vector), capability parsing (MsiCapability, MsixCapability) with bounds-safe .get() access - T1.2 vector.rs: per-CPU bitmatrix vector allocation/deallocation - T1.3 IRQ scheme: MSI vector validation gate at irq_trigger, iommu_validate_msi_irq hook, msi_vector_is_valid helper - mod.rs: declarations for msi + vector modules - Fix validation mask 0xFEEF_F000→0xFFF0_0000 (bits 31:20 check) T2.1 driver-sys: program_x86_message kernel-mediated validation - Validates MSI address range 0xFEE0_0000–0xFEEF_EFFF and vector 32–254 - Gated behind #[cfg(target_os = "redox")]; clearly rejects non-Redox - Uses correct 0xFFF0_0000 mask for destination-ID-tolerant validation T2.2 kernel-side affinity: Handle::IrqAffinity variant - kopenat handles <irq>/affinity and cpu-XX/<irq>/affinity paths - kwrite validates CPU id exists, stores mask atomically - kfstat/kfpath/kreadoff/close all handle new variant - Fix unused handle_irq warning in kwrite match arm T2.3 driver-sys: MsiAllocation struct + irq_set_affinity helper - MsiAllocation with round-robin CPU allocation via alloc_cpu_id - irq_set_affinity uses scheme:irq/<irq>/affinity write path - IrqFd type alias in pci.rs for file descriptor tracking IOMMU T3.1: InterruptRemapTable, IRTE encode/decode, IrqRemapManager - IRTE (16-byte) encoding/decoding for AMD-Vi interrupt remapping - InterruptRemapTable with program/invalidate/find_free - IrqRemapManager with multi-table remap and validate_msi gate - Remove arbitrary .min(256) bound on find_free P8-msi.patch: 281-line durable kernel patch, wired in recipe.toml
30 lines
1.6 KiB
TOML
30 lines
1.6 KiB
TOML
# Consolidated patch: all Red Bear kernel changes (P0-P10) in a single file.
|
|
# Individual patches preserved in local/patches/kernel/ for reference/rebase.
|
|
# The consolidated patch was generated from applying: redox(no-op), P0-canary,
|
|
# P1-memory-map-overflow, P4-supplementary-groups, P4-s3-suspend-resume,
|
|
# P4-scheme-failure-modes, P5-sched-rt-policy, P5-scheme-sched-id,
|
|
# P5-context-mod-sched, P6-percpu-runqueues, P6-futex-sharding,
|
|
# P8-initial-placement, P9-proc-lock-ordering, P9-numa-topology,
|
|
# P1-boot-path-diagnostics, P10-debug-scheme-serial-fix.
|
|
# Patches that were cumulative supersets (P5-sched-policy-context, P5-proc-setschedpolicy,
|
|
# P5-boot-path-hardening, P6-vruntime-*, P7-cache-affine-*, P7-proc-setname,
|
|
# P7-proc-setpriority, P8-futex-requeue, P8-futex-pi, P8-futex-robust,
|
|
# P8-percpu-wiring, P8-percpu-sched, P8-load-balance, P8-work-stealing,
|
|
# P9-futex-pi-cas-fix) failed to apply at commit 866dfad0 due to
|
|
# context conflicts and are deferred until rebase.
|
|
# P8-msi (applies separately): T1.1 msi.rs (message composition/validation/capability
|
|
# parsing), T1.2 vector.rs (per-CPU bitmatrix allocation), T1.3 IRQ scheme MSI
|
|
# validation gate + iommu hook, T2.2 kernel-side IRQ affinity handler.
|
|
[source]
|
|
git = "https://gitlab.redox-os.org/redox-os/kernel.git"
|
|
rev = "866dfad0"
|
|
patches = ["../../../local/patches/kernel/redbear-consolidated.patch", "../../../local/patches/kernel/P7-scheduler-improvements.patch", "../../../local/patches/kernel/P8-msi.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"
|
|
"""
|