Be consistent with what we are now doing with non-EFI boot (but with the
difference that EFI runs in 64-bit mode on 64-bit platforms, so there is
no restriction that the v3 entry point should be below 4GB).
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I'd be tempted to save an indentation level and do continue if this vendor table isn't SMBIOS*. But it's not a clear win, so I'm mentioning it passing for your consideration.
I'd also be tempted to remove the #if !arm ifdef, but that's clearly a different change. the original was there only for early-days u-boot UEFI which was a bit rough and not very standards conformant.
Thanks for all the cleanups.
stand/efi/loader/main.c | ||
---|---|---|
1193 | Mayb |
stand/efi/loader/main.c | ||
---|---|---|
1193 | Not sure if I'm completing Warner's thought here, but the need to use __unused here suggests that the smbios search loop would be nice to keep in its own conditionally defined subroutine. That would make control flow a bit simpler too (just return as soon as we find a 64-bit EP). |
Besides removing an indentation level, I think it's a small win also in cognitive burden, as one can eliminate these cases in their mind when reading the rest of the loop. I'll do it.
I'd also be tempted to remove the #if !arm ifdef, but that's clearly a different change. the original was there only for early-days u-boot UEFI which was a bit rough and not very standards conformant.
Yes, a different change, and I have no hardware to test that on. I only have amd64 machines currently. But maybe it's possible to test such things with QEMU?
Thanks for all the cleanups.
No problem. Since I had to read the spec, I thought I'd take the opportunity to review what exists and make sure we are both quite flexible when possible but also quite conservative with respect to what is mandated.
stand/efi/loader/main.c | ||
---|---|---|
1193 | Indeed. I've moved this code to a separate routine. |