Page MenuHomeFreeBSD

Implement -P for boot loader.
ClosedPublic

Authored by imp on Feb 7 2016, 5:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 1:43 PM
Unknown Object (File)
Mon, Sep 30, 7:15 PM
Unknown Object (File)
Sep 20 2024, 3:57 AM
Unknown Object (File)
Sep 19 2024, 6:49 AM
Unknown Object (File)
Sep 16 2024, 5:21 AM
Unknown Object (File)
Sep 15 2024, 6:11 AM
Unknown Object (File)
Sep 8 2024, 4:44 PM
Unknown Object (File)
Sep 7 2024, 5:01 PM
Subscribers
None

Details

Summary

It's a bit easier to implement here than in boot1, like is normally
done. When a keyboard appears in the UEFI device tree, assume -D -h,
just like on a BIOS boot.

  1. It is unclear if an ACPI keyboard appearing in the tree means there's
  2. a real keyboard or not. A USB keyboard doesn't seem to appear unless
  3. it is really there.

Diff Detail

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

Event Timeline

imp retitled this revision from to Implement -P for boot loader..
imp updated this object.
imp edited the test plan for this revision. (Show Details)
sys/boot/efi/loader/main.c
108

typo (handles)

125

typo (each)

emaste edited edge metadata.

Looks good to me (did not review the has_keboard implementation in minute detail).

sys/boot/efi/loader/main.c
153

This comment seems incomplete, or partially redundant.

This revision is now accepted and ready to land.Feb 8 2016, 7:27 PM
This revision was automatically updated to reflect the committed changes.
head/sys/boot/efi/loader/main.c
116 ↗(On Diff #13132)

looks like an unrequired wrap given the lines above / below.

119 ↗(On Diff #13132)

You could also return here.

122 ↗(On Diff #13132)

style(9) missing braces.

130 ↗(On Diff #13132)

The following is simpler to understand IMO:

nhandles = sz / sizeof(*hin);
for (i = 0; i < nhandles; i++) {
     status = BS->HandleProtocol(hin[i], &devid, (VOID **)&path);
140 ↗(On Diff #13132)

typo?
"unclear if there's" ?

144 ↗(On Diff #13132)

You could use IsDevicePathType here.

150 ↗(On Diff #13132)

What are these magic constants and can we get some defines for them, so they aren't?

160 ↗(On Diff #13132)

As above, but might be nice to also introduce an IsDevicePathSubType too.

177 ↗(On Diff #13132)

style(9) brace return value

202 ↗(On Diff #13132)

BOOL ?

249 ↗(On Diff #13132)

style(9) int is not a bool.