ARMv8 開機鏈三部曲(一):Trusted Firmware-A — 從 BL1 到 EL3 Runtime
從 Exception Level、BL1/BL2/BL31 分工、FIP 與 Trusted Board Boot,一路讀到 BL31 的 SMC 分派、PSCI、OP-TEE Dispatcher 與 world switch,並用 OP-TEE 的 QEMU v8 環境觀察 TF-A 開機 log。
從 Exception Level、BL1/BL2/BL31 分工、FIP 與 Trusted Board Boot,一路讀到 BL31 的 SMC 分派、PSCI、OP-TEE Dispatcher 與 world switch,並用 OP-TEE 的 QEMU v8 環境觀察 TF-A 開機 log。
以 ARMv8 開機鏈為主軸,拆解 U-Boot 作為 BL33 的角色:TPL/SPL/U-Boot proper、board_init_f/relocation/board_init_r、Driver Model、Standard Boot、FIT verified boot、arm64 Linux 開機協定、與 OP-TEE/AVB 的互動,並附 QEMU 實作與面試 Q&A。
從 BL32 的角度拆解 OP-TEE:TrustZone 基礎、optee_os / tee-supplicant / Linux TEE driver 的分工、GlobalPlatform API、TA 的種類與載入、SMC 與 RPC 呼叫流程、foreign interrupt 處理,以及用 QEMU v8 跑 xtest 與 hello_world。
用 GDB 實測 arm64 SPL 在 relocation 之前的執行環境:gd 為什麼綁 x18、malloc_limit 在 board_init_f 為什麼是 0、BSS 清零的真正時機(下毒驗證)、gd 搬家為什麼要修 DM 的環狀 list,以及 fdtgrep 用 bootph-* 把 DTB 砍掉 10 倍的實際數字。最後記錄把 ZynqMP 的 SPL-as-BL2 搬到 QEMU 時撞到的硬體依賴牆。
不用 OP-TEE build repo,而是分別從原始碼 build TF-A、OP-TEE OS、optee_client、optee_test 和 kernel,拼成 BL1→BL2→BL31→BL32→BL33 五段開機鏈並跑完 xtest。記錄只有自己動手才會遇到的九個坑:QEMU -S 被探測連線破壞、secure UART 看不到輸出、U-Boot 搬不動大 kernel、initramfs 沒有 /dev/console、cross-compile xtest 的 header 與 linker 問題。
coreboot、depthcharge、TF-A、Hafnium、EDK2 哪些真的出現在 ARM server 開機流程裡?用公開原始碼、upstream commit 與 OpenBMC 下游樹,把 NVIDIA Grace 的完整開機鏈重建出來。