This is v4 of the series that adds a platform config to support QEMU based
virtual machines, either in TCG or KVM mode. These virtual machines declare
their platform configuration by passing a device tree which needs to be parsed
by Tianocore rather than relying on hardcoded peripherals.

Currently, the only assumptions made with respect to the platform config are:
- at least 1 MB of DRAM at 0x4000_0000
- NOR flash at 0x0
- PL011 UART at 0x900_0000
- Cortex-A15 CPU (if built for 32-bit ARM)

Peripherals detected at runtime:
- GIC interrupt controller
- timer interrupt line
- PL031 RTC
- system memory size
- virtio MMIO transports

There are some dependencies on QEMU and KVM changes that are not yet upstream:
- QEMU: 'hw/arm/virt: Provide flash devices for boot ROMs'
- QEMU: copy DTB to base of DRAM if no -kernel option is passed
- KVM: 'KVM: Introduce gfn_to_hva_memslot_prot'
- KVM: 'arm/arm64: KVM: Support KVM_CAP_READONLY_MEM'
- KVM: 'arm/arm64: KVM: Complete WFI/WFE instructions'

The code was tested in TCG mode on x64_64 (AArch64, ARM) and in TCG and KVM mode
on a ARMv8 Foundation Model emulator (AArch64 only)

Changes since v3:
- lots of minor style changes, added ASSERT()s, etc.
- added support for 32-bit ARM, the code can now be built with '-t ARM' instead
  of '-t AARCH64' and it will work with QEMU mach-virt/cortex-a15
- eliminate AArch64 references where not appropriate
- added 32-bit ARM .S alternatives where appropriate
- refactor into separate patches for all of the modules that make up the 
  QEMU mach-virt platform implementation
- move everything under ArmPlatformPkg/ArmVirtualizationPkg
- eliminate references to KVM where plain QEMU suffices

Changes since v2:
- fixed *lots* of EDK2 Style Guide violations
- use EFI_D_ERROR only where appropriate
- use ASSERT()s to ensure we are running with at least 128 MB and not executing
  from shadowed NOR flash, and relocate the DTB device tree image earlier so
  we can be confident it does not get clobbered inadvertently
- handle 32-bit PCDs that may get initialized from 64-bit DT nodes more
  consistently, and don't abort the DT traversal if virtio transports fail to
  install

Changes since v1:
- rebased onto upstream GitHub tianocore/edk2.git (421ccda307)
- moved primary FV 0x1000 bytes into flash image, and added jump to it at 0x0
- dropped patch to allow FVs at physical offset 0x0
- dropped patch introducing device config table GUID, and used the upstream one
  instead (EmbeddedPkg/Include/Guid/Fdt.h)
