a6c2507d bz Jan. 28, 2021, 4:05 p.m.
Implement linux firmware KPI compat code.
This includes: request_firmware() request_firmware_nowait(),
request_firmware_direct(), firmware_request_nowarn(),
and release_firmware().

Given we will try to map requested names from natively ported
or full-linuxkpi-using drivers to a firmware(9) auto-loading
name format (.ko file name and image name matching),
we quieten firmware(9) and print success or failure (unless
the _nowarn() version was called) in the linuxkpi implementation.
At the moment we try up-to 4 different naming combinations,
with path stripped, original name, and requested name with '/'
or '.' replaced.

We do not currently defer loading in the "nowait" case.

Sponsored-by:	The FreeBSD Foundation
Sponsored-by:	Rubicon Communications, LLC ("Netgate")
		(firmware(9) nowarn update from D27413)
MFC after:	3 days
Reviewed by:	kib, manu (looked at older versions)
Differential Revision:	https://reviews.freebsd.org/D27414
b8051298 hselasky Jan. 28, 2021, 1:51 p.m.
This is a regression issue after the new UAR API was introduced
by f8f5b459d21e .

MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
4e76e4c3 andrew Jan. 28, 2021, 10:41 a.m.
This is all code only run on ARMv4 and ARMv5. Support for these have
been dropped from FreeBSD.

Differential Revision:	https://reviews.freebsd.org/D28314
4d2ff233 andrew Jan. 28, 2021, 10:39 a.m.
This was only used when building for ARMv4 or some ARMv5 or when
_STANDALONE is defined. As ARMv4 and ARMv5 support has been removed,
and we only define _STANDALONE in the bootloader where we don't use
this version of memcpy we can remove it.

Differential Revision:	https://reviews.freebsd.org/D28313
e09c8c9a andrew Jan. 28, 2021, 10:33 a.m.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D28312
f59810e3 bapt Jan. 28, 2021, 8:20 a.m.
9b388ac3 tsoome Jan. 28, 2021, 7:52 a.m.
While loading kernel, we check if vt/vbe backend support is included in
kernel and set the tg_kernel_supported flag in gfx_state. unload
command needs to reset this flag to allow next load to perform
this check with new kernel.

Reported by: jhb
0e01ea87 cy Jan. 28, 2021, 5:52 a.m.
MFC after:	3 days
7b08a307 mhorne Jan. 27, 2021, 11:29 p.m.
Make the installer more useful, by allowing it to create a bootable
installation. Also, enable the menu option for ZFS-on-root.

Like arm64, RISC-V boots by UEFI only, so arm64's partedit
implementation is renamed and shared among the two platforms.

Reviewed by:	gjb
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D28180
676b7d07 mhorne Jan. 27, 2021, 11:27 p.m.
If the installer is creating a new ESP, then this directory will not
exist and the subsequent cp will fail silently. This is usually of no
consequence if /efi/freebsd/loader.efi is set up correctly.

Reviewed by:	imp
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D28176
9bae4ce6 mhorne Jan. 27, 2021, 11:19 p.m.
The System Reset extension provides functions to shutdown or reboot the
system via SBI firmware. This newly defined extension supersedes the
functionality of the legacy shutdown extension.

Update the SBI code to use the new System Reset extension when
available, and fall back to the legacy one.

Reviewed By:	kp, jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D28226
a6405133 mhorne Jan. 27, 2021, 11:17 p.m.
Wrap a few lines at 80 columns, which were overlooked in recent commits.
183d6cc0 manu Jan. 27, 2021, 10:31 p.m.
It's not needed anymore.
6e26189b dim Jan. 27, 2021, 9:28 p.m.
On i386, after 6c7a932d0b8baaaee16eca0ba061bfa6e0e57bfd, the vbefb vt
driver was no longer detected by the loader, if any kernel module was
loaded after the kernel itself.

This was caused by the parse_vt_drv_set() function being called multiple
times, resetting the detection flag. (It was called multiple times,
becuase i386 .ko files are shared objects like the kernel proper, while
this is not the case on amd64.)

Fix this by skipping the set_vt_drv_set lookup if vbefb was already

Reviewed by:	tsoome
2fccd4f9 markj Jan. 27, 2021, 8:31 p.m.
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")