// Three complete CPU0 service transactions in the same boot. This validates // reuse and bounded resource accounting; it never grants the 7200s acceptance. #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_EVIDENCE:[u64;32]=[0;32]; #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_PROCESS:[[u64;32];3]=[[0;32];3]; #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_SERVICE:[[u64;32];3]=[[0;32];3]; #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_TIMER:[[u64;48];3]=[[0;48];3]; #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_NETWORK:[[u64;64];3]=[[0;64];3]; #[unsafe(no_mangle)]static mut OS_K2100_REPEAT_EL0:[[u64;32];3]=[[0;32];3]; fn os_k2100_repeat(boot:&BootData,tables:&mmu::Tables,allocator:&mut memory::FrameAllocator)->Result<(),&'static str>{ let context=os_k940_registers();let baseline=allocator.os_authority().audit().map_err(|_|"k2100-repeat-before")?; let started=os_k960_counter();let mut counts=[0u64;6];let mut previous_table=0;let mut previous_end=started; for index in 0..3{ k2100_network::run(boot,tables,allocator)?; let p=unsafe{read_volatile(core::ptr::addr_of!(OS_K2100_PROCESS_EVIDENCE))}; let s=unsafe{read_volatile(core::ptr::addr_of!(OS_K2100_SERVICE_EVIDENCE))}; let t=unsafe{read_volatile(core::ptr::addr_of!(OS_K2100_TIMER_EVIDENCE))}; let n=unsafe{read_volatile(core::ptr::addr_of!(k2100_network::OS_K2100_NETWORK_EVIDENCE))}; let e=unsafe{read_volatile(core::ptr::addr_of!(OS_K2100_EL0_EVIDENCE))}; if p[0]!=2100||s[0]!=2100||t[0]!=2100||n[0]!=2100||e[0]!=2100 ||p[1]<=previous_table||p[3]>=p[4]||p[12..15]!=[1,1,2]||s[13]!=1||t[13]!=1 ||n[2]!=index as u64+1||n[7]<=previous_end||n[38]!=1||e[2]!=5 ||n[16]>=t[8]||t[39]>=p[19]||p[19]>=n[31]||n[31]>n[37] ||allocator.os_authority().audit().map_err(|_|"k2100-repeat-audit")?!=baseline ||os_k940_registers()!=context{return Err("k2100-repeat-transaction")} // Counts derive from the completed owners, not a timer/heartbeat loop. let done=[p[14]+s[13],s[8],s[10],t[13],s[9],n[38]]; for i in 0..6{counts[i]=counts[i].checked_add(done[i]).ok_or("k2100-repeat-count")?;} unsafe{ core::ptr::addr_of_mut!(OS_K2100_REPEAT_PROCESS).cast::<[u64;32]>().add(index).write(p); core::ptr::addr_of_mut!(OS_K2100_REPEAT_SERVICE).cast::<[u64;32]>().add(index).write(s); core::ptr::addr_of_mut!(OS_K2100_REPEAT_TIMER).cast::<[u64;48]>().add(index).write(t); core::ptr::addr_of_mut!(OS_K2100_REPEAT_NETWORK).cast::<[u64;64]>().add(index).write(n); core::ptr::addr_of_mut!(OS_K2100_REPEAT_EL0).cast::<[u64;32]>().add(index).write(e); } previous_table=p[1];previous_end=n[37]; } if counts!=[9,6,3,3,3,3]{return Err("k2100-repeat-total")} let mut evidence=[0;32];evidence[..8].copy_from_slice(&[2100,3,started,os_k960_counter(),baseline.live_pages,baseline.live_pages,3,0]); evidence[8..14].copy_from_slice(&counts); unsafe{core::ptr::addr_of_mut!(OS_K2100_REPEAT_EVIDENCE).write(evidence);} write_line("TURKOS/OS/K2100-REPEAT-COMPONENT: ROUNDS=3 RETIRED_PROCESSES=9 IPC=6 VFS=3 PPI30=3 SHELL=3 NETWORK=3");Ok(()) }