Page MenuHomeFreeBSD

Implement OF_decode_addr() for arm. Move most of powerpc's implementation into a new function that other platforms can share.
ClosedPublic

Authored by ian on Dec 20 2015, 8:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 6:21 PM
Unknown Object (File)
Sat, Apr 27, 6:03 PM
Unknown Object (File)
Jan 18 2024, 3:07 AM
Unknown Object (File)
Dec 20 2023, 12:48 AM
Unknown Object (File)
Oct 25 2023, 10:00 AM
Unknown Object (File)
Oct 4 2023, 10:08 AM
Unknown Object (File)
Aug 14 2023, 12:11 AM
Unknown Object (File)
Jun 18 2023, 6:09 AM
Subscribers

Details

Reviewers
nwhitehorn
Summary

This creates a new ofw_reg_to_paddr() function (in a new ofw_subr.c file) that contains most of the existing ppc implementation, mostly unchanged.

The ppc code now calls the new MI code from the MD code, then creates a ppc-specific bus_space mapping from the results. The new arm implementation does the same in an arm-specific way.

This also moves the declaration of OF_decode_addr() from ofw_machdep.h to openfirm.h, except on sparc64 which uses a different function signature.

This will allow all FDT platforms to set up early console access using OF_decode_addr().

Test Plan

passed make universe; not run-tested

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ian retitled this revision from to Implement OF_decode_addr() for arm. Move most of powerpc's implementation into a new function that other platforms can share..
ian updated this object.
ian edited the test plan for this revision. (Show Details)
ian added a reviewer: nwhitehorn.
ian set the repository for this revision to rS FreeBSD src repository - subversion.
nwhitehorn edited edge metadata.

This looks good in general (though see inline comment about copyrights). The bus tag assignment (NOT_PCI stuff) seems a little odd to me, but I can't really think of anything better and that API is not baked in by the change.

sys/dev/ofw/ofw_subr.c
3

You should probably retain the copyright from the PPC version here since this is mostly a copy of that implementation.

This revision is now accepted and ready to land.Dec 21 2015, 4:28 PM
sys/dev/ofw/ofw_subr.c
3

I investigated that, and it didn't seem to apply. The copyright in the ppc file is unchanged from the initial netbsd import in 2000. The OF_decode_addr() was added by marcel in 2006, and he didn't add himself to the copyright, so copying the block from the ppc file didn't seem right. I could put marcel's name instead of mine at the head of this file, but that feels weird too, somehow. So I figured I'd just mention the provenance in the commit message, mostly so people could follow the chain of history.

Committed as r292555 (forgot to include the link in the commit message).