Commit 5de45cd ("[romprefix] Report a pessimistic runtime size estimate") set the PCI3.0 "runtime size" field equal to the worst-case runtime size, on the basis that there is no guarantee that PMM allocation will succeed and hence no guarantee that we will be able to shrink the ROM image. On a PCI3.0 system where PMM allocation would succeed, this can cause the BIOS to unnecessarily refuse to initialise the iPXE ROM due to a perceived shortage of option ROM space. Fix by reporting the best-case runtime size via the PCI header, and checking that we have sufficient runtime space (if applicable). This allows iPXE ROMs to initialise on PCI3.0 systems that might otherwise fail due to a shortage of option ROM space. This may cause iPXE ROMs to fail to initialise on PCI3.0 systems where PMM is broken. (Pre-PCI3.0 systems are unaffected since there must already have been sufficient option ROM space available for the initialisation entry point to be called.) On balance, it seems preferable to avoid breaking "good" systems (PCI3.0 with working PMM) at the cost of potentially breaking "bad" systems (PCI3.0 with broken PMM). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
123 | 123 |
|
124 | 124 |
|
125 | 125 |
|
126 |
|
|
126 |
|
|
127 | 127 |
|
128 | 128 |
|
129 | 129 |
|
|
||
435 | 435 |
|
436 | 436 |
|
437 | 437 |
|
438 |
|
|
439 |
|
|
440 |
|
|
441 |
|
|
442 |
|
|
438 | 443 |
|
439 | 444 |
|
440 |
|
|
441 | 445 |
|
442 |
|
|
446 |
|
|
447 |
|
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
453 |
|
|
454 |
|
|
455 |
|
|
443 | 456 |
|
444 |
|
|
445 | 457 |
|
446 | 458 |
|
447 | 459 |
|