Commit db8020f
authored
AdvLoggerPkg: Drop buffer migration (#868)
## Description
Effectively reverts commits af0f64c and 9fc8521 preserving structure
compatibility and general cleanup.
The advanced logger buffer starts accumulating messages in the first
phase advanced logger is active, and the buffer continues to be used
throughout remaining phases. Each phase has to account for either
allocating or using an existing logger buffer. Due to the persistent
nature of the buffer throughout boot, it is allocated as a runtime
memory type early in boot to support its preservation and access at OS
runtime.
However, S4 resume relies upon a stable memory map across suspend and
resume. Since the advanced logger buffer is allocated as a runtime
memory type prior to DXE, it is in a buffer outside the DXE memory bins.
This leads to an increased likelihood of the buffer being at a different
address across suspend and resume affecting hibernate resume. Advanced
logger buffer migration was a mechanism to address this but doing so
complicates MM treatment of the buffer.
Because a single advanced logger buffer is used across all phases,
including a shared buffer between PEI and MM and DXE and MM, the buffer
must be unlocked for MM access to accommodate a PEI MM IPL. This creates
a problem where both requirements cannot simultaneously be met without
additional complexity in MM access code. In addition, MM environments
are inconsistent in their support for memory unlocking.
In the end, hibernation has always been a best effort scenario with this
flow and other MM solutions already require runtime allocations outside
of DXE memory bins, so this change removes the functional logic for
migration.
The memory bin scenario will be addressed in the future when the bins
are allocated in a pre-DXE phase (e.g. PEI) and picked up by DXE.
- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?
## How This Was Tested
- AdvLoggerPkg CI
- Boot to OS on QEMU Q35 and SBSA
- Boot to EFI shell on OVMF X64 w/ edk2 Standalone MM
## Integration Instructions
- N/A
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>1 parent 87ab47e commit db8020f
17 files changed
Lines changed: 34 additions & 813 deletions
File tree
- AdvLoggerPkg
- Include
- Library
- AdvLoggerMmAccessLib
- AdvLoggerSmmAccessLib
- AdvancedLoggerAccessLib
- AdvancedLoggerLib
- BaseArm
- DxeCore
- MmCore
- PeiCore
- Runtime
- SmmCore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 48 | | |
54 | 49 | | |
55 | 50 | | |
| |||
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
87 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
Lines changed: 0 additions & 120 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | 30 | | |
34 | 31 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 32 | | |
99 | 33 | | |
100 | 34 | | |
| |||
142 | 76 | | |
143 | 77 | | |
144 | 78 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 79 | | |
178 | 80 | | |
179 | 81 | | |
| |||
187 | 89 | | |
188 | 90 | | |
189 | 91 | | |
190 | | - | |
191 | 92 | | |
192 | 93 | | |
193 | 94 | | |
| |||
209 | 110 | | |
210 | 111 | | |
211 | 112 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 113 | | |
219 | 114 | | |
220 | 115 | | |
| |||
244 | 139 | | |
245 | 140 | | |
246 | 141 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 142 | | |
257 | 143 | | |
258 | 144 | | |
| |||
308 | 194 | | |
309 | 195 | | |
310 | 196 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | 197 | | |
318 | 198 | | |
319 | 199 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
0 commit comments