瀏覽代碼

Fix J6 board power JTAG attestation

Codex 4 月之前
父節點
當前提交
61c688e029

+ 3 - 1
docs/j6-host-sensor-real-fan-ptc-debug921-runbook.zh-CN.md

@@ -25,11 +25,13 @@
 ## 执行顺序
 
 1. 先在包根目录打开 PowerShell,执行包内 `commands/collect-template.ps1`,或复制 `START-HERE.zh-CN.md` 首页中的 collector 命令。
-2. collector 打开 COM8/COM7 并开始等待后,再在 TD/ChipWatcher 中只执行 `PROGRAM_SRAM`,选择包内 `bitstreams/*.bit`。
+2. collector 打开 COM8/COM7 并开始等待后,确认 board power 已经接好,在 TD/ChipWatcher/BitWriter 中选择 JTAG speed 200k,只执行 `PROGRAM_SRAM`,选择包内短路径 bitstream。
 3. 等待 collector 自动完成 180 秒采集,把生成的 evidence 目录回传分析。
 
 固定顺序是 collector first, then PROGRAM_SRAM。
 
+不要求重新上电;之前 JTAG 无法识别的优先原因按现场结论修正为板子外部电源未接。若 BitWriter/AL-Link 看不到器件,第一检查 `board_power_present_before_program=true` 是否成立,其次检查 JTAG 线束、AL-Link 和 speed 设置。
+
 不要执行任何非易失存储写入、擦除或 固化存储相关动作。
 
 ## HostPort 命令

+ 4 - 4
docs/j6-temp-pwm-scope-manual-debug.zh-CN.md

@@ -128,17 +128,17 @@ FAN_PWM1..4 没有被当前三路串口占用,仍按新原理图真实引脚
 ## 5. 上电和刷 SRAM 步骤
 
 1. 确认 COM7 DebugPort、COM8 HostPort、BMC J6 UART 仍按当前 temp 接法连接。
-2. 给板子上电。
+2. 确认板子外部电源已经接好,JTAG/AL-Link 能看到器件。这里不要求重新上电;如果之前设备无法识别,优先检查是否漏接板子电源。
 3. 打开 BitWriter/TD/ChipWatcher。
 4. 选择 device `EF2L45`。
-5. 选择短路径 bitstream:
+5. 设置 JTAG speed 200k,然后选择短路径 bitstream:
 
 ```text
 C:\Users\Admin\Downloads\j6tmp-v2-tailfix-20260704-134319\j6tmp.bit
 ```
 
 6. 只执行 `PROGRAM_SRAM`。
-7. 如果 BitWriter 报 `Cannot open file`,先确认没有误选旧长包或 `bitstreams\...长文件名.bit`。
+7. 如果 BitWriter 报 `Cannot open file`,先确认没有误选旧长包或 `bitstreams\...长文件名.bit`;如果 JTAG device 不出现,先检查 board power,再检查 JTAG 线束、AL-Link 和 200k speed。
 
 ## 6. 手动打开 HostPort COM8
 
@@ -388,6 +388,7 @@ $port.Dispose()
 | 现象 | 更可能原因 | 处理 |
 |---|---|---|
 | BitWriter `Cannot open file` | 选了旧长路径 bitstream 或深目录长文件名 | 选包根目录 `j6tmp.bit` |
+| JTAG device 不出现 | 板子外部电源未接、JTAG 线束不稳、speed 太高 | 先确认 board power,再用 JTAG speed 200k |
 | COM8 打不开 | 串口工具/collector 占用了 COM8 | 关闭其它串口程序后重试 |
 | 命令无 ACK | HostPort TX/RX 接反、未刷入当前 SRAM、COM 号不对 | 确认 COM8、P7/P8 接线和 `READY` |
 | PTC03 在 T4 没波形 | temp 版本改脚,T4 是 BMC UART | 改测 P5 |
@@ -395,4 +396,3 @@ $port.Dispose()
 | PTC21 在 P10 没波形 | temp 版本改脚,P10 是 DebugPort RX | 改测 P15 |
 | PTC 波形过一会儿消失 | 5 秒 HostPort timeout fallback | 连续发命令或按 timeout 测试理解 |
 | FAN 过一会儿回 30% | 5 秒 HostPort timeout fallback | 这是预期行为 |
-

+ 6 - 2
schemas/real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json

