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

[Xen-devel] [PATCH v2 00/41] Add ACPI support for arm64 on Xen



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 efi table which contains
memory layout (which cannot be passed using ACPI) and rsdp pointer to DOM0.
DOM0 parses dynamic ACPI tables and configure other peripherals.

Patches 1-21 add ACPI support for xen/uefi interface
Patches 22-41 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.

Patches are tested on FVP base model and same binary is working for ACPI as 
well as
device tree.(32 bit is not tested).

ACPI is now configurable via commandline option "acpi".
To boot from ACPI this parameter should be set to "force".

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 : https://git.linaro.org/people/parth.dixit/xen-upstreaming/leg-kernel.git
xen : https://git.linaro.org/people/parth.dixit/xen-upstreaming/xen.git
uefi : 
https://git.linaro.org/people/parth.dixit/xen-acpi-support/linaro-edk2.git

Few workarounds have been made to get it working, these are as follows
1. In Xen interrupts are routed at the boot time with edge/trigger level set to 0
because this information is not available at the time of booting.

2. EFI runtime services are disaled in linux but proper solution has to come 
from linux side.

-------------------------------------------------------
Chanhelog v2
- ACPI configuration is now divided into two patches
- disabling numa is a seperate patch
- build pmstat is a seperate patch
- new patch for emulation io ports for arm in acpi
- refactoring of memory mapping code to arch specific mapping
- added new file boot.c and lib.c for acpi
- merged FADT parsing and modifcation into single patch
- divided smp functions into common and dt specific parts
- added smp support to ACPI
- divided gtdt functions to common and dt specific parts
- cleared el2 fields before passing to dom0
- refactored acpi parse entries
- refactored gic into common and dt specific parts
- added new framework for initializing acpi devices
- modified GICH and ICV values which are not relevant to Dom0
- renamed dt-uart.c to arm-uart.c
- refctored pl011 init
- added initrd support to dt stub
- new function to add efi node
- added new efi structures to common efi file
- marked ACPI memory in dom0 as reserved
- added new functions for estimating efi size
- added new function to dynamically map mmio's
- changed function names from map_acpi to prepare_acpi
- added new function for calculating crc32 by Igor Pavlov
- memory and rsdp is passed via efi table
- added new acpi parameter which needs to be set to enable acpi
- enabled efi 
-------------------------------------------


Naresh Bhat (3):
  arm/acpi: Build numa for x86 only
  arm/acpi : Print GIC information when MADT is parsed
  xen: arm64: Add ACPI support

