[Skiboot] [PATCH 00/12] little endian skiboot
Nicholas Piggin
npiggin at gmail.com
Sun Sep 29 17:46:39 AEST 2019
This is now complete enough to boot an OpenPOWER POWER9 system with
the basics functioning. Notably absent from the conversion are PHB3,
NPU*, and *CAPI*.
XICS, XICS-on-XIVE, KVM, VAS, and niche features have not been tested
yet, but at this point it's complete enough that it's easy to work on
and improve so I think it is ready for proper submission now.
A few reasons for this:
- The rest of the software is moving (moved) to LE. BE is still
supported, but the fact is LE will be better tested from now on in
terms of toolchain.
- ELFv2 ABI is a smaller image, nicer asm code. We can use ELFv2 with BE
but toolchain won't officially support or test it.
- Some levels of OpenPOWER ISA allow a conforming implementation to
implement LE only.
- Less stack usage of ELFv2 facilitates OPAL call convention that uses
the host kernel stack (which is a whole different story but has
benefits).
- Common endian with the host kernel can help with debugging skiboot
with host kernel facilities (like BUG, xmon). We could achieve the
same by teaching kernel about different endianness, but it's more work.
Downside is more cpu_to_be/be_to_cpu sprinkled around, because OPAL
calls, device tree, and most hardware tables are BE. It is more work and
typing, but in some ways I think it makes the code better even for BE
skiboot because it shows what has to be explicit endian format. It also
only took me a few days of hacking to make it work despite not knowing
anything about the hardware and in-memory tables etc, so I think it
should be easy for those who actually understand it.
Thanks,
Nick
Nicholas Piggin (12):
capp: fix endian conversion
cpu: use dt accessor device tree access
opal-api: add endian conversions to most opal calls
spira: fix endian conversions in spira data structures
fixup_spira remove incorrect endian conversion
naca: move naca definition from asm to C
io: endian conversions for io accessors
xive: make endian-clean
phb4: make endian-clean
occ sensors: make endian-clean
memconsole: make endian-clean
add little endian support
Makefile.main | 38 ++-
asm/asm-offsets.c | 2 -
asm/cvc_entry.S | 39 +--
asm/head.S | 129 ++++----
core/console.c | 41 ++-
core/cpu.c | 26 +-
core/device.c | 1 +
core/fdt.c | 4 +-
core/init.c | 1 +
core/interrupts.c | 12 +-
core/ipmi-opal.c | 6 +-
core/pci-opal.c | 80 ++++-
core/pci.c | 28 +-
core/powercap.c | 12 +-
core/psr.c | 12 +-
core/sensor.c | 32 +-
hdata/Makefile.inc | 2 +-
hdata/fsp.c | 7 +-
hdata/hdata.h | 2 +
hdata/iohub.c | 20 +-
hdata/memory.c | 3 +-
hdata/naca.c | 37 +++
hdata/naca.h | 58 ++++
hdata/paca.c | 10 +-
hdata/spira.c | 68 ++--
hdata/spira.h | 2 +
hw/capp.c | 2 +-
hw/fake-rtc.c | 9 +-
hw/fsp/fsp-console.c | 26 +-
hw/fsp/fsp-rtc.c | 20 +-
hw/fsp/fsp-sysparam.c | 4 +-
hw/imc.c | 4 +-
hw/ipmi/ipmi-rtc.c | 6 +-
hw/lpc-rtc.c | 6 +-
hw/lpc-uart.c | 16 +-
hw/lpc.c | 6 +-
hw/npu2-opencapi.c | 10 +-
hw/occ-sensor.c | 100 +++---
hw/occ.c | 24 +-
hw/phb4.c | 220 +++++++------
hw/psi.c | 8 +-
hw/vas.c | 7 +-
hw/xive.c | 386 ++++++++++++-----------
hw/xscom.c | 19 +-
include/asm-utils.h | 17 +
include/console.h | 22 +-
include/cpu.h | 3 +
include/elf.h | 4 +
include/io.h | 72 ++++-
include/mem-map.h | 2 +
include/occ.h | 50 +--
include/phb4.h | 2 +-
include/xive.h | 50 +--
libflash/ipmi-hiomap.c | 18 +-
libflash/mbox-flash.c | 18 +-
libpore/p9_cpu_reg_restore_instruction.H | 23 +-
libstb/cvc.c | 2 +-
platforms/ibm-fsp/common.c | 4 +-
platforms/ibm-fsp/hostservices.c | 12 +-
platforms/mambo/mambo.c | 7 +-
skiboot.lds.S | 5 +
61 files changed, 1135 insertions(+), 721 deletions(-)
create mode 100644 hdata/naca.c
create mode 100644 hdata/naca.h
--
2.23.0
More information about the Skiboot
mailing list