freebsd-nq/sys/powerpc
Ian Lepore 69dcb7e771 Make the 'env' directive described in config(5) work on all architectures,
providing compiled-in static environment data that is used instead of any
data passed in from a boot loader.

Previously 'env' worked only on i386 and arm xscale systems, because it
required the MD startup code to examine the global envmode variable and
decide whether to use static_env or an environment obtained from the boot
loader, and set the global kern_envp accordingly.  Most startup code wasn't
doing so.  Making things even more complex, some mips startup code uses an
alternate scheme that involves calling init_static_kenv() to pass an empty
buffer and its size, then uses a series of kern_setenv() calls to populate
that buffer.

Now all MD startup code calls init_static_kenv(), and that routine provides
a single point where envmode is checked and the decision is made whether to
use the compiled-in static_kenv or the values provided by the MD code.

The routine also continues to serve its original purpose for mips; if a
non-zero buffer size is passed the routine installs the empty buffer ready
to accept kern_setenv() values.  Now if the size is zero, the provided buffer
full of existing env data is installed.  A NULL pointer can be passed if the
boot loader provides no env data; this allows the static env to be installed
if envmode is set to do so.

Most of the work here is a near-mechanical change to call the init function
instead of directly setting kern_envp.  A notable exception is in xen/pv.c;
that code was originally installing a buffer full of preformatted env data
along with its non-zero size (like mips code does), which would have allowed
kern_setenv() calls to wipe out the preformatted data.  Now it passes a zero
for the size so that the buffer of data it installs is treated as
non-writeable.
2016-01-02 02:53:48 +00:00
..
aim Make ELFv2 powerpc64 kernels build and run. Loader support will come in a 2015-11-29 07:16:08 +00:00
booke Add platform support for QorIQ SoCs. 2015-12-30 03:43:25 +00:00
conf Enable PRINTF_BUFR_SIZE on powerpc64, following r194204 on x86. The kernel 2015-12-18 14:35:27 +00:00
cpufreq Some style(9) fixes 2013-12-13 05:54:25 +00:00
fpu Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7 2015-02-22 21:40:27 +00:00
include Extend idle support for newer Book-E cores. 2016-01-01 02:47:40 +00:00
mambo CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
mikrotik Create a RouterBoard platform and use it to create a flash map 2015-08-22 05:50:18 +00:00
mpc85xx Use uint32_t for LBC block size. 2016-01-01 15:36:56 +00:00
ofw Extend Book-E to support >4GB RAM 2015-12-24 04:30:15 +00:00
powermac Where appropriate, use the endian-flipping OF_getencprop() instead of 2015-11-17 16:07:43 +00:00
powerpc Make the 'env' directive described in config(5) work on all architectures, 2016-01-02 02:53:48 +00:00
ps3 Add support for USB display link adapters to the FB and VT drivers. 2015-03-07 20:45:15 +00:00
pseries Provide link state reporting so that ifconfig_llan0="DHCP" works. The 2015-12-19 02:16:38 +00:00
psim Move Open Firmware device root on PowerPC, ARM, and MIPS systems to 2014-02-05 14:44:22 +00:00