Commit ca4d600
committed
Documented the CLZ search, and corrected the readme's AP claim
Two readme fixes that the previous commit made due.
The image list in section 3 enumerates every example, so adding demo_clz.elf
without adding it here would have left the readme telling a reader to build five
images out of six. The ninja line and the list both name it now, and section 6
says what the optimisation is, what it is worth (2188 to 1316 bytes of the
priority search), that it applies in the default 32-priority configuration rather
than only above 32, and why a Thumb build deliberately keeps the portable loop.
The second one is not mine and is worth calling out. Section 7 told anyone
reusing this code that PRBAR.AP is encoded "the reverse of the widely-published
Armv8-R AArch64 macro set" and to re-calibrate before trusting it. That is false,
and mpu.h has said so since the shift bug was found: AP[2] selects read-only and
AP[1] grants EL0 access, exactly as published, and the four-region calibration
that suggested otherwise was measuring a program_region() that shifted every
PRBAR field one bit too far left. So the readme was contradicting the header
beside it on the encoding of a permissions register, which is the worst place to
be wrong -- a reader who "re-calibrated" against that advice would have inverted
their own access permissions.
Replaced with what mpu.h establishes, including the part that is genuinely worth
carrying: region coverage is enforced even when the permissions are not what you
asked for, so an unmapped address faults while a "read-only" region quietly
accepts writes, and only provoking a real fault tells the two apart. That is the
transferable lesson the old text was reaching for.
No code change; FVP ctest still 7/7.
Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>1 parent a7bf618 commit ca4d600
1 file changed
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
| |||
142 | 157 | | |
143 | 158 | | |
144 | 159 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
152 | 178 | | |
153 | 179 | | |
154 | 180 | | |
| |||
0 commit comments