freebsd-dev/sys/arm
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
..
allwinner [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
altera/socfpga [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
amlogic/aml8726 [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
annapurna/alpine [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
arm Make the 'env' directive described in config(5) work on all architectures, 2016-01-02 02:53:48 +00:00
at91 Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
broadcom/bcm2835 Add dev.fb.X.resync sysctl to resync ARM framebuffer with VideoCore 2015-12-20 00:58:22 +00:00
cavium/cns11xx Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
conf Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
freescale Add i.MX 6 IPU driver and enable it in IMX6 config 2015-12-21 22:25:35 +00:00
include Implement OF_decode_addr() for arm. Move most of powerpc's implementation 2015-12-21 18:07:32 +00:00
lpc Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
mv Remove the arm KERNPHYSADDR option as it is no longer used. The make 2015-12-22 09:08:21 +00:00
qemu [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
rockchip [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
samsung/exynos [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
ti [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
versatile Move more bus_space_* files to be built by files.arm. This leaves the 2015-11-21 15:30:08 +00:00
xilinx [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
xscale Make the 'env' directive described in config(5) work on all architectures, 2016-01-02 02:53:48 +00:00