Page MenuHomeFreeBSD

Add a kernel env to select between acpi and fdt
ClosedPublic

Authored by andrew on Jul 21 2016, 5:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 11, 6:43 AM
Unknown Object (File)
Sun, May 5, 7:20 AM
Unknown Object (File)
Tue, Apr 30, 3:06 PM
Unknown Object (File)
Sat, Apr 27, 2:15 AM
Unknown Object (File)
Sat, Apr 27, 2:14 AM
Unknown Object (File)
Sat, Apr 27, 12:44 AM
Unknown Object (File)
Mar 19 2024, 6:39 AM
Unknown Object (File)
Jan 18 2024, 2:29 PM
Subscribers

Details

Summary

This allows the user to select their preferred order between ACPI and
FDT. This will be needed on machines with both, e.g. the SoftIron
Overdrive 3000. The kernel will accept one or more comma separated
values of either 'acpi' or 'fdt'. Any other values are skipped.

To set it the user can either set it on the loader command line, or
in loader.confm e.g. in loader.conf:
boot_order=acpi,fdt

I'm not complety happy with the name, and am happy to change it if
someone comes up with something better.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Add a kernel env to select between acpi and fdt.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added a reviewer: arm64.
andrew added a subscriber: emaste.

I'm not complety happy with the name, and am happy to change it if
someone comes up with something better.

I agree, boot_order seems to imply something to do with boot device ordering. Maybe cfginfo_order, config_info_order, etc.?

sys/arm64/arm64/machdep.c
827–828 ↗(On Diff #18637)

Reverse order of strncmp and bus_order[] test (what happens if you have a string < 4 chars).

Rename to cfginfo_order and fix a possible buffer overflow

emaste added a reviewer: emaste.

seems ok to me

This revision is now accepted and ready to land.Jul 25 2016, 2:56 PM
sys/arm64/arm64/machdep.c
822 ↗(On Diff #18660)

I'd be tempted to make this be a kern.cfg.order=fdt,acpi and then report kern.cfg.type=fdt or acpi depending on what was selected.

848 ↗(On Diff #18660)

else panic or error message? Though I guess since this is called before cninit, that won't do much good....

sys/arm64/arm64/nexus.c
415 ↗(On Diff #18660)

The first part of this if is sufficient. It can't be == AMD64_BUS_FDT when OF_PEER(0) == 0.

sys/arm64/arm64/machdep.c
848 ↗(On Diff #18660)

The panic should be after cninit and should only happen if the user selected an order that we couldn't handle, i.e. env != NULL && arm64_bus_method == ARM64_BUS_NONE.

andrew edited edge metadata.

Update based on feedback

This revision now requires review to proceed.Jul 25 2016, 11:45 PM
sys/arm64/arm64/nexus.c
459 ↗(On Diff #18742)

This one will be needed, it probes the tables. Otherwise I think this is ready.

andrew edited edge metadata.

Call acpi_identify, it's needed to walk the ACPI tables by the children

This revision was automatically updated to reflect the committed changes.