On 07/06/2023 4:06 pm, Shawn Anastasio wrote:
> Hello all,
>
> This patch series adds support for building a minimal image
> (head.o-only) for Power ISA 2.07B+ (POWER8+) systems. The first patch
> boots to an infinite loop and the second adds early serial console
> support on pseries VMs, with bare metal support planned next.
>
> Since Xen previously had support for a much older version of the ISA in
> version 3.2.3, we were able to carry over some headers and support
> routines from that version. Unlike that initial port though, this effort
> focuses solely on POWER8+ CPUs that are capable of running in Little
> Endian mode.
>
> With an appropriate powerpc64le-linux-gnu cross-toolchain, the minimal
> image can be built with:
>
> $ make XEN_TARGET_ARCH=ppc64 -C xen openpower_defconfig
> $ make XEN_TARGET_ARCH=ppc64 SUBSYSTEMS=xen -C xen TARGET=ppc64/head.o
>
> The resulting head.o can then be booted in a standard QEMU/pseries VM:
>
> $ qemu-system-ppc64 -M pseries-5.2 -m 256M -kernel xen/ppc64/head.o \
> -vga none -serial mon:stdio -nographic
>
> Thanks,
> Shawn
>
> Shawn Anastasio (3):
> xen: Add files needed for minimal Power build
> xen/ppc: Implement early serial printk on PaPR/pseries
> maintainers: Add PPC64 maintainer
Oh wow - this is a surprise, but certainly a good one.
We've recently done just a similar exercise with RISCV64, starting with
getting cross-compilation and a basic smoke test into our CI.
We use gitlab CI, and one example is
https://gitlab.com/xen-project/xen/-/pipelines/889871648 (search for
riscv64 in amongst all the x86 and ARM).
The configuration is all in tree, in the automation/ directory.
Relevant files to copy/tweak are:
automation/build/archlinux/current-riscv64.dockerfile (x86 cross compile
container)
automation/scripts/qemu-smoke-riscv64.sh (smoke test script)
automation/gitlab-ci/{build,test}.yaml (wire the jobs up)
The smoke test looks on stdout for "All set up" which can be any string
put out via earlyprintk.
If you look around in the Xen tree at bb62c25e3e5c and take the makefile
override's in particular, you should be able to get `make -C xen build`
work without any magic TARGET= overrides, and without most of the
headers you've added in patch 1. The trick is to have a head.S which
doesn't include any files (except the config.h it gets implicitly).
We're still trying to do some re-arranging to the common / arch split to
remove unnecessary boilerplate. Having a set of PPC headers too will
make it easier to spot the rough edges in the current boundary.
Looking to the future, where could XenProject get some real hardware to
put into our CI systems? We'd want to do that in due course.
I see you've nominated yourself as maintainer, which is of course fine.
How much time do you have to put towards this? It is some part of a
full time job, or just your own free time?
Do you have any suggested reading for those of us who are invariably
going to need to learn some of the CPU/platform/architecture details,
but aren't really PPC-literate right now?
Thanks, and welcome.
~Andrew