@@ -12,10 +12,12 @@
     "pin_profile": { "$ref": "#/$defs/pin_profile" },
     "programming": {
       "type": "object",
-      "required": ["mode", "manual_programming", "bitstream"],
+      "required": ["mode", "manual_programming", "jtag_speed_hz", "board_power_present_before_program", "bitstream"],
       "properties": {
         "mode": { "const": "PROGRAM_SRAM" },
         "manual_programming": { "const": true },
+        "jtag_speed_hz": { "const": 200000 },
+        "board_power_present_before_program": { "const": true },
         "bitstream": { "$ref": "#/$defs/artifact" }
       }
     },
@@ -59,11 +61,13 @@
         },
         "manual_sram_programming": {
           "type": "object",
-          "required": ["status", "mode", "manual_programming", "attestation"],
+          "required": ["status", "mode", "manual_programming", "jtag_speed_hz", "board_power_present_before_program", "attestation"],
           "properties": {
             "status": { "type": "string" },
             "mode": { "const": "PROGRAM_SRAM" },
             "manual_programming": { "const": true },
+            "jtag_speed_hz": { "const": 200000 },
+            "board_power_present_before_program": { "const": true },
             "attestation": { "$ref": "#/$defs/artifact" }
           }
         },

+ 17 - 1
tools/package_j6_host_sensor_real_fan_ptc_debug921.ps1

@@ -217,6 +217,10 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\commands\collect-templ
 
 ## 3. collector 启动后手动刷 SRAM
 
+刷 SRAM 前先确认板子外部电源已经接好,BitWriter/TD GUI 能识别 JTAG 链。现场有效设置是 JTAG speed 200k + board power present + PROGRAM_SRAM。
+
+不要求重新上电;如果 JTAG/BitWriter 识别不到器件,第一检查项是板子电源是否接好,其次才是 JTAG 线束、AL-Link 和 speed 设置。
+
 collector 开始等待后,在 TD/ChipWatcher/BitWriter 中只执行 PROGRAM_SRAM,选择本包根目录下面这个短路径 bitstream:
 
 ~~~text
@@ -431,6 +435,8 @@ param(
     [string]$Profile = "temp-uart-ptc-remap",
     [string]$Bitstream = ".\j6tmp.bit",
     [string]$TdReceipt = ".\td.json",
+    [int]$JtagSpeedHz = 200000,
+    [object]$BoardPowerPresentBeforeProgram = $true,
     [switch]$SelfTest
 )
 
@@ -455,7 +461,9 @@ if ($SelfTest) {
         "-OutputDir", $OutputDir,
         "-Profile", $collectorProfile,
         "-Bitstream", $bitstreamPath,
-        "-TdReceipt", $tdReceiptPath
+        "-TdReceipt", $tdReceiptPath,
+        "-JtagSpeedHz", $JtagSpeedHz,
+        "-BoardPowerPresentBeforeProgram", $BoardPowerPresentBeforeProgram
     )
 }
 & "$PSHOME\powershell.exe" @argsList
