[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC 00/35] Add ACPI support for arm64 on Xen

From: Parth Dixit <parth.dixit@xxxxxxxxxx>

This patch series adds ACPI support for arm64.
Xen reads static tables described by ACPI standard (5.1) from uefi
and configures timer, gic and uart. ACPI tables are modified to 
enable PSCI, HVC and xen specific information (grant table and 
event channel interrupts) and mapped into dom0 address space.
A skeleton device tree is created to pass memory
(which cannot be passed using ACPI) and rsdp pointer to DOM0.
DOM0 parses dynamic ACPI tables and configure other peripherals.

- patches 1-19 add ACPI support for xen/uefi interface
- patches 20-35 add ACPI support for xen/dom0 interface
Last patch "xen: arm64: Add ACPI support" enables the support for ACPI
so that individual patches do not affect working xen code base.

Instructions for reproducing the setup and working code base can be found 
in the following repositories
wiki : https://wiki.linaro.org/LEG/Engineering/Xen_boot_on_FVP_ACPI_UEFI
linux : 
xen : https://git.linaro.org/people/parth.dixit/xen-acpi-support/xen.git
uefi : 

Few workarounds have been made to get it working, these are as follows
1. Xen assumes that mmio regions are defined in firmware. It reads 
this information from uefi tables and map's it to dom0 address space.
Right now FVP firmware on which this series has been tested 
does not contains all the mmio regions defined in ACPI supplied by
firmware, to overcome this hard coding of mmio regions is done.

2. Linux is checking if mapped pages belong to ram and when this check 
it maps RAM using ioremap, to overcome this at present this check is 
disabled in linux. 

3. Device specific interrupt information is defined in DSDT tables in ACPI.
Parsing this table is out of scope for xen so it uses dom0 to parse DSDT table
and enables the interrupt dynamically when they are enabled by dom0.

4. Grant table region and event channel interrupts are hard coded right now.

5. RSDP ponter is exposed to dom0 by using "rsdp" node, this node is not yet 
in linux and its name may get changed to "linux,acpi-rsdp" or something else.

Naresh Bhat (22):
  xen: acpi: Build numa and pmstate x86 only
  xen: arm64: ACPI: Support common ACPI drivers
  xen: arm64: ACPI: Add basic ACPI initialization
  ACPI / ACPICA: Introduce ARM Boot Architecture Flags in      FADT
  ARM64 / ACPI: Parse FADT table to get PSCI flags
  ACPI: Add Generic Interrupt and Distributor struct
  ACPI / ACPICA: Add new features for MADT which      introduced by ACPI
  ACPI / table: Print GIC information when MADT is parsed
  Add cpumask_next_zero set_cpu_present and possible
  asm / arm: Introduce cputype.h
  ARM64 / ACPI: Parse MADT to map logical cpu to MPIDR      and get
  ARM64: Initialization of cpu_logical_map(0)
  ACPI: Introduce acpi_parse_entries
  ACPI / ACPICA: Add GTDT support updated by ACPI 5.1
  ARM64 / ACPI: Define ACPI_IRQ_MODEL_GIC needed for arm
  ARM64 / ACPI: Parse GTDT to initialize timer
  pl011: Initialize serial from ACPI SPCR table
  ACPI / GICv2: Add GIC specific ACPI boot support
  xen/arm: Prepare a min DT for DOM0
  xen/arm: Create memory node for DOM0
  xen/arm: Create chosen node for DOM0
  xen: arm64: Add ACPI support

Parth Dixit (13):
  arm : add helper function for setting interrupt type
  arm: acpi add status override table
  arm : acpi add xen environment table
  arm: acpi add helper functions to map memory regions
  arm : acpi read mmio tables from uefi
  arm: acpi map mmio regions to dom0
  arm: acpi map acpi tables in dom0
  arm : acpi enable PSCI and hvc in acpi FADT table
  arm : acpi map XSDT table to dom0
  arm : acpi map status override table to dom0
  arm : acpi map xen environment table to dom0
  arm : acpi enable efi for acpi
  arm : acpi workarounds for firmware/linux dependencies

 config/arm64.mk                       |   1 +
 xen/arch/arm/arm64/Makefile           |   1 +
 xen/arch/arm/arm64/acpi/Makefile      |   1 +
 xen/arch/arm/arm64/acpi/arm-core.c    | 508 ++++++++++++++++++++++++++++++++++
 xen/arch/arm/domain_build.c           | 294 +++++++++++++++++++-
 xen/arch/arm/efi/efi-boot.h           |  16 ++
 xen/arch/arm/gic-v2.c                 | 271 ++++++++++++++++++
 xen/arch/arm/irq.c                    |  19 ++
 xen/arch/arm/p2m.c                    |  24 ++
 xen/arch/arm/setup.c                  |  36 ++-
 xen/arch/arm/time.c                   |  66 +++++
 xen/arch/arm/vgic.c                   |  16 ++
 xen/common/cpu.c                      |  18 ++
 xen/common/efi/runtime.c              |   6 +
 xen/common/sysctl.c                   |   2 +
 xen/drivers/acpi/Makefile             |   4 +-
 xen/drivers/acpi/osl.c                |  13 +-
 xen/drivers/acpi/tables.c             | 110 +++++++-
 xen/drivers/acpi/utilities/utglobal.c |   1 +
 xen/drivers/char/pl011.c              |  69 +++++
 xen/include/acpi/actbl.h              |  12 +-
 xen/include/acpi/actbl1.h             |  61 +++-
 xen/include/acpi/actbl2.h             |  36 +++
 xen/include/acpi/actbl3.h             |  90 +++++-
 xen/include/asm-arm/acpi.h            | 113 ++++++++
 xen/include/asm-arm/arm64/page.h      |   2 +
 xen/include/asm-arm/config.h          |   5 +
 xen/include/asm-arm/cputype.h         |  83 ++++++
 xen/include/asm-arm/irq.h             |   4 +
 xen/include/asm-arm/p2m.h             |  10 +
 xen/include/asm-arm/setup.h           |   1 +
 xen/include/xen/acpi.h                |  20 ++
 xen/include/xen/cpumask.h             |  40 +++
 xen/include/xen/serial.h              |   1 +
 xen/include/xen/time.h                |   1 +
 35 files changed, 1929 insertions(+), 26 deletions(-)
 create mode 100644 xen/arch/arm/arm64/acpi/Makefile
 create mode 100644 xen/arch/arm/arm64/acpi/arm-core.c
 create mode 100644 xen/include/asm-arm/acpi.h
 create mode 100644 xen/include/asm-arm/cputype.h


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.