2019-01-23 07:56:00 +01:00
|
|
|
config PSERIES
|
|
|
|
bool
|
2019-01-31 14:53:26 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply TEST_DEVICES
|
2019-03-21 15:29:50 +01:00
|
|
|
imply VIRTIO_VGA
|
2021-05-11 17:53:50 +02:00
|
|
|
imply NVDIMM
|
2019-01-31 14:53:26 +01:00
|
|
|
select DIMM
|
|
|
|
select PCI
|
|
|
|
select SPAPR_VSCSI
|
|
|
|
select VFIO if LINUX # needed by spapr_pci_vfio.c
|
2020-12-24 18:22:55 +01:00
|
|
|
select XICS
|
|
|
|
select XIVE
|
2019-03-14 14:13:34 +01:00
|
|
|
select MSI_NONBROKEN
|
2019-12-31 19:32:13 +01:00
|
|
|
select FDT_PPC
|
2019-12-31 19:32:15 +01:00
|
|
|
select CHRP_NVRAM
|
spapr: Implement Open Firmware client interface
The PAPR platform describes an OS environment that's presented by
a combination of a hypervisor and firmware. The features it specifies
require collaboration between the firmware and the hypervisor.
Since the beginning, the runtime component of the firmware (RTAS) has
been implemented as a 20 byte shim which simply forwards it to
a hypercall implemented in qemu. The boot time firmware component is
SLOF - but a build that's specific to qemu, and has always needed to be
updated in sync with it. Even though we've managed to limit the amount
of runtime communication we need between qemu and SLOF, there's some,
and it has become increasingly awkward to handle as we've implemented
new features.
This implements a boot time OF client interface (CI) which is
enabled by a new "x-vof" pseries machine option (stands for "Virtual Open
Firmware). When enabled, QEMU implements the custom H_OF_CLIENT hcall
which implements Open Firmware Client Interface (OF CI). This allows
using a smaller stateless firmware which does not have to manage
the device tree.
The new "vof.bin" firmware image is included with source code under
pc-bios/. It also includes RTAS blob.
This implements a handful of CI methods just to get -kernel/-initrd
working. In particular, this implements the device tree fetching and
simple memory allocator - "claim" (an OF CI memory allocator) and updates
"/memory@0/available" to report the client about available memory.
This implements changing some device tree properties which we know how
to deal with, the rest is ignored. To allow changes, this skips
fdt_pack() when x-vof=on as not packing the blob leaves some room for
appending.
In absence of SLOF, this assigns phandles to device tree nodes to make
device tree traversing work.
When x-vof=on, this adds "/chosen" every time QEMU (re)builds a tree.
This adds basic instances support which are managed by a hash map
ihandle -> [phandle].
Before the guest started, the used memory is:
0..e60 - the initial firmware
8000..10000 - stack
400000.. - kernel
3ea0000.. - initramdisk
This OF CI does not implement "interpret".
Unlike SLOF, this does not format uninitialized nvram. Instead, this
includes a disk image with pre-formatted nvram.
With this basic support, this can only boot into kernel directly.
However this is just enough for the petitboot kernel and initradmdisk to
boot from any possible source. Note this requires reasonably recent guest
kernel with:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df5be5be8735
The immediate benefit is much faster booting time which especially
crucial with fully emulated early CPU bring up environments. Also this
may come handy when/if GRUB-in-the-userspace sees light of the day.
This separates VOF and sPAPR in a hope that VOF bits may be reused by
other POWERPC boards which do not support pSeries.
This assumes potential support for booting from QEMU backends
such as blockdev or netdev without devices/drivers used.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20210625055155.2252896-1-aik@ozlabs.ru>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
[dwg: Adjusted some includes which broke compile in some more obscure
compilation setups]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-06-25 07:51:55 +02:00
|
|
|
select VOF
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config SPAPR_RNG
|
|
|
|
bool
|
2019-01-31 14:53:26 +01:00
|
|
|
default y
|
|
|
|
depends on PSERIES
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config POWERNV
|
|
|
|
bool
|
2019-01-31 14:53:26 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply TEST_DEVICES
|
|
|
|
select ISA_IPMI_BT
|
|
|
|
select IPMI_LOCAL
|
|
|
|
select ISA_BUS
|
|
|
|
select MC146818RTC
|
|
|
|
select XICS
|
|
|
|
select XIVE
|
2019-12-31 19:32:13 +01:00
|
|
|
select FDT_PPC
|
2020-12-24 18:23:03 +01:00
|
|
|
select PCI_POWERNV
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config PPC405
|
|
|
|
bool
|
2019-01-31 14:53:30 +01:00
|
|
|
select M48T59
|
|
|
|
select PFLASH_CFI02
|
|
|
|
select PPC4XX
|
2021-01-08 23:07:38 +01:00
|
|
|
select SERIAL
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config PPC440
|
|
|
|
bool
|
2019-01-31 14:53:30 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply TEST_DEVICES
|
2019-03-16 21:08:12 +01:00
|
|
|
imply E1000_PCI
|
2019-01-31 14:53:30 +01:00
|
|
|
select PCI_EXPRESS
|
|
|
|
select PPC4XX
|
2021-01-08 23:07:38 +01:00
|
|
|
select SERIAL
|
2019-12-31 19:32:13 +01:00
|
|
|
select FDT_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config PPC4XX
|
|
|
|
bool
|
2019-01-31 14:53:29 +01:00
|
|
|
select BITBANG_I2C
|
|
|
|
select PCI
|
2020-12-12 01:15:31 +01:00
|
|
|
select PPC_UIC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config SAM460EX
|
|
|
|
bool
|
2019-12-31 19:32:09 +01:00
|
|
|
select PPC405
|
2019-01-31 14:53:29 +01:00
|
|
|
select PFLASH_CFI01
|
|
|
|
select IDE_SII3112
|
|
|
|
select M41T80
|
|
|
|
select PPC440
|
2021-01-08 23:07:38 +01:00
|
|
|
select SERIAL
|
2019-01-31 14:53:29 +01:00
|
|
|
select SM501
|
|
|
|
select SMBUS_EEPROM
|
|
|
|
select USB_EHCI_SYSBUS
|
|
|
|
select USB_OHCI
|
2021-01-08 23:07:38 +01:00
|
|
|
select FDT_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
2021-03-25 14:50:39 +01:00
|
|
|
config PEGASOS2
|
|
|
|
bool
|
|
|
|
select MV64361
|
|
|
|
select VT82C686
|
|
|
|
select IDE_VIA
|
|
|
|
select SMBUS_EEPROM
|
2021-06-27 18:27:13 +02:00
|
|
|
select VOF
|
2021-03-25 14:50:39 +01:00
|
|
|
# This should come with VT82C686
|
|
|
|
select ACPI_X86
|
|
|
|
|
2019-01-23 07:56:00 +01:00
|
|
|
config PREP
|
|
|
|
bool
|
2019-01-31 14:53:27 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply TEST_DEVICES
|
|
|
|
select CS4231A
|
2021-04-16 18:18:58 +02:00
|
|
|
select RAVEN_PCI
|
2019-01-31 14:53:27 +01:00
|
|
|
select I82378
|
|
|
|
select LSI_SCSI_PCI
|
|
|
|
select M48T59
|
|
|
|
select PC87312
|
|
|
|
select RS6000_MC
|
2019-12-31 19:32:12 +01:00
|
|
|
select FW_CFG_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config RS6000_MC
|
|
|
|
bool
|
|
|
|
|
|
|
|
config MAC_OLDWORLD
|
|
|
|
bool
|
2019-01-31 14:53:28 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply SUNGEM
|
|
|
|
imply TEST_DEVICES
|
|
|
|
select ADB
|
|
|
|
select GRACKLE_PCI
|
|
|
|
select HEATHROW_PIC
|
|
|
|
select MACIO
|
2019-12-31 19:32:12 +01:00
|
|
|
select FW_CFG_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config MAC_NEWWORLD
|
|
|
|
bool
|
2019-01-31 14:53:28 +01:00
|
|
|
imply PCI_DEVICES
|
|
|
|
imply SUNGEM
|
|
|
|
imply TEST_DEVICES
|
|
|
|
select ADB
|
|
|
|
select MACIO
|
|
|
|
select MACIO_GPIO
|
|
|
|
select MAC_PMU
|
|
|
|
select UNIN_PCI
|
2019-12-31 19:32:12 +01:00
|
|
|
select FW_CFG_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config E500
|
|
|
|
bool
|
2019-01-31 14:53:30 +01:00
|
|
|
imply AT24C
|
2019-03-16 21:08:13 +01:00
|
|
|
imply VIRTIO_PCI
|
2019-01-31 14:53:30 +01:00
|
|
|
select ETSEC
|
|
|
|
select OPENPIC
|
|
|
|
select PLATFORM_BUS
|
|
|
|
select PPCE500_PCI
|
|
|
|
select SERIAL
|
2019-12-31 19:32:08 +01:00
|
|
|
select MPC_I2C
|
2019-12-31 19:32:13 +01:00
|
|
|
select FDT_PPC
|
2021-05-13 15:13:54 +02:00
|
|
|
select DS1338
|
2019-01-23 07:56:00 +01:00
|
|
|
|
|
|
|
config VIRTEX
|
|
|
|
bool
|
2019-12-31 19:32:10 +01:00
|
|
|
select PPC4XX
|
2019-01-31 14:53:30 +01:00
|
|
|
select PFLASH_CFI01
|
2021-01-08 23:07:38 +01:00
|
|
|
select SERIAL
|
2019-01-31 14:53:30 +01:00
|
|
|
select XILINX
|
|
|
|
select XILINX_ETHLITE
|
2019-12-31 19:32:13 +01:00
|
|
|
select FDT_PPC
|
2019-01-23 07:56:00 +01:00
|
|
|
|
2019-12-31 19:32:13 +01:00
|
|
|
# Only used by 64-bit targets
|
2019-12-31 19:32:12 +01:00
|
|
|
config FW_CFG_PPC
|
|
|
|
bool
|
2019-12-31 19:32:13 +01:00
|
|
|
|
|
|
|
config FDT_PPC
|
|
|
|
bool
|
spapr: Implement Open Firmware client interface
The PAPR platform describes an OS environment that's presented by
a combination of a hypervisor and firmware. The features it specifies
require collaboration between the firmware and the hypervisor.
Since the beginning, the runtime component of the firmware (RTAS) has
been implemented as a 20 byte shim which simply forwards it to
a hypercall implemented in qemu. The boot time firmware component is
SLOF - but a build that's specific to qemu, and has always needed to be
updated in sync with it. Even though we've managed to limit the amount
of runtime communication we need between qemu and SLOF, there's some,
and it has become increasingly awkward to handle as we've implemented
new features.
This implements a boot time OF client interface (CI) which is
enabled by a new "x-vof" pseries machine option (stands for "Virtual Open
Firmware). When enabled, QEMU implements the custom H_OF_CLIENT hcall
which implements Open Firmware Client Interface (OF CI). This allows
using a smaller stateless firmware which does not have to manage
the device tree.
The new "vof.bin" firmware image is included with source code under
pc-bios/. It also includes RTAS blob.
This implements a handful of CI methods just to get -kernel/-initrd
working. In particular, this implements the device tree fetching and
simple memory allocator - "claim" (an OF CI memory allocator) and updates
"/memory@0/available" to report the client about available memory.
This implements changing some device tree properties which we know how
to deal with, the rest is ignored. To allow changes, this skips
fdt_pack() when x-vof=on as not packing the blob leaves some room for
appending.
In absence of SLOF, this assigns phandles to device tree nodes to make
device tree traversing work.
When x-vof=on, this adds "/chosen" every time QEMU (re)builds a tree.
This adds basic instances support which are managed by a hash map
ihandle -> [phandle].
Before the guest started, the used memory is:
0..e60 - the initial firmware
8000..10000 - stack
400000.. - kernel
3ea0000.. - initramdisk
This OF CI does not implement "interpret".
Unlike SLOF, this does not format uninitialized nvram. Instead, this
includes a disk image with pre-formatted nvram.
With this basic support, this can only boot into kernel directly.
However this is just enough for the petitboot kernel and initradmdisk to
boot from any possible source. Note this requires reasonably recent guest
kernel with:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df5be5be8735
The immediate benefit is much faster booting time which especially
crucial with fully emulated early CPU bring up environments. Also this
may come handy when/if GRUB-in-the-userspace sees light of the day.
This separates VOF and sPAPR in a hope that VOF bits may be reused by
other POWERPC boards which do not support pSeries.
This assumes potential support for booting from QEMU backends
such as blockdev or netdev without devices/drivers used.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20210625055155.2252896-1-aik@ozlabs.ru>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
[dwg: Adjusted some includes which broke compile in some more obscure
compilation setups]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-06-25 07:51:55 +02:00
|
|
|
|
|
|
|
config VOF
|
|
|
|
bool
|