Page MenuHomeFreeBSD

Fix casts between 64-bit physical addresses and pointers in EFI.
ClosedPublic

Authored by jhb on Aug 3 2018, 9:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 1:28 AM
Unknown Object (File)
Fri, Oct 10, 10:11 AM
Unknown Object (File)
Sun, Oct 5, 11:19 PM
Unknown Object (File)
Sep 8 2025, 9:21 AM
Unknown Object (File)
Sep 5 2025, 6:09 AM
Unknown Object (File)
Aug 13 2025, 5:47 PM
Unknown Object (File)
Aug 7 2025, 1:52 PM
Unknown Object (File)
Jul 19 2025, 9:30 PM
Subscribers
None

Details

Summary

Compiling FreeBSD/i386 with modern GCC triggers warnings for various
places that convert 64-bit EFI_ADDRs to pointers and vice versa.

  • Cast pointers to uintptr_t rather than to uint64_t when assigning to a 64-bit integer.
  • Cast 64-bit integers to uintptr_t before a cast to a pointer.
Test Plan
  • build world with CROSS_TOOLCHAIN=i386-gcc

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Aug 14 2018, 4:23 AM
This revision was automatically updated to reflect the committed changes.