Repository navigation
Conversation
|
The AMD bench's Linux microcode reading, owed by the orchestrator, is now on the evidence branch: amd-bench-linux-microcode.txt at
The command is recorded in the file's header. |
|
Design review of #886 at Size: Judged against the sources, no finding. I fetched Linux v7.2 and Xen
BLOCKER
NOTE
DESIGN NEEDS CHANGES: a CPU that reports revision 0xffffffff loads nothing and is refused by name on both makers, as Xen does; drop the guest assertion of the hypervisor line, and rewrite that exit in the branch's own issue; replace the host test of which half of MSR 8BH each maker reports with a revision constructor per maker. |
|
Design acceptance, by the orchestrator, with the review's named changes and NOTEs (#886 (comment)). This follows the owner's standing ruling: the manufacturers' documents and the published state of the art, Linux and Xen. The build is the body's design with these changes:
The hand-off with #873: #873 lands first and its |
…nything reads what an update changes `toyos-microcode` gains AMD's containers beside Intel's files (`amd`, as AMD's `amd_ucode_info.py` and Linux v7.2's `amd.c` read them: patches matched by the CPUID their Zen patch ID decodes to, chipset-specific patches and a nonzero minimum-revision word refused as unmodelled, a patch at or above the running revision loaded, an equal one again on every thread as Linux's early loader does), whether a CPU loads at all (`Maker::of` over `toyos_cpuvuln::Vendor`, `may_load` refusing a hypervisor and revision 0xffffffff by name, as Linux and Xen do), one revision constructor per maker's half of MSR 8BH, revisions as the unsigned dword Linux compares, and the two files the kernel embeds 16-byte aligned: Intel's 06-8c-01 and linux-firmware 20260916's microcode_amd_fam17h.bin. `arch::x86_64::microcode::load` runs on the BSP in `after_console`, right after `init_cr0` and before `random::key` and `control_regs::init`, and on each AP right after its `init_cr0`, as Intel's guidance asks. Intel's trigger takes the update data's address, AMD's the patch's, each an `asm!` of its own that reads memory; family 0x17 then drops the translation of the patch's first and last byte (Linux c809b0d0e52d). The load is read back, and every CPU that reads a revision must run the first CPU's. One line per CPU says what it found, what the file holds and what it runs. There is no runtime SHA-256 of an AMD patch, where Linux and Xen have one: their patch is a file the kernel did not ship, and these are inside the kernel image. A host test holds every patch in the embedded container to Linux v7.2's `amd_shas.c` (committed under tests/linux/, outside every shipped package), which records none above EntrySign's cutoff: that is the cutoff rule's build-time form. The licence gate gains `Terms::Firmware`, scoped to vendor firmware a device or CPU verifies by its maker's signature, the one place LicenseRef-Intel-Microcode and LicenseRef-AMD-ucode pass; every x86-64 ROOT carries both makers' licence texts under share/licenses/, as each asks. The `boot-actuators` arm `microcode-reseal` hands the BSP the T14's update with its header's revision raised to 0xbf and its checksum resealed, a const-built aligned static, so the read-back is shown to stop a boot on real Intel. The `microcode` metal row holds every CPU's line to Linux's reading of the same machine: the T14's cpuinfo, and the AMD bench's capture, committed under tests/metal/amd-linux/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Clippy's type_complexity refused the boxed closure it held per signature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
bc44b76 to
f126fb5
Compare
|
Ruling after the hung negative controls. The T14 Cause. The BSP loads in Ruling: a failed read-back is a refusal, not a panic. By the vendors' documentation, a microcode update the processor does not take leaves it running the revision it had. The CPU's own revision register (
Filed separately, not fixed here: on x86-64 a panic before |
…os-microcode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
…tes Linux or Xen Both negative-control arms of the microcode row hung their benches: the read-back's panic came inside after_console, before power::init_reset decodes the reset and, on the AMD bench, before any clock can time the panic's bound, so the panel was held until a power cycle. The ruling on #886 (comment 6131006022) makes a failed read-back a refusal: by the SDM (Vol. 3A §12.11.7.1, §12.11.7.2 Example 12-10) and AMD's PPR 55922 (MSR0000_008B), MSR 8BH after a load is the revision the CPU runs, so a CPU that does not take an update runs what it reads back. The loader now says `refused <update>` with that read-back as `running`, holds it to the machine's like any other, and the boot goes on; the metal judge reds any refused line. By the owner's clean-room ruling (#902), the judge is no longer held to a Linux reading of either bench but to the update each maker's embedded file holds for it, Linux's amd_shas.c and the AMD bench's Linux capture are deleted with the digest test that read them, and every Linux and Xen citation is replaced by Intel's or AMD's document or removed. The word at patch offset 12 is named as AMD's parser names it, mc_patch_data_checksum. A panic before the reset register is read holds the machine for good: filed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
…rocode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy
|
Round 2 on metal, at
The T14 reseal arm answers round 1's open question: the old hang was the panic hold, not a fault at the trigger, since with the refusal in place the boot completes. One thing to check in review: the judge rebuilt the reseal image from |
|
Review of #886 at Size.
The deletion this review names is under BLOCKER 4. Round 1's BLOCKERs (design review, comment 6126224559)
The ruling after the hung controls (comment 6131006022): built.
On metal, both negative controls now finish their boots and red the row. The T14 reseal arm reads The image-hash question: the verdict stands.
BLOCKER
NOTE
SEND BACK |
|
Ruling after round 2's review (#886 (comment)): #886 lands Intel's loader alone, and the AMD loader leaves this branch. Intel's half is built from the SDM, judged on the T14 (head green, both controls red, the reseal arm refused as ruled), and owes nothing. AMD's half owes a clean-room reader (BLOCKER 2), matching by the equivalence table (1), and undocumented behaviours stated with their measurements (3). Holding Intel's half for that work delays it for nothing. So:
|
Fix round 2. Head
e2b398cb6: the ruling after both negative-control arms hung their benches (ruling, points 1-4), the owner's clean-room ruling (#902: nothing here cites Linux or Xen, and no test's oracle for hardware is a reading captured under Linux), and a merge oforigin/mainat5096551ca(#888, #890, #876, #883, #891, #889, #898, #902, #897). It takes upissues/the-kernel-loads-no-cpu-microcode.md. A draft. Before it lands: the metal readings requested below; #873's landing and the hand-off to itsPCIDEverdict; the issue's deletion once those readings meet its exit; a review.This round's logs, patches and vendor excerpts are on
ToyOSOrg/evidencepr-886at8b6b8027; the build round's, where still cited, at4dab62b2. Authority is Intel's and AMD's documentation: Intel's SDM Vol. 3A (325384-093US) §12.11 and its Microcode Update Guidance; AMD's PPR for Family 17h Model 60h A1 (55922 rev 3.06, the AMD bench's Renoir), AMD's APM Vol. 3 (24594 rev 3.36) and AMD's own container parseramd_ucode_info.py.What this round changed
A CPU that does not take its update is a
refusedline, not a panic (ruling points 1, 3)Why. The BSP loads in
after_console, beforepower::init_resetdecodes the FADT's reset and, on the AMD bench, before any clock can time the panic's bound. The read-back's panic there held both benches until a power cycle.By the vendors. Intel judges a load by MSR 8BH read after it: equal to the update's revision is Success, anything else Fail (SDM §12.11.7.2, Example 12-10), and the register reports "the currently functioning revision" (§12.11.7.1). AMD's PPR has MSR0000_008B return "an identification number for the microcode patch that has been loaded" (excerpts). So a CPU that did not take an update runs what it reads back.
What the kernel does (
kernel/src/arch/x86_64/microcode.rs):verified's assert is gone.takenreads the revision back and answersOutcome::LoadedorOutcome::Refused { update, running }.refused <update>, and itsrunningis the read-back:microcode: cpu0 Intel signature 0x806c1 platform 7 found 0xbe refused 0xbf running 0xbe.agreetakes that read-back like any other revision.The judge reds a refused line on either bench, on a boot that completes (point 2)
microcode_linesrefuses the firstrefusedline on any machine: "cpu refused the update it was handed and runs ".microcode_on_metalis no longer held to Linux's reading of either bench (Another implementation's source is read only clean-room, and the tree names Linux only as a host platform or a libc interface #902). Each bench is held to the update its maker's embedded file holds for its signature: 0xbe in Intel's06-8c-01for the T14's 0x806c1, and 0x0860010d in the embedded container for the AMD bench's 0x860f01. Every CPU's outcome iscurrentorloaded, and every CPU runs that revision. The CPU's read-back is the oracle for what the hardware did, checked against the vendor's file.tests/checks.rs'smicrocode_verdictaccepts both benches and refuses nine machines by name, a refused T14 BSP and a refused AMD bench among them.The reseal admission's reason (point 4)
FLASHABLEadmitsmicrocode-resealbecause the payload is Intel's own, the revision the CPU already runs. So the CPU refuses it or runs what it ran, and the boot goes on and ends the way an unarmed one does. Nothing it writes outlives a hard reset (SDM §12.11.6.1). The panic's reset is no longer part of the reason.The T14's reset is a hard reset. Its FADT names
RESET_REGSystemIO 0xCF9, 8 bits, withRESET_VALUE0x06 (read off its table dump). Intel's 500 Series On-Package PCH datasheet, the T14's PCH, defines both outcomes of that write:SYS_RSTandRST_CPU. The datasheet callsSYS_RST= 1 "Hard Reset, not Soft Reset".RST_CPUgoing 0 to 1 withSYS_RSTset "will force PCI reset active".SYS_RST= 0 would be INIT#, which an update survives.CF9GRclear is a Host Reset Without Power Cycle:PLTRST#asserted, the processor reset. WithCF9GRset it is a Global Reset With Power Cycle.Either way the reset is a hard one in the SDM's terms, and Intel's guidance says "the microcode update is generally cleared by a warm reset" (excerpts).
Every Linux and Xen reference is gone (#902)
tests/linux/amd_shas.c, itsNOTICEsection and the digest test that read it. With it go h14 and thetoyos-sha2dev-dependency.NOTICE's "Nothing else in this repository is GPL" is true again and comes back.tests/metal/amd-linux/, the AMD bench's Linux capture.INVLPG;mc_patch_data_checksum, and refused when not 0:Refusal::DataChecksum, testa_patch_with_a_data_checksum_is_refused. Its old name called it a minimum revision, which only Xen's reading said.Revisioncompares the unsigned dword with no other OS cited.DISABLEDis "the highest revision, which no update loads over".NOTICEnames the AMD container's upstream repository by its URL, as provenance.The early-panic hold is filed
issues/a-panic-before-the-reset-register-is-read-holds-the-machine-for-good.md, owned by the orchestrator:power::init_resetholds the machine for good.clock::init, because the CPU states no counter frequency.test-early-panicboot on each bench resets itself and the next boot reports it.issues/a-fatal-event-stands-down-both-bounds-and-may-leave-nothing-to-end-the-machine.mdcovers only the later window.The issue's exit
issues/the-kernel-loads-no-cpu-microcode.md's exit no longer reads "at least as current as Linux's". It reads: the newest update the maker's embedded file holds, loaded early on every CPU, and a CPU that does not take one says so and runs what it reads back. Its metal arms are the ones below.The design as it stands
Unchanged from the build round except as above. Where each CPU loads:
arch::boot::after_console, right aftercontrol_regs::init_cr0(0);smp::ap_entry, right aftercontrol_regs::init_cr0.Both run before anything reads what an update changes (Intel's guidance), and
boot_apsserialises per core (SDM §12.11.6.3). A fault inside a trigger, before the IDT, reports nothing: that cost is ToyOS's own. Thet14-resealrerun tells a fault at the trigger apart from the panic hold, which this head no longer takes.Intel follows SDM §12.11:
IA32_PLATFORM_IDbits 52:50;WRMSR 79Hat the update data's 16-byte-aligned address (§12.11.6).AMD:
WRMSR C001_0020is written the patch header's address, and on family 0x17 that is followed byINVLPGof the patch's first and last byte.The licence gate's
Terms::Firmware,NOTICE, the ROOT licence texts and the files are as in the build round:06-8c-01efe83e31…,microcode_amd_fam17h.bin966e4b79…,LICENSE.amd-ucode2103bd99….Tests, cheapest tier first
Host. This round's mutations, each a checked patch, applied, run and reverted with the porcelain empty after each (run.sh, run.out, at
e2b398cb6):microcode_verdict("a T14 BSP that refused its update was refused for the wrong reason")microcode_verdict("a T14 CPU that loads nothing was accepted")microcode_verdict("a T14 CPU below Intel's update was accepted")a_patch_with_a_data_checksum_is_refusedThe build round's h01-h06 and h08-h13, h15 (run.out, at
f126fb514) guard code this round changed only in comments. h14 (the digest test) is gone withamd_shas.c. h16 and h17 judged the Linux-held judge, and j1-j3 replace them. The refusal itself is kernel code a CPU decides, so the metal arms below are its test.Guest. No guest test is added or changed. Every x86-64 guest takes the hypervisor arm, which this round does not change. The whole suite is green at this head (below).
Metal (staged; the request is below). Every arm should complete its boot and reset; none should hold a panel.
t14-reseal(m1), firstfound 0xbe refused 0xbf running 0xbe, the APscurrent 0xbe. A boot stopped with no record is a fault at the trigger.t14-headt14-reverted(m3)amd-trigger-removed(m2)refused 0x860010d running <firmware's>(0x8600106 last run)amd-headloaded 0x860010d; report eachfoundamd-reverted(m3)amd-no-invlpg(m4)amd-head's, never gatedChecks (root
CLAUDE.md)5096551ca, the base this head's gates ran on, booted on each bench (m3: every production path back toorigin/main, with the row kept).t14-resealandamd-trigger-removed, each a CPU that does not take its update on real silicon, must red the row on a completed boot;microcode_verdict: what the judge refuses;Gates at
e2b398cb6cargo run -- --ci hostbbac92034, before the judge's fixfoundnever read;is_multiple_of)cargo run -- --build-onlycargo run -- --build-only --arch aarch64cargo test, the whole guest suite, 62 of 62 (#897 cutnetstack_socket_churn), at a one-minute load average of 19.66 to 31.63--metal-readbackstagingsVerdict::Staged)Metal
The request orders the seven boots,
t14-resealfirst. It gives each image's sha256, the tree it was built from, itstoyos-metalinvocation, and what it should show. The AMD arms carry--host '<user>@<amd-bench>'. The script is stage.sh. Each mutation arm is a local commit on a detached head, never pushed.What I am unsure of
AMD documents no part of the loader. 55922 documents MSR0000_008B and not MSRC001_0020. Undocumented:
INVLPGafter a load;The code keeps the build round's behaviour on each, with no citation. The AMD bench's readings are its only check.
The patch-ID decode departs from AMD's parser, which names a patch's CPU through the equivalence table. On the embedded container the two agree for all seven patches (AMD's tool output in the design round's log), but a re-pin could part them.
amd_ucode_info.pyis AMD's code, cited as AMD's documentation of its format. Whether Another implementation's source is read only clean-room, and the tree names Linux only as a host platform or a libc interface #902's clean-room rule admits a vendor's own tool as documentation is the orchestrator's call.Intel revisions with the top bit set. The SDM calls the header's revision "a signed 32-bit number", and Intel's guidance pseudocode loads any negative
update_id.Revisioncompares unsigned, as acceptance 1 ruled. No pinned file carries one.0xffffffff has no meaning in either maker's documents. The refusal stands as accepted, by its own reason only.
Whether the reseal arm faults at the trigger rather than returning: the rerun says.
Size
git diff --shortstat origin/main...e2b398cb6: 24 files, +1568 −521.takenand oneOutcomearm.toyos-microcodeand the wiring are as in the build round, less the comments that cited Linux.tests/toyos.rs);microcode_verdictis +5;amd_shas.c(−556) and the Linux capture (−24) are deleted.🤖 Generated with Claude Code
https://claude.ai/code/session_015xhaydXCVRNscoccHYFUWy