On 12.02.24 16:41, 'Earl Chew' via EFI Boot Guard wrote: > Jan, > > On 2024-02-12 00:25, Jan Kiszka wrote: >>> + for (UINTN delay = ENV_BOOT_DELAY; delay; --delay) >>> + BS->Stall(1000 * 1000); >> >> Why this loop? Stall() should be usable with up to 2000 seconds. > > I think this route makes it straightforward to reason about correctness > for all allowable values, and I do not think reducing the number of > calls provides any useful gain. > > As I understand it, Stall(UINTN) accepts either an unsigned 32 bit, > or 64 bit, integer depending on the host architecture.
Oh, it's even unsigned - 2 times more seconds. > > Would you prefer a different approach? Yeah, the simpler one. Neither 4000 nor 4000000000 seconds are reasonable values here, so a simple Stall() suffices. Jan -- Siemens AG, Technology Linux Expert Center -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/7b43e594-e2ad-44ee-8240-5d960808a229%40siemens.com.