@@ -710,6 +718,14 @@ $manifest = [ordered]@{
     diagnostic_scope = "host_sensor_real_fan_ptc_debug921"
     pin_profile = $Profile
     programming_mode = "PROGRAM_SRAM"
+    jtag_programming = [ordered]@{
+        program_mode = "PROGRAM_SRAM"
+        jtag_speed_hz = 200000
+        board_power_present_before_program = $true
+        tooling = "manual BitWriter/TD GUI"
+        cli_programming_supported = $false
+        cli_speed_mapping_proven = $false
+    }
     bitstream = [ordered]@{ path = $ShortBitName; sha256 = Get-Sha256 (Join-Path $stage $ShortBitName) }
     td_receipt = [ordered]@{ path = $ShortTdName; sha256 = Get-Sha256 (Join-Path $stage $ShortTdName) }
     short_path_aliases = [ordered]@{

+ 43 - 3
tools/remote/collect-j6-host-sensor-real-fan-ptc.ps1

@@ -19,6 +19,8 @@
     [string]$Profile = "temp-uart-ptc-remap",
     [string]$Operator = "",
     [object]$AssumeManualSramProgrammed = $true,
+    [int]$JtagSpeedHz = 200000,
+    [object]$BoardPowerPresentBeforeProgram = $true,
     [switch]$SelfTest,
     [string[]]$Commands = @(
         "SET PTC 01 10",
@@ -60,6 +62,14 @@ function Convert-ToBooleanParameter([object]$Value, [string]$Name) {
 }
 
 $assumeManualSramProgrammedBool = Convert-ToBooleanParameter $AssumeManualSramProgrammed "AssumeManualSramProgrammed"
+$boardPowerPresentBeforeProgramBool = Convert-ToBooleanParameter $BoardPowerPresentBeforeProgram "BoardPowerPresentBeforeProgram"
+
+if (-not $SelfTest -and $JtagSpeedHz -ne 200000) {
+    throw "JtagSpeedHz must be 200000 for this package"
+}
+if (-not $SelfTest -and -not $boardPowerPresentBeforeProgramBool) {
+    throw "BoardPowerPresentBeforeProgram must be true before manual PROGRAM_SRAM"
+}
 
 # Static operator contract: HostPort BaudRate = 115200, DebugBaud = 921600.
 # HostPort carries allowlisted 1-based real FAN/PTC control commands and SENS/DIMM/STAT/PWM/PID reports.
@@ -875,6 +885,8 @@ function Invoke-CollectorSelfTest {
     Write-Host "formal_ack=OK seq=00000001 cmd=PTCCH"
     Write-Host "stale_ack_isolated=pass"
     Write-Host "tail_drain=pass"
+    Write-Host "jtag_speed_hz=200000"
+    Write-Host "board_power_present_before_program=true"
     Write-Host "post_j6stat_tail_bytes=04"
     Write-Host "complete_unterminated_j6raw=pass"
     Write-Host "incomplete_final_line=J6RAW s=0004"
@@ -1266,10 +1278,13 @@ $manualSramArtifactPath = Join-Path $artifactDir "manual-sram-attestation.json"
     schema = "manual-sram-attestation-v1"
     status = if ($assumeManualSramProgrammedBool) { "pass" } else { "blocked_operator_assertion_missing" }
     mode = "PROGRAM_SRAM"
+    jtag_speed_hz = $JtagSpeedHz
+    board_power_present_before_program = $boardPowerPresentBeforeProgramBool
+    jtag_speed_source = "operator_selected_bitwriter_gui_200k"
     source = "operator_assertion_from_runbook"
     operator = $manualSramOperator
     programmed_at = $manualSramProgrammedAt
-    assertion = "Operator ran TD PROGRAM_SRAM manually before this collector command. Collector does not and cannot program or verify SRAM contents by itself."
+    assertion = "Operator confirmed external board power is connected, selected JTAG speed 200k in BitWriter/TD GUI, and ran TD PROGRAM_SRAM manually before this collector command. Collector does not and cannot program or verify SRAM contents by itself."
     bitstream_sha256 = $manualSramBitstreamSha256
     td_receipt_sha256 = $manualSramTdReceiptSha256
     collector_program_sram_attempted = $false
@@ -1305,6 +1320,15 @@ $manifest = [ordered]@{
     pin_profile_name = $Profile
     pin_profile = $pinMap
     status = $captureStatus
+    jtag_programming = [ordered]@{
+        program_mode = "PROGRAM_SRAM"
+        jtag_speed_hz = $JtagSpeedHz
+        board_power_present_before_program = $boardPowerPresentBeforeProgramBool
+        tooling = "manual BitWriter/TD GUI"
+        cli_programming_supported = $false
+        cli_speed_mapping_proven = $false
+        collector_program_sram_attempted = $false
+    }
     artifacts = [ordered]@{
         host_raw_bin = [ordered]@{ path = "host-port-raw.bin"; sha256 = $rawHash }
         host_transcript_text = [ordered]@{ path = "host-port-escaped.txt"; sha256 = $hostEscapedHash }
@@ -1336,7 +1360,15 @@ $manifest = [ordered]@{
 Write-JsonFile $manifest $manifestPath
 $manifestHash = Get-Sha256 $manifestPath
 
-$manualReady = ($assumeManualSramProgrammedBool -and $manualSramOperator -and $manualSramProgrammedAt -and $manualSramBitstreamSha256 -and $manualSramTdReceiptSha256)
+$manualReady = (
+    $assumeManualSramProgrammedBool -and
+    $boardPowerPresentBeforeProgramBool -and
+    ($JtagSpeedHz -eq 200000) -and
+    $manualSramOperator -and
+    $manualSramProgrammedAt -and
+    $manualSramBitstreamSha256 -and
+    $manualSramTdReceiptSha256
+)
 $receiptStatus = if ($captureStatus -ne "pass") {
     $captureStatus
 } elseif (-not $bitstreamPath) {
@@ -1356,7 +1388,13 @@ $receipt = [ordered]@{
     diagnostic_scope = "host_sensor_real_fan_ptc_debug921"
     pin_profile_name = $Profile
     pin_profile = $pinMap
-    programming = [ordered]@{ mode = "PROGRAM_SRAM"; manual_programming = $true; bitstream = $bitstreamRef }
+    programming = [ordered]@{
+        mode = "PROGRAM_SRAM"
+        manual_programming = $true
+        jtag_speed_hz = $JtagSpeedHz
+        board_power_present_before_program = $boardPowerPresentBeforeProgramBool
+        bitstream = $bitstreamRef
+    }
     collector = [ordered]@{
         host_port = $HostPort
         debug_port = $DebugPort
@@ -1380,6 +1418,8 @@ $receipt = [ordered]@{
             operator = $manualSramOperator
             mode = "PROGRAM_SRAM"
             manual_programming = $true
+            jtag_speed_hz = $JtagSpeedHz
+            board_power_present_before_program = $boardPowerPresentBeforeProgramBool
             programmed_at = $manualSramProgrammedAt
             attestation = $manualSramRef
         }

+ 287 - 47
tools/uart_receipts.py

@@ -65,13 +65,50 @@ OFFLINE_FIDELITY_FORBIDDEN_ACTION_MARKERS = [
     "PROGRAM_DEVICE",
     "READ_DEVICE_ID",
 ]
-UART_SCHEMAS = {
-    "uart-preflight-receipt-v1": "uart-preflight-validation-v1",
-    "bmc-uart-protocol-receipt-v1": "bmc-uart-protocol-validation-v1",
-    "uart-loopback-receipt-v1": "uart-loopback-validation-v1",
-    "uart-board-sram-receipt-v1": "uart-board-sram-validation-v1",
-    "uart-soak-receipt-v1": "uart-soak-validation-v1",
-}
+UART_SCHEMAS = {
+    "uart-preflight-receipt-v1": "uart-preflight-validation-v1",
+    "bmc-uart-protocol-receipt-v1": "bmc-uart-protocol-validation-v1",
+    "changxin-temp-uart-publisher-receipt-v1": "changxin-temp-uart-publisher-validation-v1",
+    "changxin-temp-uart-tty0tty-receipt-v1": "changxin-temp-uart-tty0tty-validation-v1",
+    "uart-loopback-receipt-v1": "uart-loopback-validation-v1",
+    "uart-board-sram-receipt-v1": "uart-board-sram-validation-v1",
+    "uart-soak-receipt-v1": "uart-soak-validation-v1",
+    "j6-binary921-evidence-manifest-v1": "j6-binary921-evidence-validation-v1",
+}
+BINARY921_ALLOWED_PROFILES = {
+    "debug-photo-bmc-replay-binary921",
+    "formal-uart1-bmc-replay-binary921",
+}
+BINARY921_REQUIRED_SAFETY_FALSE_FIELDS = [
+    "flash_attempted",
+    "driver_install_attempted",
+    "programs_nonvolatile",
+    "enumerates_com_ports",
+    "debug_port_writes_to_serial",
+]
+BINARY921_FORBIDDEN_ACTION_MARKERS = [
+    "PROGRAM_FLASH",
+    "ERASE_FLASH",
+    "PROGRAM_SPIBIN",
+    "DIRECT_FLASH_WRITE",
+    "DRIVER_INSTALL",
+    "DRIVER_REINSTALL",
+]
+CHANGXIN_TEMP_UART_REQUIRED_SAFETY_FALSE_FIELDS = [
+    "flash_attempted",
+    "programs_flash",
+    "programs_nonvolatile",
+    "driver_install_attempted",
+    "real_ptc_fan_action_attempted",
+    "uncontrolled_real_bmc_action_attempted",
+    "thermal_performance_claimed",
+    "cpld_bitstream_generated",
+    "program_sram_attempted",
+    "ipmi_lan_attempted",
+    "network_bmc_attempted",
+    "opens_unknown_serial_ports",
+    "toggles_dtr_rts",
+]
 FINAL_GATE_REQUIRED_LAYERS = [
     "static",
     "model",
@@ -840,19 +877,192 @@ def _validate_offline_layer_evidence(layer: str, item: dict[str, Any]) -> list[s
     return failures
 
 
-def _validate_safety(receipt: dict[str, Any]) -> list[str]:
-    failures: list[str] = []
-    safety = receipt.get("safety") or {}
-    for field in ["flash_attempted", "real_ptc_fan_bmc_action_attempted", "driver_install_attempted"]:
-        if safety.get(field) is not False:
-            failures.append(f"safety_flag:{field}")
-    if _contains_forbidden_action(receipt):
-        failures.append("forbidden_action_marker")
-    return failures
-
-
-
-def _validate_real_bmc_artifact(
+def _validate_safety(receipt: dict[str, Any]) -> list[str]:
+    failures: list[str] = []
+    safety = receipt.get("safety") or {}
+    for field in [
+        "flash_attempted",
+        "real_ptc_fan_bmc_action_attempted",
+        "driver_install_attempted",
+        "programs_flash",
+        "programs_nonvolatile",
+    ]:
+        if field not in safety:
+            continue
+        if safety.get(field) is not False:
+            failures.append(f"safety_flag:{field}")
+    if _contains_forbidden_action(receipt):
+        failures.append("forbidden_action_marker")
+    return failures
+
+
+def _validate_changxin_temp_uart_receipt(receipt: dict[str, Any], *, strict: bool) -> list[str]:
+    failures: list[str] = []
+    if receipt.get("status") != "pass":
+        failures.append(f"changxin_status_not_pass:{receipt.get('status')}")
+    config = receipt.get("config") or {}
+    if strict and not re.fullmatch(r"[0-9a-f]{64}", str(config.get("toml_sha256") or "")):
+        failures.append("changxin_missing_config_hash")
+    bmc = receipt.get("bmc") or {}
+    if bmc.get("method") != "serial_tty":
+        failures.append("changxin_bmc_method_not_serial_tty")
+    if bmc.get("device") != "/dev/ttyUSB1":
+        failures.append("changxin_bmc_device_not_ttyusb1")
+    if int(bmc.get("baudrate") or 0) != 115200:
+        failures.append("changxin_bmc_baudrate_not_115200")
+    for field in ["host", "username", "password", "interface", "lanplus"]:
+        if field in bmc:
+            failures.append(f"changxin_legacy_bmc_network_key:{field}")
+    if str(bmc.get("raw_command") or "") not in set(map(str, bmc.get("readonly_whitelist") or [])):
+        failures.append("changxin_raw_command_not_allowlisted")
+    mapping = receipt.get("mapping") or {}
+    if mapping.get("source_groups") != 24:
+        failures.append("changxin_source_groups_not_24")
+    if mapping.get("destination_groups") != 32:
+        failures.append("changxin_destination_groups_not_32")
+    if mapping.get("invalid_fill_groups") != "25-32":
+        failures.append("changxin_invalid_fill_groups_not_25_32")
+    table = mapping.get("table") or []
+    if strict and len(table) != 32:
+        failures.append("changxin_mapping_table_not_32")
+    frame = receipt.get("frame") or {}
+    if frame.get("logical_length_bytes") != 66:
+        failures.append("changxin_frame_length_not_66")
+    checksum = frame.get("checksum") or {}
+    if checksum.get("algorithm") != "ones_complement_sum_first_49_bytes":
+        failures.append("changxin_checksum_algorithm")
+    if checksum.get("protected_length_bytes") != 49:
+        failures.append("changxin_checksum_protected_length_not_49")
+    if strict and not all(checksum.get("results") or []):
+        failures.append("changxin_checksum_result_not_pass")
+    if strict and not checksum.get("protocol_risk"):
+        failures.append("changxin_missing_protocol_risk")
+    serial = receipt.get("serial") or {}
+    if serial.get("virtual_serial") not in {"pty_socat", "pty_python", "tty0tty"}:
+        failures.append("changxin_virtual_serial_backend")
+    if serial.get("output_format") not in {"ascii_hex_space_lf", "ascii_hex_space_crlf", "binary_66_bytes"}:
+        failures.append("changxin_output_format")
+    required_hash = "wire_transcript_sha256" if serial.get("output_format") == "binary_66_bytes" else "ascii_transcript_sha256"
+    for field in ["pty_path", required_hash, "consumer_transcript_sha256"]:
+        if strict and not serial.get(field):
+            failures.append(f"changxin_missing_serial_{field}")
+    timing = receipt.get("timing") or {}
+    publish_interval = timing.get("publish_interval") or {}
+    for field in ["avg_sec", "p95_sec", "p99_sec", "max_sec"]:
+        if strict and field not in publish_interval:
+            failures.append(f"changxin_missing_timing_{field}")
+    errors = receipt.get("errors") or {}
+    for field in ["timeout", "stale", "parse_error", "missing"]:
+        if field not in errors:
+            failures.append(f"changxin_missing_error_count:{field}")
+    safety = receipt.get("safety") or {}
+    for field in CHANGXIN_TEMP_UART_REQUIRED_SAFETY_FALSE_FIELDS:
+        if safety.get(field) is not False:
+            failures.append(f"safety_flag:{field}")
+    authority = str(receipt.get("authority_boundary") or "").lower()
+    if "thermal performance" not in authority or "does not prove" not in authority:
+        failures.append("changxin_authority_boundary_missing_thermal_exclusion")
+    return failures
+
+
+def _validate_binary921_evidence_manifest(receipt: dict[str, Any], *, strict: bool) -> list[str]:
+    failures: list[str] = []
+    if receipt.get("status") != "pass":
+        failures.append(f"binary921_status_not_pass:{receipt.get('status')}")
+    if receipt.get("protocol") != "binary921":
+        failures.append("binary921_protocol_not_binary921")
+    if receipt.get("profile") not in BINARY921_ALLOWED_PROFILES:
+        failures.append("binary921_profile_not_allowed")
+    if receipt.get("bmc_source") != "pc_replay_from_real_bmc_capture":
+        failures.append("binary921_bmc_source_not_pc_replay")
+    if receipt.get("live_bmc_link_status") != "not_used":
+        failures.append("binary921_live_bmc_link_status_must_be_not_used")
+    if receipt.get("real_fan_ptc_hardware_status") != "not_run":
+        failures.append("binary921_real_fan_ptc_hardware_status_must_be_not_run")
+    if receipt.get("host_command_count") != 12:
+        failures.append("binary921_host_command_count_not_12")
+    if receipt.get("host_ack_count") != 12:
+        failures.append("binary921_host_ack_count_not_12")
+    if receipt.get("host_ack_matched_count") != 12:
+        failures.append("binary921_host_ack_matched_count_not_12")
+    try:
+        debug_frame_count = int(receipt.get("debug_frame_count") or 0)
+    except (TypeError, ValueError):
+        debug_frame_count = 0
+    if debug_frame_count <= 0:
+        failures.append("binary921_debug_frame_count_not_positive")
+    try:
+        bmc_payload_frame_count = int(receipt.get("bmc_payload_frame_count") or 0)
+    except (TypeError, ValueError):
+        bmc_payload_frame_count = 0
+    if bmc_payload_frame_count <= 0:
+        failures.append("binary921_bmc_payload_frame_missing")
+    try:
+        sensor_cache_frame_count = int(receipt.get("sensor_cache_frame_count") or 0)
+    except (TypeError, ValueError):
+        sensor_cache_frame_count = 0
+    if sensor_cache_frame_count <= 0:
+        failures.append("binary921_sensor_cache_frame_missing")
+    bmc_replay = receipt.get("bmc_replay") or {}
+    if not isinstance(bmc_replay, dict) or bmc_replay.get("status") != "pass":
+        failures.append("binary921_bmc_replay_not_pass")
+    else:
+        if bmc_replay.get("bmc_source") != "pc_replay_from_real_bmc_capture":
+            failures.append("binary921_bmc_replay_source_not_pc_replay")
+        if bmc_replay.get("byte_count") != 48:
+            failures.append("binary921_bmc_replay_byte_count_not_48")
+
+    safety = receipt.get("safety") or {}
+    if not isinstance(safety, dict):
+        failures.append("binary921_safety_not_object")
+        safety = {}
+    for field in BINARY921_REQUIRED_SAFETY_FALSE_FIELDS:
+        if safety.get(field) is not False:
+            failures.append(f"binary921_safety_flag:{field}")
+    for marker in _forbidden_action_markers(receipt, BINARY921_FORBIDDEN_ACTION_MARKERS):
+        failures.append(f"binary921_forbidden_action_marker:{marker}")
+
+    startup_ready = receipt.get("startup_ready") or {}
+    decoded = startup_ready.get("decoded") if isinstance(startup_ready, dict) else None
+    frame_type = startup_ready.get("frame_type") if isinstance(startup_ready, dict) else None
+    if strict and not (
+        isinstance(decoded, dict)
+        and decoded.get("kind") == "ready"
+        and int(frame_type if frame_type is not None else -1) == 1
+    ):
+        failures.append("binary921_startup_ready_missing")
+    return failures
+
+
+def _validate_changxin_temp_uart_tty0tty_receipt(receipt: dict[str, Any], *, strict: bool) -> list[str]:
+    failures: list[str] = []
+    if receipt.get("status") != "pass":
+        failures.append(f"tty0tty_status_not_pass:{receipt.get('status')}")
+    if receipt.get("operation") not in {"doctor", "setup", "teardown"}:
+        failures.append("tty0tty_operation")
+    failures.extend(_validate_json_schema_file(receipt, "changxin_temp_uart_tty0tty_receipt.schema.json", required=strict))
+    safety = receipt.get("safety") or {}
+    for field in [
+        "flash_attempted",
+        "program_sram_attempted",
+        "programs_flash",
+        "programs_nonvolatile",
+        "real_ptc_fan_action_attempted",
+        "thermal_performance_claimed",
+        "auto_setup_from_run_attempted",
+    ]:
+        if safety.get(field) is not False:
+            failures.append(f"safety_flag:{field}")
+    if strict and not receipt.get("rollback"):
+        failures.append("tty0tty_missing_rollback")
+    authority = str(receipt.get("authority_boundary") or "").lower()
+    if "thermal performance" not in authority or "does not prove" not in authority:
+        failures.append("tty0tty_authority_boundary_missing_thermal_exclusion")
+    return failures
+
+
+
+def _validate_real_bmc_artifact(
     receipt_path: Path | None,
     layer: dict[str, Any],
     key: str,
@@ -2002,11 +2212,15 @@ def _validate_host_sensor_debug921_common(
     )
 
     programming = payload.get("programming") if isinstance(payload.get("programming"), dict) else {}
-    if programming.get("mode") != "PROGRAM_SRAM":
-        failures.append("programming_not_sram")
-    if programming.get("manual_programming") is not True:
-        failures.append("manual_programming_not_true")
-    bitstream_result = _hash_validation_with_optional_receipt_path(receipt_path, programming.get("bitstream"), required=True)
+    if programming.get("mode") != "PROGRAM_SRAM":
+        failures.append("programming_not_sram")
+    if programming.get("manual_programming") is not True:
+        failures.append("manual_programming_not_true")
+    if _safe_int(programming.get("jtag_speed_hz"), default=0) != 200000:
+        failures.append("jtag_speed_hz_not_200000")
+    if programming.get("board_power_present_before_program") is not True:
+        failures.append("board_power_present_before_program_not_true")
+    bitstream_result = _hash_validation_with_optional_receipt_path(receipt_path, programming.get("bitstream"), required=True)
     if bitstream_result["status"] == "missing":
         failures.append("bitstream_missing")
     elif bitstream_result["status"] == "hash_mismatch":
@@ -2098,11 +2312,15 @@ def _validate_host_sensor_debug921_common(
             elif bitstream_sha256 and td_bitstream_sha256.lower() != bitstream_sha256.lower():
                 failures.append("td_bitstream_hash_mismatch")
 
-    if manual_layer.get("mode") != "PROGRAM_SRAM":
-        failures.append("manual_sram_mode_not_program_sram")
-    if manual_layer.get("manual_programming") is not True:
-        failures.append("manual_sram_manual_programming_not_true")
-    attestation_result, current_failures = _validate_real_bmc_artifact(receipt_path, manual_layer, "attestation", "manual_sram_attestation")
+    if manual_layer.get("mode") != "PROGRAM_SRAM":
+        failures.append("manual_sram_mode_not_program_sram")
+    if manual_layer.get("manual_programming") is not True:
+        failures.append("manual_sram_manual_programming_not_true")
+    if _safe_int(manual_layer.get("jtag_speed_hz"), default=0) != 200000:
+        failures.append("manual_sram_jtag_speed_hz_not_200000")
+    if manual_layer.get("board_power_present_before_program") is not True:
+        failures.append("manual_sram_board_power_present_before_program_not_true")
+    attestation_result, current_failures = _validate_real_bmc_artifact(receipt_path, manual_layer, "attestation", "manual_sram_attestation")
     failures.extend(current_failures)
     attestation_sha256 = _artifact_hash_from_result(attestation_result)
     if isinstance(attestation_result, dict) and attestation_result.get("exists"):
@@ -2114,10 +2332,14 @@ def _validate_host_sensor_debug921_common(
         if isinstance(attestation_payload, dict):
             if str(attestation_payload.get("status") or "missing") != "pass":
                 failures.append(f"manual_sram_attestation_not_pass:{attestation_payload.get('status', 'missing')}")
-            if attestation_payload.get("mode") != "PROGRAM_SRAM":
-                failures.append("manual_sram_attestation_wrong_mode")
-            if bitstream_sha256 and str(attestation_payload.get("bitstream_sha256") or "").lower() != bitstream_sha256.lower():
-                failures.append("manual_sram_attestation_bitstream_hash_mismatch")
+            if attestation_payload.get("mode") != "PROGRAM_SRAM":
+                failures.append("manual_sram_attestation_wrong_mode")
+            if _safe_int(attestation_payload.get("jtag_speed_hz"), default=0) != 200000:
+                failures.append("manual_sram_attestation_jtag_speed_hz_not_200000")
+            if attestation_payload.get("board_power_present_before_program") is not True:
+                failures.append("manual_sram_attestation_board_power_present_before_program_not_true")
+            if bitstream_sha256 and str(attestation_payload.get("bitstream_sha256") or "").lower() != bitstream_sha256.lower():
+                failures.append("manual_sram_attestation_bitstream_hash_mismatch")
             if td_sha256 and str(attestation_payload.get("td_receipt_sha256") or "").lower() != td_sha256.lower():
                 failures.append("manual_sram_attestation_td_receipt_hash_mismatch")
 
@@ -2639,10 +2861,18 @@ def _validate_host_sensor_debug921_common(
         if ("pid closed-loop pass" in authority or "real pid closed-loop pass" in authority) and not negated_authority:
             failures.append("authority_overclaim_pid_closed_loop")
 
-    failure_set = set(failures)
-    joined = "\n".join(failure_set)
-    if (
-        "programming_not_sram" in failure_set
+    failure_set = set(failures)
+    joined = "\n".join(failure_set)
+    jtag_attestation_failures = {
+        "jtag_speed_hz_not_200000",
+        "board_power_present_before_program_not_true",
+        "manual_sram_jtag_speed_hz_not_200000",
+        "manual_sram_board_power_present_before_program_not_true",
+        "manual_sram_attestation_jtag_speed_hz_not_200000",
+        "manual_sram_attestation_board_power_present_before_program_not_true",
+    }
+    if (
+        "programming_not_sram" in failure_set
         or "collector_debug_port_writes_to_serial" in failure_set
         or "host_transcript_debug_port_writes_to_serial" in failure_set
         or "manifest_debug_port_writes_to_serial" in failure_set
@@ -2658,6 +2888,8 @@ def _validate_host_sensor_debug921_common(
         or any(item.startswith("safety_flag:") for item in failure_set)
     ):
         final_status = "fail_forbidden_action"
+    elif failure_set.intersection(jtag_attestation_failures):
+        final_status = "fail"
     elif "blocked_host_epoch_mixed" in failure_set:
         final_status = "blocked_host_epoch_mixed"
     elif (
@@ -3154,13 +3386,21 @@ def validate_uart_receipt(receipt_path: Path | str, *, strict: bool = False) ->
     path = Path(receipt_path)
     receipt = read_json(path)
     schema = str(receipt.get("schema") or "")
-    failures: list[str] = []
-    warnings: list[str] = []
-
-    if schema not in UART_SCHEMAS:
-        failures.append("fail_schema")
-    safety_failures = _validate_safety(receipt)
-    failures.extend(safety_failures)
+    failures: list[str] = []
+    warnings: list[str] = []
+
+    if schema not in UART_SCHEMAS:
+        failures.append("fail_schema")
+    if schema == "j6-binary921-evidence-manifest-v1":
+        safety_failures = []
+        failures.extend(_validate_binary921_evidence_manifest(receipt, strict=strict))
+    else:
+        safety_failures = _validate_safety(receipt)
+    failures.extend(safety_failures)
+    if schema == "changxin-temp-uart-publisher-receipt-v1":
+        failures.extend(_validate_changxin_temp_uart_receipt(receipt, strict=strict))
+    if schema == "changxin-temp-uart-tty0tty-receipt-v1":
+        failures.extend(_validate_changxin_temp_uart_tty0tty_receipt(receipt, strict=strict))
 
     status_value = _extract_status(receipt)
     validation_schema = _schema_status(receipt)
@@ -3228,8 +3468,8 @@ def validate_uart_receipt(receipt_path: Path | str, *, strict: bool = False) ->
                 if nested["status"] != "pass":
                     failures.append(f"fail_soak_round_receipt:{round_index}:{nested['status']}")
 
-    if "forbidden_action_marker" in safety_failures or "safety_flag:flash_attempted" in safety_failures:
-        final_status = "fail_forbidden_action"
+    if "forbidden_action_marker" in safety_failures or any(item.startswith("safety_flag:") for item in failures):
+        final_status = "fail_forbidden_action"
     elif status_value.startswith("blocked_"):
         final_status = status_value
     elif status_value.startswith("fail_"):