[ipxe-devel] [PATCH 1/1] efi: provide possibility to disable cpu_nap

Michael Brown mcb30 at ipxe.org
Thu Jul 13 22:15:52 UTC 2017


On 13/07/17 12:00, Heinrich Schuchardt wrote:
> Why do we need cpu_nap in the keyboard loop at all when we are in an
> UEFI context. Shouldn't UEFI WaitForEvent be used to care about the idle
> CPU?

No.  iPXE runs in three platform environments, two of which are nothing 
to do with UEFI.  Any code that doesn't have to be platform-specific is 
implemented in as generic a way as possible.  I am not going to start 
polluting the entire codebase with wholly unnecessary UEFI-specific 
reimplementations of already working code.

I have given you working sample code that solves your problem in an 
simple, generic way at a cost (for x86_64) of only eight bytes in the 
final binary.  Did you even try testing this?

Michael



More information about the ipxe-devel mailing list