ASELSANMicrokernel
S212 · SOURCE-BOUND GATE EVIDENCE

G8l: upstream runtime-owner/S197 tuple handoff

Operations --test hedefi → focused test içindeki include_str!/#[path] bağı → kaynak kesiti Bu sayfa yalnız S212 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.

S212Focused kod testiOperations id exactsource SHA exacttest target exact

operation: g8l-s212-upstream-runtime-owner-s197-tuple-handoff-partial

uygulama/model · focused test · Operations · 3 exact excerpt

sequence-bound=true · implementation-bound=true
01 · Testin bağlı olduğu uygulama/model kodu

Kapının yürüttüğü gerçek kaynak

tam Rust öğesiL14–L73
kernel/src/arch/aarch64/exceptions.rs::TICKS

use super::{gic, timer};

/// Global tick sayacı. Drift ölçümü + scheduler tick için.
pub static TICKS: AtomicU64 = AtomicU64::new(0);

/// Trampoline'ın stack üzerine kaydettiği register seti.
/// `exceptions.S` içindeki layout ile birebir aynı olmalı.
///
/// TODO(M3.4-real / Audit #19): Exception'lar için ayrı bir IRQ stack ayır
/// (şu an her task'in kendi stack'ini kullanıyor → 16 KiB task stack üzerinde
/// 272 byte trap frame + Rust handler local'leri = nested IRQ veya derin
/// scheduler çağrısı stack overflow yapabilir). Çözüm: per-CPU `IRQ_STACK`
/// statik (4 KiB), trampoline başında SP_EL0 swap.
///
/// TODO(M3.4-real / Audit #12): TaskContext'e ELR_EL1, SPSR_EL1, DAIF, TPIDR
/// alanları eklenmeli. Şu anda cooperative scheduler bunlara ihtiyaç duymuyor
/// (yield_now bir fonksiyon çağrısı, callee-saved registerlar yeter); ama
/// gerçek IRQ-driven preemption (timer IRQ → context_switch) exception
/// frame'inin tamamını task'e bağlamak zorunda.
#[repr(C)]
pub struct ExceptionContext {
    pub gpr: [u64; 30], // x0..x29
    pub lr: u64,        // x30
    pub elr_el1: u64,   // dönüş PC
    pub spsr_el1: u64,  // dönüş PSTATE
}

const _: () = assert!(
    core::mem::size_of::<ExceptionContext>() == 264,
    "exceptions.S expects the integer exception context to occupy 264 bytes",
);

/// ESR_EL1.EC alanını (bits 31:26) decode et.
fn decode_ec(esr: u64) -> &'static str {
    match (esr >> 26) & 0x3f {
        0x00 => "Unknown reason",
        0x01 => "Trapped WFI/WFE",
        0x07 => "SIMD/FP access trapped",
        0x0e => "Illegal Execution state",
        0x15 => "SVC (AArch64)",
        0x18 => "MSR/MRS/system trap",
        0x20 => "Instruction Abort, lower EL",
        0x21 => "Instruction Abort, same EL",
        0x22 => "PC alignment fault",
        0x24 => "Data Abort, lower EL",
        0x25 => "Data Abort, same EL",
        0x26 => "SP alignment fault",
        0x2c => "FP trapped exception (AArch64)",
        0x2f => "SError",
        0x30 => "Breakpoint (lower EL)",
        0x31 => "Breakpoint (same EL)",
        0x32 => "Software Step (lower EL)",
        0x33 => "Software Step (same EL)",
        0x34 => "Watchpoint (lower EL)",
        0x35 => "Watchpoint (same EL)",
        0x3c => "BRK instruction (AArch64)",
        _ => "<bilinmeyen EC>",
    }
}
snippet sha256: 8dc4242a2af7file sha256: 6f3a4c8dbf40
02 · Doğrulayan test kodu

Operations komutuna bağlı focused test

