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)
Wed, Nov 20, 10:14 PM
Unknown Object (File)
Wed, Nov 20, 2:28 PM
Unknown Object (File)
Oct 26 2024, 6:23 AM
Unknown Object (File)
Oct 25 2024, 8:55 PM
Unknown Object (File)
Oct 25 2024, 9:07 AM
Unknown Object (File)
Oct 24 2024, 9:35 PM
Unknown Object (File)
Oct 6 2024, 11:38 AM
Unknown Object (File)
Sep 21 2024, 12:08 PM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #12111)

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

sys/boot/efi/boot1/Makefile
7–8 ↗(On Diff #12111)

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

sys/boot/efi/include/efi_nii.h
29–30 ↗(On Diff #12111)

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.