Page MenuHomeFreeBSD

loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build
ClosedPublic

Authored by imp on Jun 26 2026, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 6, 11:06 AM
Unknown Object (File)
Sat, Sep 5, 9:35 AM
Unknown Object (File)
Fri, Sep 4, 9:32 PM
Unknown Object (File)
Fri, Sep 4, 10:46 AM
Unknown Object (File)
Fri, Sep 4, 6:53 AM
Unknown Object (File)
Fri, Sep 4, 12:03 AM
Unknown Object (File)
Wed, Sep 2, 1:15 PM
Unknown Object (File)
Wed, Sep 2, 12:46 AM
Subscribers

Details

Summary

Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer.

Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jun 26 2026, 7:58 PM
rlibby added a subscriber: rlibby.

Logic LGTM.

I guess we don't follow 80 column limit in this file?

For my education: do we know in the 32-bit environment that physical addresses assuredly are below 4 GB?

This revision is now accepted and ready to land.Jun 26 2026, 8:20 PM

Yea. I don't care about 80 columns for the boot loader. It's obsolete and makes the code ugly. I usually wrap around 100 chars..

For my education: do we know in the 32-bit environment that physical addresses assuredly are below 4 GB?

Yes. There's only 32-bits, it necessarily has to be below 4GB and has other limits.