public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Eric Auger <eric.auger@redhat.com>,
	Andrew Jones <drjones@redhat.com>,
	Philippe Mathieu-Daude <philmd@redhat.com>,
	Julien Grall <julien.grall@linaro.org>
Subject: [PATCH 0/5] ArmPkg, ArmVirtPkg: lift 40-bit IPA space limit
Date: Fri, 23 Nov 2018 13:14:26 +0100	[thread overview]
Message-ID: <20181123121431.22353-1-ard.biesheuvel@linaro.org> (raw)

The ArmVirtQemu targets currently limit the size of the IPA space to
40 bits because that is all what KVM supports. However, this is about
to change, and so we need to update the code if we want to ensure that
our UEFI firmware builds can keep running on systems that set values
other than 40 (which could be > 40 or < 40)

So add a helper to ArmLib to read the number of supported address bits (#1)
and take this into account in the page table code (#2), which allows
PcdPrePiCpuMemorySize to assume a value that exceeds the capabilities of
the CPU.

Patch #3 is mostly a cleanup patch, to switch to the new helper added in
patch #1. No functional changes intended.

Patch #4 builds the CPU hob (and thus declares the size of the GCD memory
space) based on the CPU capabilities rather than the value of 
PcdPrePiCpuMemorySize, to prevent any potential regressions in memory
utilization when we bump PcdPrePiCpuMemorySize back to 48.

Patch #5 drops the definitions of PcdPrePiCpuMemorySize, reverting its
value back to the default 48.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>
Cc: Philippe Mathieu-Daude <philmd@redhat.com>
Cc: Julien Grall <julien.grall@linaro.org>

Ard Biesheuvel (5):
  ArmPkg/ArmLib: add support for reading the max physical address space
    size
  ArmPkg/ArmMmuLib: take the CPU supported maximum PA space into account
  ArmVirtPkg: refactor reading of the physical address space size
  ArmVirtPkg: disregard PcdPrePiCpuMemorySize PCD when sizing the GCD
    space
  ArmVirtPkg: revert PcdPrePiCpuMemorySize to is default value of 48

 ArmPkg/Include/Library/ArmLib.h               |  6 +++
 ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 16 ++++++++
 ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S     |  8 ++++
 .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |  5 ++-
 ArmVirtPkg/ArmVirtQemu.dsc                    |  5 ---
 ArmVirtPkg/ArmVirtQemu.fdf                    |  1 -
 ArmVirtPkg/ArmVirtQemuKernel.dsc              |  4 --
 .../Include/Library/ArmVirtMemInfoLib.h       |  1 +
 .../ArmVirtMemoryInitPeiLib.c                 |  7 +++-
 .../ArmVirtMemoryInitPeiLib.inf               |  1 +
 .../QemuVirtMemInfoLib/AArch64/PhysAddrTop.S  | 39 -------------------
 .../QemuVirtMemInfoLib/Arm/PhysAddrTop.S      | 24 ------------
 .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.c   |  6 +--
 .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf |  7 ----
 .../QemuVirtMemInfoPeiLib.inf                 |  7 ----
 .../XenVirtMemInfoLib/AArch64/PhysAddrTop.S   | 39 -------------------
 .../XenVirtMemInfoLib/Arm/PhysAddrTop.S       | 24 ------------
 .../XenVirtMemInfoLib/XenVirtMemInfoLib.c     |  8 +---
 .../XenVirtMemInfoLib/XenVirtMemInfoLib.inf   |  6 ---
 .../PrePi/ArmVirtPrePiUniCoreRelocatable.inf  |  3 --
 ArmVirtPkg/PrePi/PrePi.c                      |  3 --
 21 files changed, 46 insertions(+), 174 deletions(-)
 delete mode 100644 ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S
 delete mode 100644 ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S
 delete mode 100644 ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S
 delete mode 100644 ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S

-- 
2.17.1



             reply	other threads:[~2018-11-23 12:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 12:14 Ard Biesheuvel [this message]
2018-11-23 12:14 ` [PATCH 1/5] ArmPkg/ArmLib: add support for reading the max physical address space size Ard Biesheuvel
     [not found]   ` <20181123131631.ionb53xqzlyepaue@hawk.localdomain>
2018-11-23 13:20     ` Ard Biesheuvel
2018-11-23 13:23       ` Ard Biesheuvel
2018-11-25 17:21       ` Laszlo Ersek
2018-11-26 11:46   ` Ard Biesheuvel
2018-11-26 18:17     ` Philippe Mathieu-Daudé
2018-11-23 12:14 ` [PATCH 2/5] ArmPkg/ArmMmuLib: take the CPU supported maximum PA space into account Ard Biesheuvel
2018-11-26  9:42   ` Laszlo Ersek
2018-11-26  9:46     ` Laszlo Ersek
2018-11-26 10:06     ` Laszlo Ersek
2018-11-26 11:43     ` Ard Biesheuvel
2018-11-26 17:45   ` Leif Lindholm
2018-11-26 17:50     ` Ard Biesheuvel
2018-11-26 17:57       ` Leif Lindholm
2018-11-23 12:14 ` [PATCH 3/5] ArmVirtPkg: refactor reading of the physical address space size Ard Biesheuvel
2018-11-26 10:00   ` Laszlo Ersek
2018-11-26 11:44     ` Ard Biesheuvel
2018-11-23 12:14 ` [PATCH 4/5] ArmVirtPkg: disregard PcdPrePiCpuMemorySize PCD when sizing the GCD space Ard Biesheuvel
2018-11-26 10:47   ` Laszlo Ersek
2018-11-26 11:59     ` Ard Biesheuvel
2018-11-23 12:14 ` [PATCH 5/5] ArmVirtPkg: revert PcdPrePiCpuMemorySize to is default value of 48 Ard Biesheuvel
     [not found]   ` <20181123133553.4o6rcbmebggn2ne7@hawk.localdomain>
2018-11-23 13:45     ` Ard Biesheuvel
2018-11-26 10:58   ` Laszlo Ersek
2018-11-25 17:23 ` [PATCH 0/5] ArmPkg, ArmVirtPkg: lift 40-bit IPA space limit Laszlo Ersek
2018-11-26  9:35 ` Laszlo Ersek
2018-11-26 10:22 ` Laszlo Ersek
2018-11-26 11:31   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181123121431.22353-1-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox