Page MenuHomeFreeBSD

Enable warnings in EFI boot code
ClosedPublic

Authored by smh on Jan 9 2016, 3:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 11, 6:46 AM
Unknown Object (File)
Jan 21 2024, 8:35 PM
Unknown Object (File)
Dec 22 2023, 9:45 PM
Unknown Object (File)
Dec 13 2023, 11:04 AM
Unknown Object (File)
Dec 13 2023, 4:38 AM
Unknown Object (File)
Dec 10 2023, 12:37 PM
Unknown Object (File)
Dec 9 2023, 7:02 AM
Unknown Object (File)
Dec 9 2023, 6:34 AM
Subscribers

Details

Summary

Set WARNS if not set for EFI boot code and fix the issues highlighted by setting it.

Most components are set to WARNS level 6 with few being left at lower levels due to the amount of changes needed to fix at higher levels.

Test Plan

make buildenv
cd sys/boot/efi
make clean
make

Once built boot using the created boot.efifat image under qemu.

Also:

make tinderbox JFLAG=-j24 MAKE_JUST_WORLDS=1

Diff Detail

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

Event Timeline

smh retitled this revision from to Enable warnings in EFI boot code.
smh updated this object.
smh edited the test plan for this revision. (Show Details)
smh added a reviewer: emaste.

Restore removed blank line and correct spacing highlighted by phabricator view.

sys/boot/efi/Makefile
5–6

This makefile doesn't build anything, so this will have no effect?

sys/boot/efi/boot1/Makefile
7–8

Seems WARNS conventionally goes after PROG= etc. in other Makefiles.

sys/boot/efi/include/efi_nii.h
29–31

Looks good, but I'd suggest removing the line continuation (even though it's then longer than 80 cols) to reduce diffs with other versions of this file.

Here's NetBSD's, which seems to come via gnu-efi:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/external/bsd/gnu-efi/dist/inc/efi_nii.h?annotate=1.1.1.1&only_with_tag=MAIN

#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL \
    { 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29} }

I'd say we should follow that formatting.

Address feedback from emaste:

  • Remove WARNS from sys/boot/efi/Makefile as it has no effect
  • Move WARNS below PROG= etc
  • Remove split of GUID / PROTOCOL defines even though they break style(9) 80 col limit, to reduce diff and match NetBSD.
smh marked 3 inline comments as done.Jan 11 2016, 1:35 PM

Spacing changes for GUID / PROTOCOL structs requested emaste

Fix ARM warnings highlighted by tinderbox.

This revision was automatically updated to reflect the committed changes.