freebsd-dev/stand
Leandro Lupori 83e356c3c9 [PPC64] Implement CAS
Guest PPC OSs running under a hypervisor may communicate the features they
support, in order for the hypervisor to expose a virtualized machine in the way
the client (guest OS) expects (see LoPAPR 1.1 - B.6.2.3).

This is done by calling the "/ibm,client-architecture-support" (CAS) method,
informing supported features in option vectors.  Until now, FreeBSD wasn't
using CAS, but instead relied on hypervisor/QEMU's defaults.

The problem is that, without CAS, it is very inconvenient to run POWER9 VMs on
a POWER9 host running with radix enabled.  This happens because, in this case,
the QEMU default is to present the guest OS a dual MMU (HPT/RPT), instead of
presenting a regular HPT MMU, as FreeBSD expects, resulting in an early panic.
The known workarounds required either changing the host to disable radix or
passing a flag to QEMU to run in a POWER8 compatible mode.

With CAS, FreeBSD is now able to communicate that it wants an HPT MMU,
independent of the host setup, which now makes FreeBSD work on POWER9/pseries,
with KVM enabled and without hugepages (support added in a previous commit).

As CAS is invoked through OpenFirmware's call-method interface, it needs to be
performed early, when OpenFirmware is still operational. Besides, now that FDT
is the default way to inspect the device tree on PPC, OFW call-method feature
will be unavailable by default, when control is passed to the kernel. Because
of this, the call to CAS is being performed at the loader, instead of at the
kernel.

To avoid regressions with old platforms, this change uses CAS only on
POWER8/POWER9.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D20827
2019-07-31 20:31:36 +00:00
..
arm Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
arm64 No need to make objects here. 2018-04-27 22:15:18 +00:00
common loader: ignore some variable settings if input unverified 2019-07-17 23:33:14 +00:00
defaults Enable lualoader's kernel autodetection, disabled on install media 2018-10-11 17:17:54 +00:00
efi Fix EFI loader build when LOADER_NET_SUPPORT=no. 2019-07-30 14:54:18 +00:00
fdt loader: Add pnp functions for autoloading modules based on linker.hints 2019-05-23 19:26:50 +00:00
ficl ficl pfopen: verify file 2019-05-24 19:43:38 +00:00
ficl32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
forth Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
i386 Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
kshim A more definitions to kernel emulation shim in order to build stand/usb. 2018-02-07 18:50:36 +00:00
liblua Enable veriexec for loader 2019-02-26 06:22:10 +00:00
liblua32 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
libsa Allow efi loader to get network params from uboot 2019-07-12 00:54:20 +00:00
libsa32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
lua lualoader: Fix up some luacheck concerns 2019-03-26 02:35:58 +00:00
man Improve formatting. 2018-08-15 11:39:13 +00:00
mips Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
ofw [PPC] Fix loader input with newer QEMU versions 2019-06-19 11:37:43 +00:00
powerpc [PPC64] Implement CAS 2019-07-31 20:31:36 +00:00
sparc64 MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernel 2019-01-05 22:45:20 +00:00
uboot stand: refactor overlay loading a little bit 2019-04-11 13:26:28 +00:00
usb Distinguish between "no partition" and "choose best partition" with a constant. 2019-03-24 18:51:52 +00:00
userboot Distinguish between "no partition" and "choose best partition" with a constant. 2019-03-24 18:51:52 +00:00
defs.mk Move inclusion of src.opts.mk later. 2018-12-03 17:51:10 +00:00
fdt.mk
ficl.mk ficl pfopen: verify file 2019-05-24 19:43:38 +00:00
loader.mk Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
lua.mk Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
Makefile Move ZFS files into libsa 2018-07-08 07:42:49 +00:00
Makefile.amd64 Create LOADER_UBOOT, and LOADER_OFW. Move these options out of 2018-03-01 19:50:55 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
uboot.mk Unify metadata load files for arm, mips, powerpc, sparc64 2018-02-13 03:44:50 +00:00