Commit 2dc17d2
committed
stm32h7-startup: reorder AXI erratum and cache setup
@mkeeter noticed nondeterminism in the delay loop for measurement
handoff, which caused us to realize that it was being performed _before_
the caches were set up ... which means small alignment changes in flash
can have huge impact on the execution time of a tight loop.
While considering fixes, I noticed that the fix for the AXI SRAM read
erratum had gradually drifted below other code. This was safe when I
initially implemented it, because we weren't using AXI SRAM for kernel
stack etc. at the time. We are now!
This commit moves the AXI SRAM erratum fix into pre_init where it runs
before most RAM accesses, and moves cache setup earlier in
system_init_custom to ensure that caches are on for the rest of the
process, including measurement handoff.1 parent c205809 commit 2dc17d2
1 file changed
+14
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
| |||
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
| |||
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
| |||
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
0 commit comments