WarmGrayMatteInkMistClaySage
RELIEF · PLATFORM

The board, and the stack standing on it板子,和站在它上面的那一摞

Four diagrams about the platform rather than the die. Each one is built from the same two words as every other page here — raised for a thing that exists, sunken for somewhere you cannot go or something that holds others — which is why none of them needs a legend.四张讲平台而不是讲裸片的图。每一张都只用这套页面一贯的两个词搭出来 —— 凸起是一个存在的东西,凹陷是去不了的地方、或者装着别人的容器 —— 所以它们都不需要图例。

A · Boot chainA · 启动链

Stages are grouped by which memory they execute from, and the group is the sunken band — so the diagram answers "where is this code actually running" without a separate column. The orange ring marks a stage that verifies the next one: that ring is the chain of trust, and the first stage without it is where the chain ends.阶段按在哪块内存里执行分组,组就是那条凹带 —— 这样图本身就回答了「这段代码到底跑在哪」,不用另开一列。橙色圈标的是会验下一级签名的阶段:那一圈就是信任链,第一个没有圈的地方就是链断掉的位置。

QUARTZ-3550 · BOOT CHAINQUARTZ-3550 · 启动链the band a stage sits in tells you what a hang there means: no UART output at all usually means it never left SRAM一个阶段在哪条带里,决定了卡在那儿意味着什么:完全没有串口输出,通常是根本没离开 SRAM
Runs from on-chip SRAM跑在片上 SRAM 里DDR is not trained yetDDR 还没训练好
BootROMmask ROM · verifies the next stage掩膜固化 · 验下一级的签名
SPLtrains DDR, loads ATF训练 DDR,加载 ATF
Runs from DDR跑在 DDR 里memory is up from here on从这里开始内存可用
ATF BL31resident · secure monitor常驻 · 安全监视
OP-TEEoptional · secure world可选 · 安全世界
U-Bootpicks the A/B slot, verifies boot.img选 A/B 槽,验 boot.img
Linux
Android init

B · Partition layoutB · 分区表

Same vocabulary as the memory map, different medium. What you must not move is drawn sunken — the bootloader partition is at a fixed offset because the mask ROM looks for it there, so resizing it does not fail at build time, it fails at power-on. The A/B pair is shown as a pair on purpose: touching one without the other is the mistake this diagram exists to prevent.和内存布局同一套说法,换了个介质。不能动的画成凹陷 —— bootloader 分区在固定偏移,因为掩膜 ROM 就去那个位置找它,所以改它的大小不会在编译时报错,会在上电时报错。A/B 两个成对画也是有意的:只改一个不改另一个,正是这张图要防的事。

GPT LAYOUT · A/B SLOTSGPT 布局 · A/B 双槽changing any size here breaks OTA from every older build — partitions are a one-shot decision这里任何一个尺寸改了,从所有旧版本过来的 OTA 都会挂 —— 分区是一次性决定
#0
bootloaderSPL + U-Boot · never resizeSPL + U-Boot · 不能改大小
2 MB
#1
miscthe A/B slot flag lives hereA/B 槽的选择标志在这
1 MB
#2
boot_akernel + ramdisk, slot A内核 + ramdisk,A 槽
32 MB
#3
boot_bkernel + ramdisk, slot B内核 + ramdisk,B 槽
32 MB
#4
vbmeta_athe signature that covers boot_a保护 boot_a 的那份签名
512 KB
#5
vbmeta_bthe signature that covers boot_b保护 boot_b 的那份签名
512 KB
#6
superdynamic partitions live inside动态分区都在这里面
4 GB
#7
userdatagrows into whatever is left剩下多少占多少
rest

C · Interrupt pathC · 中断路径

One interrupt has two numbers, and confusing them costs an afternoon. The number in the SoC manual is the GIC input line; the number request_irq() wants is allocated at runtime and is not stable across boots. The groove between them is the translation, which is the whole point of the figure.一个中断有两个编号,搞混它们要花掉一个下午。芯片手册上的那个是 GIC 的输入线号;request_irq() 要的那个是运行时分配的,重启不保证一样。中间那道凹槽就是这次翻译,也是这张图存在的全部理由。

ONE INTERRUPT, TWO NUMBERS一个中断,两个编号cat /proc/interrupts prints the virq — matching it against the manual will not workcat /proc/interrupts 打出来的是 virq —— 拿它去对手册是对不上的
hwirq 42what the SoC manual calls it — the GIC input line芯片手册上的叫法 —— GIC 的输入线号
irq_domain maps itirq_domain 做映射
→
virq 78what request_irq() takes — allocated at runtime, not stable across bootsrequest_irq() 收的是这个 —— 运行时分配,重启不保证一样
Device外设pulls the line拉低中断线
GIChwirq 42
irq_domainmaps 42 → 78把 42 映射成 78
CPUCPUtakes the exception进异常
Your handler你的处理函数virq 78

D · Pin multiplexingD · 引脚复用

A pad has several possible functions and exactly one is connected — which is a segmented control, so it is drawn as one. The third row is outlined in the warning colour because two device-tree nodes both claim that pad: the kernel will not always refuse, and the symptom is a peripheral that works until the other driver probes.一个焊盘有好几种可能的功能,同时只有一路接得通 —— 这就是个分段控件,所以直接画成分段控件。第三行描了警示色,因为有两个设备树节点都声称占用这个焊盘:内核不一定会拒绝,症状是某个外设一直好用,直到另一个驱动 probe 起来。

PAD FUNCTION SELECT焊盘功能选择the selected segment is the only path that conducts选中的那一段是唯一接得通的路
GPIO2_A3SPI0_CLK
func0 SPI0_CLKfunc1 I2C3_SCLfunc2 PWM1gpio
GPIO2_A4I2C3_SDA
func0 SPI0_MOSIfunc1 I2C3_SDAfunc2 UART4_TXgpio
GPIO4_B2TP_RST
func0 CIF_D7func1 UART7_RXgpio

E · Power domainsE · 电源域

Domains nest, and nesting is drawn as containment rather than as lines — a well inside a well is a domain inside a domain, so the reader never traces an edge to find out what goes off with what. The always-on domain carries the accent because it is the one that must still be alive to turn the others back on.域是嵌套的,而嵌套直接画成包含关系,不画线 —— 槽里套槽就是域里套域,读者不用顺着一条边去找「关谁会连带关掉谁」。常开域给强调色,因为它是那个必须还活着、才能把别的再打开的。

POWER DOMAIN TREE电源域树the order you cut them in is the whole content of a suspend bug关它们的顺序,就是一个挂起 bug 的全部内容
Always-on domain常开域 never gated永不断电survives suspend — this is what wakes the rest up挂起也活着 —— 剩下的都靠它唤醒
PMUpower sequencer上下电时序
RTCwall clock实时钟
GPIO wakethe wake pins唤醒引脚
SRAMresume context lives here恢复上下文存这
CPU domainCPU 域gated per cluster按簇断电
big cluster大核簇off first under thermal pressure温度一高先关它
Core A0
Core A1
Core A2
Core A3
L2
little cluster小核簇last one standing最后关的
Core B0
Core B1
Core B2
Core B3
Multimedia domain多媒体域cut it with the display still fetching and you get a bus hang, not a black screen显示还在取数的时候断它,得到的是总线挂死,不是黑屏
VOPholds the bus while scanning out扫描输出期间占着总线
GPU
ISP
Video codec视频编解码