Commit b272b7e
committed
efi: Defer reset_system activation until after ExitBootServices
EFI applications like shim call ResetSystem during early boot when
MOK state import fails (set_variable returns UNSUPPORTED). The
previous commit made reset_system write to Cloud Hypervisor's
shutdown port and enter a halt loop, which caused VMs to either
shut down (on CH) or hang (on QEMU) during boot.
Split reset_system into two phases:
- reset_system_boot: no-op during boot services (old behavior)
- reset_system: activated after ExitBootServices with CH port I/O
Also fix fixup_at_virtual to remap reset_system to its virtual
address instead of not_available, so ResetSystem works after
SetVirtualAddressMap (needed for Windows shutdown on CH).
Signed-off-by: CMGS <ilskdw@gmail.com>1 parent a76cafc commit b272b7e
2 files changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
456 | 459 | | |
457 | 460 | | |
458 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
199 | 218 | | |
200 | 219 | | |
201 | 220 | | |
202 | | - | |
203 | 221 | | |
204 | 222 | | |
205 | 223 | | |
| |||
224 | 242 | | |
225 | 243 | | |
226 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
227 | 253 | | |
228 | 254 | | |
229 | 255 | | |
| |||
0 commit comments