Skip to content

docs(zhihu): refresh part0b numbers; rewrite part4 to avoid overlap#4

Merged
willamhou merged 1 commit into
mainfrom
docs/refresh-zhihu-articles
May 27, 2026
Merged

docs(zhihu): refresh part0b numbers; rewrite part4 to avoid overlap#4
willamhou merged 1 commit into
mainfrom
docs/refresh-zhihu-articles

Conversation

@willamhou
Copy link
Copy Markdown
Owner

Why

Prepping the unpublished 知乎 articles for the upcoming daily publication wave:

  • part0b had three stale numbers from before the recent test-count update + CLAUDE.md compression
  • part4 ("Rust 裸机四大坑") had 75% content overlap with the later-written deep-dive articles part6 (NS bit) and part7 (SIMD trap + SMC barrier). Publishing it as-is would feel highly repetitive to readers who already read part6.

Changes

part0b-ai-workflow.md — small fixes

  • 33 → 34 test suites (matches today's make run output)
  • ~282 → ~457 assertions
  • CLAUDE.md description updated to note the recent compression to ~280 lines

part4-war-stories.md — full rewrite as "四大坑 · 收尾篇"

  • Drops 坑一 / 坑二 / 坑三 entirely (with explicit cross-links to part6/part7 explaining where to read each)
  • Develops 坑四 (SPMD per-CPU CPU_ON handshake) into a full standalone story
  • New framing: this is the closer of the "四大坑" arc — the one bug whose root cause is in TF-A's SPMD state machine and is not in any ARM spec. You only find it by reading TF-A source (spmd_cpu_on_finish_handler).
  • ~220 lines, same depth as other deep-dive parts

How to read

  • Compare docs/zhihu/part4-war-stories.md against the v0 history to see the new framing
  • docs/zhihu/part0b-ai-workflow.md diff is 3 lines

🤖 Generated with Claude Code

Two updates to the unpublished 知乎 articles, prepping for the next
daily publication wave.

part0b-ai-workflow.md — fix stale numbers:
- 33 → 34 test suites
- ~282 → ~457 assertions
- CLAUDE.md size: note the recent compression to ~280 lines

part4-war-stories.md — full rewrite to "四大坑 · 收尾篇":
The original "四大坑" article had 坑一 (SIMD), 坑二 (NS bit), 坑三 (跨核
buffer) all later superseded by deep-dive articles (part6 covers NS bit
in depth; part7 covers SIMD + SMC-barrier). Publishing the original
side-by-side with part6/part7 would feel ~75% repeated to readers.

The rewrite drops 坑一/二/三 (with explicit cross-links to part6/part7)
and develops 坑四 — SPMD per-CPU handshake, secondary CPU CPU_ON
hanging — into a full standalone story (~220 lines). New framing: this
is the closer of the "四大坑" arc, the one bug whose root cause is in
TF-A's SPMD state machine (not in any ARM spec) and you only find it
by reading TF-A source for `spmd_cpu_on_finish_handler`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53bc5c2e07

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

### 第一步:注册 secondary entry point

第一步,在 SPMC 初始化阶段注册 secondary CPU 的入口地址:
primary CPU 初始化完成后,调用 `FFA_SECONDARY_EP_REGISTER`(0x84000087)把 secondary entry 的物理地址告诉 SPMD:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the 64-bit FF-A secondary EP function ID

The implementation registers a 64-bit secondary entry address and defines FFA_SECONDARY_EP_REGISTER as 0xC4000087 in src/ffa/mod.rs:73; documenting it here as 0x84000087 names the 32-bit SMC ID. If a reader follows the article literally or substitutes this numeric value for the constant, SPMD receives the wrong FF-A call for a 64-bit EP registration and the secondary entry point is not registered.

Useful? React with 👍 / 👎.

@willamhou willamhou merged commit 54eb2e4 into main May 27, 2026
3 checks passed
@willamhou willamhou deleted the docs/refresh-zhihu-articles branch May 27, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant