Page MenuHomeFreeBSD

Fix EFI build on ia64
ClosedPublic

Authored by smh on Feb 6 2016, 12:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 3 2024, 6:49 PM
Unknown Object (File)
Jun 27 2023, 4:27 PM
Unknown Object (File)
Apr 25 2023, 7:21 PM
Unknown Object (File)
Apr 8 2023, 9:05 PM
Unknown Object (File)
Mar 23 2023, 6:28 AM
Unknown Object (File)
Jan 16 2023, 5:29 PM
Unknown Object (File)
Jan 3 2023, 6:55 PM
Unknown Object (File)
Nov 27 2022, 9:14 AM
Subscribers

Details

Reviewers
ngie
Summary

The MFC of the recent EFI work to stable/10 caused build beakage under ia64.

It was not apparent that there was EFI code outside the EFI tree as this is not the case in HEAD, however in stable/10 there is for ia64.

This change does the following:

  1. Re-enables libefi for ia64
  2. Adds the ignore for unsupported pragma's
  3. Adds the missing parameter to efi_handle_lookup in the ia64 loader.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2427
Build 2444: arc lint + arc unit

Event Timeline

smh retitled this revision from to Fix EFI build on ia64.
smh updated this object.
smh edited the test plan for this revision. (Show Details)

Was there any change to how the operations need to be done in order to call efi_handle_lookup in the amd64/arm64 case on head with a ZFS root?

sys/boot/efi/Makefile
5–12

Could the MACHINE_CPUARCHs be moved inside the COMPILER_TYPE check to better match head?

From ^/head/... :

 1 # $FreeBSD$
 2
 3 .include <src.opts.mk>
 4
 5 # In-tree GCC does not support __attribute__((ms_abi)).
 6 .if ${COMPILER_TYPE} != "gcc"
 7
 8 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
 9 .if ${MK_FDT} != "no"
10 SUBDIR+=        fdt
11 .endif
12 .endif
13
14 .if ${MACHINE_CPUARCH} == "aarch64" || \
15     ${MACHINE_CPUARCH} == "amd64" || \
16     ${MACHINE_CPUARCH} == "arm"
17 SUBDIR+=        libefi loader boot1
18 .endif
19
20 .endif # ${COMPILER_TYPE} != "gcc"
21
22 .include <bsd.subdir.mk>
23
ngie removed a subscriber: ngie.
In D5212#110873, @ngie wrote:

Was there any change to how the operations need to be done in order to call efi_handle_lookup in the amd64/arm64 case on head with a ZFS root?

The additional parameter was introduced support ZFS, since ia64 doesn't have this support due to it being a totally separate loader, simply passing NULL will mean this parameter is just not returned.

sys/boot/efi/Makefile
5–12

Nope as the compiler is gcc for ia64, tried that first ;-)

Fix pointer cast issue on arm.armeb.

sys/boot/efi/Makefile
5–12

I understand, but I would prefer refactoring things slightly to make future merges much simpler, e.g.

# In-tree GCC does not support __attribute__((ms_abi)).
.if ${COMPILER_TYPE} != "gcc"
.if ${MACHINE_CPUARCH} == "amd64"
SUBDIR+=        libefi loader boot1
.endif

.endif # ${COMPILER_TYPE} != "gcc"

.if ${MACHINE_CPUARCH} == "ia64"
SUBDIR+=        libefi
.endif

This form makes it logically easier to grasp the bits that are amd64 specific and the bits that are ia64 specific, and segregates the code so people know where to put ia64 bits in the future.

svn is as dumb as a doornail when merging. I'd rather make it easier for humans/svn than harder by diverging.

Restructure Makefile fix to aid future merges as per ngie's suggestion.

smh marked an inline comment as done.Feb 8 2016, 9:07 AM
smh marked 2 inline comments as done.
ngie edited edge metadata.
This revision is now accepted and ready to land.Feb 8 2016, 9:12 AM