Commit ed52093
efi: Fix get_memory_map to update descriptor info
The UEFI Spec does not imply when the descriptor_size and
descriptor_version should be updated. However, a recent Linux kernel (at
least v5.8) expects these values are filled even if the memory_map_size
is too small. This assumption causes divided-by-0 exception during the
boot and system reboot. This commit adds null checks and fixes the
behavior. This fix is to address issue #107.
Signed-off-by: Akira Moroo <retrage01@gmail.com>1 parent 1312461 commit ed52093
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
372 | 388 | | |
373 | 389 | | |
374 | 390 | | |
| |||
378 | 394 | | |
379 | 395 | | |
380 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
381 | 401 | | |
382 | 402 | | |
383 | 403 | | |
384 | 404 | | |
385 | 405 | | |
386 | 406 | | |
387 | | - | |
388 | | - | |
389 | 407 | | |
390 | 408 | | |
391 | 409 | | |
| |||
0 commit comments