]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix casts between 64-bit physical addresses and pointers in EFI.
authorjhb <jhb@FreeBSD.org>
Sat, 18 Aug 2018 20:28:25 +0000 (20:28 +0000)
committerjhb <jhb@FreeBSD.org>
Sat, 18 Aug 2018 20:28:25 +0000 (20:28 +0000)
commit46b97c17ea73473fa9a141e1577e3177b06551ea
tree494d9f7e9cbaf432439899a1bff7e3bf7f87eceb
parentfa30a214fef50fbab4d2a0ea3ebd24431089d4b2
Fix casts between 64-bit physical addresses and pointers in EFI.

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.

Reviewed by: kevans
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16586
stand/efi/loader/arch/i386/efimd.c
stand/efi/loader/bootinfo.c
stand/efi/loader/copy.c