tam Rust öğesiL320–L337
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task_runtime_owner_s197_tuple.rs::real_cpu1_timer_irq_orders_s212_publish_before_s210_consume_and_g7d_dispatch

#[test]
fn real_cpu1_timer_irq_orders_s212_publish_before_s210_consume_and_g7d_dispatch() {
    let exceptions = include_str!("../../kernel/src/arch/aarch64/exceptions.rs");
    let cpu1 = exceptions
        .split("if crate::percpu::current_cpu_id() == 1")
        .nth(1)
        .unwrap();
    let s212 = cpu1
        .find("service_runtime_owner_s197_tuple_from_current_scheduler_task")
        .unwrap();
    let s210 = cpu1
        .find("service_runtime_owned_current_task_owner_invocation")
        .unwrap();
    let g7d = cpu1.find("crate::rpi5_g7d::on_timer_irq").unwrap();
    assert!(s212 < s210);
    assert!(s210 < g7d);
}
snippet sha256: 9e42b3ef0bccfile sha256: a88ebb47988f
03 · Kapı kimlik kaydı

Operations sıra, kimlik ve başlık bağı

tam Operations kaydıL21051–L21102
website/src/lib/operations.ts::g8l-s212-upstream-runtime-owner-s197-tuple-handoff-partial
  {
    id: "g8l-s212-upstream-runtime-owner-s197-tuple-handoff-partial",
    date: "2026-08-25",
    sequence: 212,
    status: "passed",
    umbrella_status: "partial",
    title: "G8l: upstream runtime-owner/S197 tuple handoff",
    summary:
      "S212 16/16 PASS ile private non-Copy runtime/owner/S197 tuple için allocation-free tek-slot ingress'i gerçek RPi5 CPU1 timer-IRQ çağrısına bağladı. IRQ tuple'yı önce alır, S211'in gerçek SCHEDULER.current_task admission/publication yolunu çağırır, ardından S210 tüketimini ve G7d dispatch'i çalıştırır; migration tuple producer henüz yoktur.",
    evidence: [
      "S212 focused tuple/IRQ-callsite grubu iki bağımsız koşuda 16/16 PASS: private authority ownership, producer observation injection reddi, upstream single-slot replacement rejection, take-before-S211, terminal error/no-retry ve real CPU1 IRQ source-order kapıları.",
      "Focused koşular byte-eşit kaldı: 131 B / SHA-256 15a7e46ffcfb80e4e2e064396f9c9ae1e218c34c5d775ddeec493f8d588c0d23.",
      "S206 callsite/readback + S207–S212 dependency matrix iki bağımsız koşuda 9 grup / 113/113 PASS ve 1146 B / SHA-256 10542dfa20a458f690235e504e7d6a49606bf5e898c6e888627c2953864e9252 verdi; ilk 1015 B exact S211 dependency prefix'idir.",
      "S155–S212 explicit sequence-ordered matrix iki bağımsız koşuda 61 grup / 596/596 PASS ve 7557 B / SHA-256 5bc15ff78f6c0e1c0ab3aff806e780380e1aa1f0cd194638043e41fd81efe5eb verdi; exact S211 7426 B prefix'i korundu.",
      "Gerçek RPi5 CPU1 timer-IRQ sırası S212 tuple take→S211 current-scheduler publication→S210 consume→G7d dispatch'tir. Tuple producer kendi observed-current-task alanını veremez; gerçek gözlem S211'de yapılır.",
      "RPi5 AArch64 compile PASS: 531 warning envanterlendi; 272676 B / SHA-256 4862a999d8ac31757feac7a8fcfc62e248a59bd39b88649126832662cd691e85. `smp`: 531 warning, 272618 B / SHA-256 72c7df4527f3054d62279d501083078d783ecf335955cdc3915b73f47539ecb0. Zero-warning iddiası yoktur.",
      "Kalıcı kapsam: `docs/M8.1-RPi5-G8l-S212-Upstream-Runtime-Owner-S197-Tuple-Handoff-Proof.md`.",
      "S212 fiziksel/device operasyonu yapmadı: physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S212=NO.",
      "Görünür fiziksel sıra: Gücü kapat → SD kartı Pi'den çıkar → SD kartı Mac'e tak → Yetkili write/verify/read-back işlemini tamamla → SD kartı Mac'ten güvenli çıkar → SD kartı güçsüz Pi'ye tak → UART capture pre-arm ve exact identity kapısını doğrula → Güç ver. Bu sıra yalnız tarihsel S124'te tamamlandı; S212'de uygulanmadı.",
      "Migration lifecycle tuple'yı üretip ingress'e henüz vermiyor; upstream slot runtime'da boş, present request, S207 invocation veya scheduler mutation gözlemi iddia edilmez.",
      "Canlı marker: S212_16_OF_16_UPSTREAM_RUNTIME_OWNER_S197_TUPLE_SINGLE_SLOT_AND_CPU1_TIMER_IRQ_CALLSITE_TAKE_BEFORE_S211_REAL_CURRENT_TASK_PUBLICATION_BEFORE_S210_CONSUMPTION_BEFORE_G7D_NO_REPLACEMENT_NO_RETRY_MIGRATION_TUPLE_PRODUCER_ABSENT_PRESENT_REQUEST_NOT_OBSERVED_LEGACY_SCHEDULER_ACCESSES_UNCOVERED_WHOLE_SCHEDULER_GIC_HARDWARE_QEMU_PHYSICAL_CPU2_CPU3_HOTPLUG_SOAK_GENERIC_SMP_OPEN_FULL_PHYSICAL_RUNBOOK_VISIBLE_S372_TO_S422_S397_NO_RUNBOOK_EXECUTED_IN_S212_VERIFIED; deployment-specific route/hash evidence is recorded in the project-status manifest.",
    ],
    commands: [
      "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task_runtime_owner_s197_tuple -- --test-threads=1",
      "cargo check --quiet --manifest-path kernel/Cargo.toml --target aarch64-unknown-none --no-default-features --features board-rpi5",
      "cargo check --quiet --manifest-path kernel/Cargo.toml --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
    ],
    terminalSessions: [
      {
        id: "s212-g8l-upstream-runtime-owner-s197-tuple-handoff",
        title: "G8l S212 upstream runtime-owner/S197 tuple handoff",
        commandLines: [
          "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task_runtime_owner_s197_tuple -- --test-threads=1",
        ],
        outputLines: [
          "test result: ok; 16 passed; 0 failed",
          "CPU1 timer IRQ takes the private runtime/owner/S197 tuple before S211 publication",
          "S211 real current-task publication precedes S210 consume and G7d dispatch",
          "production migration tuple producer is absent; present request/runtime invocation is not claimed",
        ],
        exitCode: 0,
        outputMode: "selected",
      },
    ],
    terminalSessionsNote:
      "Terminal özeti S212 tuple slotu ve gerçek CPU1 IRQ callsite source-order sınırını gösterir; present-tuple runtime, QEMU veya fiziksel cihaz çalıştırması değildir.",
    limitations: [
      "S212 tuple slotu, ingress API'si ve gerçek CPU1 timer-IRQ caller'ını bağlar; ancak production migration lifecycle tuple üretmediği için present request veya S207 runtime invocation iddia edilmez.",
      "Local IRQ mask whole-scheduler exclusion sağlamaz; legacy scheduler erişimleri, GIC/SGI capture, QEMU present-tuple yolu, fiziksel RPi ve Generic SMP açıktır.",
      "S212 fiziksel/device operasyonu yapmadı; RUNBOOK_EXECUTED_IN_S212=NO.",
    ],
  },
snippet sha256: 385e8488a0dbfile sha256: 9726dbf00f84
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task_runtime_owner_s197_tuple -- --test-threads=1
proof: docs/M8.1-RPi5-G8l-S212-Upstream-Runtime-Owner-S197-Tuple-Handoff-Proof.md
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06