Commit Graph

2 Commits

Author SHA1 Message Date
Justin Hibbits
9ed9b26792 Add a ofw_parse_bootargs function, and use it for powerpc
Summary:
If the environment variable is set, U-boot adds a 'bootargs' property to
/chosen.  This is already handled by ARM and MIPS, but should be handled in a
central location.  For now, ofw_subr.c is a good place until we determine if it
should be moved to init_main.c, or somewhere more central to all architectures.

Eventually arm and mips should be modified to use ofw_parse_bootargs() as well,
rather than using the duplicate code already.

Reviewed By: adrian
Differential Revision: https://reviews.freebsd.org/D7846
2016-09-21 02:28:39 +00:00
Ian Lepore
bc7b930020 Implement OF_decode_addr() for arm. Move most of powerpc's implementation
into a new function that other platforms can share.

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 help all FDT platforms to set up early console access using
OF_decode_addr().
2015-12-21 18:07:32 +00:00