Parth Dixit (38):
  arm/acpi: Build pmstat for x86 only
  arm/acpi : emulate io ports for arm
  arm/acpi : add arm specific acpi header file
  acpi : add helper function for mapping memory
  arm/acpi : Add basic ACPI initialization
  arm/acpi : Introduce ARM Boot Architecture Flags in      FADT
  arm/acpi : Parse FADT table and get PSCI flags
  arm/acpi : Add Generic Interrupt and Distributor struct
  arm/acpi : add GTDT support updated by ACPI 5.1
  arm : move dt specific code in smp to seperate      functions
  arm/acpi : parse MADT to map logical cpu to MPIDR and      get
    cpu_possible_map
  arm : acpi add helper function for setting interrupt      type
  arm : acpi parse GTDT to initialize timer
  acpi : Introduce acpi_parse_entries
  arm : refactor gic into generic and dt specific parts
  arm: Introduce a generic way to use a device from acpi
  arm : acpi Add GIC specific ACPI boot support
  arm : create generic uart initialization function
  arm : acpi Initialize serial port from ACPI SPCR table
  arm : acpi create min DT stub for DOM0
  arm : acpi create chosen node for DOM0
  arm : acpi create efi node for DOM0
  arm : acpi add status override table
  arm : acpi add xen environment table
  arm : add helper functions to map memory regions
  arm : acpi add efi structures to common efi header
  arm : acpi read acpi memory info from uefi
  arm : acpi add placeholder for acpi load address
  arm : acpi estimate memory required for acpi/efi tables
  arm : acpi dynamically map mmio regions
  arm : acpi prepare acpi tables for dom0
  arm : acpi create and map acpi tables
  arm : acpi add helper function to calculate crc32
  arm : acpi pass rsdp and memory via efi table
  arm : acpi add acpi parameter to enable/disable acpi
  arm : acpi enable efi for acpi
  arm : acpi configure interrupts dynamically
  arm : acpi route irq's at time of boot

 config/arm64.mk                |   1 +
 xen/arch/arm/Makefile          |   1 +
 xen/arch/arm/acpi/Makefile     |   2 +
 xen/arch/arm/acpi/boot.c       | 279 +++++++++++++++++++++
 xen/arch/arm/acpi/lib.c        |  31 +++
 xen/arch/arm/arm64/smpboot.c   |  12 +-
 xen/arch/arm/device.c          |  19 ++
 xen/arch/arm/domain_build.c    | 551 ++++++++++++++++++++++++++++++++++++++++-
 xen/arch/arm/efi/efi-boot.h    |  20 +-
 xen/arch/arm/gic-v2.c          | 143 ++++++++++-
 xen/arch/arm/gic.c             |  23 +-
 xen/arch/arm/irq.c             |  17 ++
 xen/arch/arm/kernel.c          |   5 +-
 xen/arch/arm/kernel.h          |   1 +
 xen/arch/arm/p2m.c             |  26 ++
 xen/arch/arm/psci.c            |  16 ++
 xen/arch/arm/setup.c           |  43 +++-
 xen/arch/arm/smpboot.c         |  33 ++-
 xen/arch/arm/time.c            |  38 ++-
 xen/arch/arm/traps.c           |  51 +++-
 xen/arch/arm/vgic.c            |  18 ++
 xen/arch/arm/xen.lds.S         |   7 +
 xen/arch/x86/acpi/lib.c        |  15 ++
 xen/common/efi/boot.c          |   2 +
 xen/common/efi/runtime.c       |   2 +-
 xen/common/sysctl.c            |   2 +
 xen/drivers/acpi/Makefile      |   4 +-
 xen/drivers/acpi/osl.c         |  11 +-
 xen/drivers/acpi/tables.c      |  99 ++++++--
 xen/drivers/char/Makefile      |   2 +-
 xen/drivers/char/arm-uart.c    | 136 ++++++++++
 xen/drivers/char/dt-uart.c     | 107 --------
 xen/drivers/char/pl011.c       |  96 +++++--
 xen/include/acpi/actbl.h       |  10 +-
 xen/include/acpi/actbl1.h      |  62 ++++-
 xen/include/acpi/actbl2.h      |  39 +++
 xen/include/acpi/actbl3.h      |  92 +++++--
 xen/include/asm-arm/acpi.h     |  95 +++++++
 xen/include/asm-arm/arm64/io.h |  14 ++
 xen/include/asm-arm/config.h   |   5 +
 xen/include/asm-arm/device.h   |  30 +++
 xen/include/asm-arm/irq.h      |   2 +
 xen/include/asm-arm/p2m.h      |  10 +
 xen/include/asm-arm/setup.h    |   1 +
 xen/include/xen/acpi.h         |  10 +
 xen/include/xen/efi.h          |  67 ++++-
 xen/include/xen/serial.h       |   3 +-
 47 files changed, 2038 insertions(+), 215 deletions(-)
 create mode 100644 xen/arch/arm/acpi/Makefile
 create mode 100644 xen/arch/arm/acpi/boot.c
 create mode 100644 xen/arch/arm/acpi/lib.c
 create mode 100644 xen/drivers/char/arm-uart.c
 delete mode 100644 xen/drivers/char/dt-uart.c
 create mode 100644 xen/include/asm-arm/acpi.h

-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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