- added 'Contributed-under:' lines to commit logs
- style fixes: remove redundant '== TRUE', add space between function and (
- updated/removed comments related to arch timer PCD and arch timer imask
- use feature PCD to define whether to use the virtual timer



Ard Biesheuvel (15):
  ArmPkg: allow dynamically discovered virtual timer interrupt
  ArmPkg: allow dynamic GIC base addresses
  ArmPlatformPkg/PrePeiCore: remove GIC related PCDs from unicore
  ArmPlatformPkg: allow dynamically discovered PL031 RTC
  ArmPkg,ArmPlatformPkg: allow dynamic PCDs for memory base and size
  ArmPkg: introduce PCD gArmTokenSpaceGuid.PcdDeviceTreeBaseAddress
  ArmPlatformPkg: separate PlatformPei and PlatformPeiLib
  ArmVirtualizationPkg: add Include/ArmPlatform.h
  ArmVirtualizationPkg: add VirtFdtDxe driver
  ArmVirtualizationPkg: add ArmVirtualizationPlatformLib library
  ArmVirtualizationPkg: add ArmVirtualizationPlatformSysConfigLib
    library
  ArmVirtualizationPkg: add PlatformPeiLib library
  ArmVirtualizationPkg: add ResetSystemLib library
  ArmVirtualizationPkg: add driver for QEMU's NOR flash
  ArmVirtualizationPkg: add ArmVirtualizationQemu platform

Michael Casadevall (1):
  ArmPkg/TimerDxe: allow virtual timer to be selected

 ArmPkg/ArmPkg.dec                                  |  34 ++-
 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf                |   4 +-
 ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c          |  37 ++-
 ArmPkg/Drivers/TimerDxe/TimerDxe.c                 |  12 +-
 ArmPkg/Drivers/TimerDxe/TimerDxe.inf               |   4 +-
 ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimer.c   |  74 ++++-
 ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf       |   4 +
 ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf  |   3 +
 ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf    |   3 +
 ArmPkg/Library/ArmLib/ArmV7/ArmV7ArchTimer.c       |  70 ++++-
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf           |   3 +
 ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf      |   3 +
 ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf        |   3 +
 ArmPkg/Library/BdsLib/BdsLib.inf                   |   5 +-
 ArmPlatformPkg/ArmPlatformPkg.dec                  |   9 +-
 .../ArmVirtualizationPkg/ArmVirtualization.dsc.inc | 337 +++++++++++++++++++++
 .../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 247 +++++++++++++++
 .../ArmVirtualizationPkg/ArmVirtualizationQemu.fdf | 314 +++++++++++++++++++
 .../ArmVirtualizationPkg/Include/ArmPlatform.h     |  33 ++
 .../AARCH64/VirtHelper.S                           |  86 ++++++
 .../ArmVirtualizationPlatformLib/ARM/VirtHelper.S  |  81 +++++
 .../ArmVirtualizationPlatformLib.inf               |  60 ++++
 .../Library/ArmVirtualizationPlatformLib/Virt.c    | 151 +++++++++
 .../Library/ArmVirtualizationPlatformLib/VirtMem.c | 107 +++++++
 .../ArmVirtualizationPlatformSysConfigLib.c        |  90 ++++++
 .../ArmVirtualizationPlatformSysConfigLib.inf      |  35 +++
 .../Library/NorFlashQemuLib/NorFlashQemuLib.c      |  63 ++++
 .../Library/NorFlashQemuLib/NorFlashQemuLib.inf    |  35 +++
 .../Library/PlatformPeiLib/PlatformPeiLib.c        |  48 +++
 .../Library/PlatformPeiLib/PlatformPeiLib.inf      |  47 +++
 .../ResetSystemLib/AARCH64/ResetSystemPsci.S       |  40 +++
 .../Library/ResetSystemLib/ARM/ResetSystemPsci.S   |  41 +++
 .../Library/ResetSystemLib/ResetSystemLib.c        |  97 ++++++
 .../Library/ResetSystemLib/ResetSystemLib.inf      |  41 +++
 .../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c   | 261 ++++++++++++++++
 .../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf |  59 ++++
 .../PrePi/PrePiArmPlatformGlobalVariableLib.inf    |   7 +-
 ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf  |   6 +-
 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c      |  16 +-
 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf    |   6 +-
 ArmPlatformPkg/PlatformPei/PlatformPeim.inf        |   2 +-
 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf    |   3 -
 ArmPlatformPkg/PrePi/PeiUniCore.inf                |   6 +-
 43 files changed, 2504 insertions(+), 83 deletions(-)
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization.dsc.inc
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf
 create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Include/ArmPlatform.h
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/AARCH64/VirtHelper.S
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ARM/VirtHelper.S
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ArmVirtualizationPlatformLib.inf
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/VirtMem.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformSysConfigLib/ArmVirtualizationPlatformSysConfigLib.inf
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformPeiLib/PlatformPeiLib.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformPeiLib/PlatformPeiLib.inf
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ResetSystemLib/AARCH64/ResetSystemPsci.S
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ResetSystemLib/ARM/ResetSystemPsci.S
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ResetSystemLib/ResetSystemLib.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/Library/ResetSystemLib/ResetSystemLib.inf
 create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
 create mode 100644 
ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf

-- 
1.8.3.2


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to