This resolves a case where my system would hang on the UEFI call to StartImage.

When a PCI NIC gets probed successfully, it calls register_netdev() which in 
turn uses the least significant bits of the MAC to seed the random number 
generator. This calls into random() which uses currticks() for the initial 
seed. On EFI builds, this restores the TPL level to TPL_APPLICATION to allow 
tick events to fire, and then raises it back to TPL_CALLBACK. Not matching 
calls to RaiseTPL with calls to RestoreTPL causes undefined behavior, in this 
case a system hang. Adding the matching calls around pci_probe resolves this 
issue.
You can view, comment on, or merge this pull request online at:

  https://github.com/ipxe/ipxe/pull/70

-- Commit Summary --

  * [efi_pci] Elevate TPL around pci_probe

-- File Changes --

    M src/interface/efi/efi_pci.c (3)

-- Patch Links --

https://github.com/ipxe/ipxe/pull/70.patch
https://github.com/ipxe/ipxe/pull/70.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/70
_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to