The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path. In doing so it creates an invalid device
path.
Perform the equivalent action without modification of structures
allocated by firmware.
PR: 197641
Submitted by: Chris Ruffin <chris.ruffin at intel.com>
New function smbios_match to detect BIOS versions during boot
MFC: r277957:
Fix order of functions in smbios.c (corrects r277949)
MFC: r281138:
SMBIOS support for EFI
r281138 makes changes to the new unified EFI loader (r280950), which has not been merged to stable/10 (and likely won't be).
These changes were manually applied to the amd64 EFI loader (sys/boot/amd64/efi).
The changes to sys/boot/amd64/efi are a direct commit.
Reviewed by: stas
Approved by: re (gjb), marcel
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3129
Install loader.rc with ARM u-boot loader (ubldr).
loader.rc is the responsible to read and process loader.conf variables.
This fix the issue of loader.conf being silently ignored.
Approved by: re (gjb)
Do not set preload_addr_relocate for ARM.
Refactor net_getparams() to make it easier to get params from sources other
than bootp and rarp.
Add a routine to obtain netboot parameters from the U-Boot env vars
Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
Add support for booting relocatable kernels on PowerPC.
Add code to support loading relocatable kernels at offsets that are
not zero.
Move ubldr text section to the start of the output file, so that when you
create a stripped .bin file from it the entry point is the first byte of
the file. (Will allow "load $addr $file ; go $addr" in u-boot.)
Create a relocatable instance of ubldr for ARM (ubldr.bin).
Re-link ubldr when any of its libraries change.
An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
Add support for Toradex Apalis i.MX6 development board.
Add support for imx6 audio transmitting, include drivers for:
o Digital Audio Multiplexer (AUDMUX)
o Smart Direct Memory Access Controller (SDMA)
o Synchronous Serial Interface (SSI)
280933-280939,280974-280976,281002,281009,281081,281176-281180,
281271,281275,281616 (described in-breif below):
r277693: Font fix (des)
r278335: Revert that
r280382: Whitespace, comments, and copyright update
r280383: Prevent inadvertent bootlock condition
r280384: Increase max passowrd length from 16 to 255 chars
r280385: Add missing variable hints to loader.conf(5) defaults
r280923: Whitespace
r280924: Comments
r280925: Optimize bootmsg to use fg/bg/me from screen.4th
r280926: Whitespace and cleanup
r280931: Comments
r280933: Move beastie to logo-*.4th; brands to brand-*.4th
r280934: Add remainder of supported ANSI escape sequences
r280935: Securely overwrite (zero) user input after password checks
r280936: Use equals for ASCII double frames
r280937: Solve dreaded "dictionary full" issue
r280938: Add "GELI Passphrase:" prompt to boot loader
r280939: Revert that (premature commit)
r280974: Use fg/b/me from screen.4th instead of literals
r280975: Eliminate literal escape sequences from *.4th
r280976: Use ^[[m mode-ending versus ^[[37m
r281002: Install newly added brand-*.4th and logo-*.4th files (jkim)
r281009: Revert .PATH changes to fix mips build (jkim)
r281081: Make sure forth manpages are only installed once (bapt)
r281176: Back to previous mode-endings based on feedback
r281177: Back to previous mode-endings based on feedback
r281178: Back to previous mode-endings based on feedback
r281179: Back to previous mode-endings based on feedback
r281180: Eliminate literal escape sequences from *.rc
r281271: Fix a bootlock condition if loader_version is set
NB: Commit message of r281271 has a typo, s/_logo/_version/
r281275: Re-do proper mode-endings
r281616: Add "GELI Passphrase:" prompt to boot loader
Relnotes: Added "GELI Passphrase:" prompt to boot loader
Enable bzipfs support in the EFI loader.
- Add bzipfs to the list of supported filesystems in the EFI loader.
- Increase the heap size allocated for the EFI loader from 2MB to 3MB.
The System V ABI for amd64 allows functions to use space in a 128 byte
redzone below the stack pointer for scratch space and requires
interrupt and signal frames to avoid overwriting it. However, EFI uses
the Windows ABI which does not support this. As a result, interrupt
handlers in EFI push their interrupt frames directly on top of the
stack pointer. If the compiler used the red zone in a function in the
EFI loader, then a device interrupt that occurred while that function
was running could trash its local variables. In practice this happens
fairly reliable when using gzipfs as an interrupt during decompression
can trash the local variables in the inflate_table() function
resulting in corrupted output or hangs.
Fix this by disabling the redzone for amd64 EFI binaries. This
requires building not only the loader but any libraries used by the
loader without redzone support.
Thanks to Jilles for pointing me at the redzone once I found the stack
corruption.
Allow the EFI loader to work with large kernels and/or modules
(for example, a large mfsroot). Note that for EFI the kernel and
modules (as well as other metadata files such as splash screens or
memory disk images) are loaded into a statically-sized staging area.
When the EFI loader exits it copies this staging area down to the
location the kernel expects to run at.
- Add bounds checking to the copy routines to fail attempts to access
memory outside of the staging area. Previously loading a combined
kernel + modules larger than the staging size (32MB) would overflow
the staging area trashing whatever memory was afterwards. Under
Intel's OVMF firmware for qemu this resulted in fatal faults in the
firmware itself. Now the attempt will fail with ENOMEM.
- Allow the staging area size to be configured at compile time via
an EFI_STAGING_SIZE variable in src.conf or on the command line.
It accepts the size of the staging area in MB. The default size
remains 32MB.
Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.
Reviewed by: rodrigc, imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D2187
When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc. This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough. (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)
Reported by: rodrigc
Set the #address-cells and #size-cells properties on I2C controllers of
Raspberry-pi.
This fixes the issues on dtc(1) while compiling I2C addresses set with
"reg" property.
r273865 is part of the work for supporting 4Kn drives, but it turns out
the underlying bug can actually cause corruption of the UEFI system
table in any case where block size is not 512.
Relevant portion of the original commit message:
convert boot1.efi to corrrectly calculate the lba for what the
media reports and convert the size based on what FreeBSD uses.
existing code would use the 512 byte lba and convert the
using 4K byte size.
PR: 197881
Reviewed by: Chris Ruffin
Move ofw_cpu.c to sys/dev/ofw so that it can be used by other
architectures.
Add driver for CPU frequency/voltage control on the Raspberry Pi.
On initialization, do not use bcm_mbox_intr() to read the pending messages.
This fixes the hang that happens on boot while initializing the cpufreq on
Raspberry Pi.
Add a divisor parameter to twiddle() so that callers can request that
output only happen on every Nth call.
Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.
Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.
To cut off the power we need to start the shutdown sequence by writing
the OFF bit on PMIC.
Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE
pin when it is ready for the PMIC to cut off the power. This is done by
triggering the ALARM2 interrupt on SoC RTC.
The RTC driver only works in power management mode which means it won't
provide any kind of time keeping functionality. It only implements a way
to trigger the ALARM2 interrupt when requested.
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.
ZFS large block support. The default recordsize remains at 128KB.
A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to
allow adjusting the permitted maximum record size, or
zfs_max_recordsize, with a default of 1MB. ZFS will not allow
setting recordsize greater than zfs_max_recordsize as a safety
belt, because larger recordsize means greater read and write
latency and more memory usage.
Please note that booting from datasets that have recordsize greater
than 128KB is not supported (but it's Okay to enable the feature on
the pool).
Limited safety belt is provided for mounted root filesystem but use
caution when using a larger value.
Illumos issue:
5027 zfs large block support
Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot.
While here sort and fix the signature of fdt_setup_fdtp.
MFC 273934:
Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.
Differential Revision: https://reviews.freebsd.org/D1054
Reviewed by: ian, rpaulo (earlier version)
Clean up the types of a few strings to make them const when they are never
written to.
MFC r273914:
The command name is a constant, use the correct type.
Fix incorrect reading of 32-bit modinfo by 64-bit loaders.
The various structures in the mod_metadata set of a FreeBSD kernel and
modules contain pointers. The FreeBSD loader correctly deals with a
mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
the inverse case where a 64-bit loader was loading a 32-bit kernel.
Make SERIAL support optional again. Enable it for i386 because a huge
percentage of machines has a 16550. Disable it for pc98 since only a
tiny fraction of them have one.
The U-Boot README says fdt_addr_r is the right env var for fdt data
loaded into ram, but vendors also use fdtaddr and fdt_addr. Check the
recommended variable first and fall back to the others.
- Add a basic iomux driver for imx6.
- Implement the same public interface in imx51 and imx6 iomux
- The iomux driver is no longer optional, remove it from kernel configs.
- Implement the imx_iomux_get/set_gpr() interface for imx6.
- Stop setting the iomux device status to disabled, now that we have a driver.
o Enable GPIO device driver for i.MX6.
It was originally written for i.MX5 and compatible with newer chip.
o Extend device tree information
o style(9) fixes
o Rename gpio driver file.