mbox series

[0/3] xen/ppc: Add early Radix MMU support

Message ID cover.1690582001.git.sanastasio@raptorengineering.com (mailing list archive)
Headers show
Series xen/ppc: Add early Radix MMU support | expand

Message

Shawn Anastasio July 28, 2023, 10:21 p.m. UTC
Hello all,

This series adds support for bringing up the Radix MMU with basic
identity-mapped page tables.

In order to simplify the memory layout, the series changes XEN_VIRT
_START to 0xC000_0000_0000_0000, which has a couple of convenient
properties. When the MMU is off, the top 4 address bits are ignored by
the hardware, so this is equivalent to physical address 0.  When the MMU
is enabled, the top 4 address bits are used to select the memory
quadrant, and 0xC corresponds to quadrant 3 which is used for kernel
memory. Thus, by linking the kernel here and ensuring its physical load
address is 0x0, we are able to run at the correct address both before
and after the MMU is enabled.

Additionally, as the Radix MMU was only added in ISA 3.0 (POWER9), this
series also drops support for POWER8 for now, to avoid having a
non-working build configuration in-tree.

Thanks,
Shawn

Shawn Anastasio (3):
  xen/ppc: Bump minimum target ISA to 3.0 (POWER9)
  xen/ppc: Relocate kernel to physical address 0 on boot
  xen/ppc: Implement initial Radix MMU support

 xen/arch/ppc/Kconfig                 |   7 +-
 xen/arch/ppc/Makefile                |   2 +
 xen/arch/ppc/arch.mk                 |   1 -
 xen/arch/ppc/include/asm/bitops.h    |  11 ++
 xen/arch/ppc/include/asm/mm.h        |  19 ++
 xen/arch/ppc/include/asm/page-bits.h |   3 +-
 xen/arch/ppc/include/asm/page.h      | 178 ++++++++++++++++++
 xen/arch/ppc/include/asm/processor.h |  31 ++++
 xen/arch/ppc/include/asm/regs.h      | 138 ++++++++++++++
 xen/arch/ppc/include/asm/types.h     |   1 +
 xen/arch/ppc/mm-radix.c              | 268 +++++++++++++++++++++++++++
 xen/arch/ppc/opal.c                  |   2 +
 xen/arch/ppc/ppc64/head.S            |  42 +++++
 xen/arch/ppc/setup.c                 |   4 +
 xen/arch/ppc/tlb-radix.c             |  95 ++++++++++
 15 files changed, 794 insertions(+), 8 deletions(-)
 create mode 100644 xen/arch/ppc/include/asm/bitops.h
 create mode 100644 xen/arch/ppc/include/asm/mm.h
 create mode 100644 xen/arch/ppc/include/asm/page.h
 create mode 100644 xen/arch/ppc/include/asm/regs.h
 create mode 100644 xen/arch/ppc/mm-radix.c
 create mode 100644 xen/arch/ppc/tlb-radix.c

--
2.30.2