system76 / edk2

EDK II
http://www.tianocore.org/edk2/
Other
1 stars 3 forks source link

Rebase on TianoCore #8

Closed crawfxrd closed 4 years ago

crawfxrd commented 4 years ago

Work being done in wip/uefipayloadpkg.

Remaining work for rebasing on tianocore/edk2:

crawfxrd commented 4 years ago

Filtering non-bootable drives and sorting NVMe drives first can be done in the UefiPayloadPkg/PlatformBootManager implementation of RefreshAllBootOptions() instead of directly in MdeModulePkg/UefiBootManagerLib.

crawfxrd commented 4 years ago

https://bugzilla.tianocore.org/show_bug.cgi?id=1323

[Variable]Merge EmuVariable and Real variable driver

crawfxrd commented 4 years ago

EfiBootManagerRegisterBootDescriptionHandler() could be used to implement custom descriptions for devices.

crawfxrd commented 4 years ago

~Need to debug SMMSTORE behavior. Doesn't seem to be preserving state on release builds.~

Booting on DEBUG:

[Bds]OsIndication: 0000000000000000
[Bds]=============Begin Load Options Dumping ...=============
  Driver Options:
  SysPrep Options:
  Boot Options:
    Boot0002: ADATA ADATA USB Flash Drive                0x0001
    Boot0003: SanDisk Cruzer Glide               0x0001
    Boot0001: Samsung SSD 970 EVO 250GB                  0x0001
    Boot0000: UiApp              0x0109
  PlatformRecovery Options:
    PlatformRecovery0000: Default PlatformRecovery               0x0001
[Bds]=============End Load Options Dumping=============

Booting on RELEASE:

[Bds]OsIndication: 0000000000000000
[Bds]=============Begin Load Options Dumping ...=============
  Driver Options:
  SysPrep Options:
  Boot Options:
    Boot0001: Samsung SSD 970 EVO 250GB                  0x0001
    Boot0000: UiApp              0x0109
  PlatformRecovery Options:
    PlatformRecovery0000: Default PlatformRecovery               0x0001
[Bds]=============End Load Options Dumping=============

but the devices show up in BM.


The USB devices are not detected before entering the front page in a RELEASE build. Seems to be consistent behavior of https://github.com/system76/firmware-open/issues/23#issuecomment-558197372. Works correctly if I add a Stall() before enumerating the devices in PlatformBootManager.

crawfxrd commented 4 years ago

Testing on the galp4, systemd-analyze reports firmware takes between 5.7s and 6.1s. Using 2020-02-05_d4bae8b, systemd-analyze reports firmware taking between 3.4s and 3.7s. system76 doesn't honor PcdPlatformBootTimeOut, that accounts for 1s of the difference.

Testing on QEMU with a 0s timeout: system76: ~850ms wip/uefipayloadpkg: ~1480ms


Retested on galp3-c. Across 20 reboots firmware time averaged system76: 1787ms wip/uefipayloadpkg: 2902ms