Move PVTIME down below MMIO_BASE.

This leaves the region between 0x4000_0000 and the start of RAM free of
MMIO, which simplifies the stage 1 page table mappings needed by the
guest, and makes room for the pVM firmware allocation to be expanded.

TEST=tools/dev_container tools/run_tests --target=vm:aarch64

Change-Id: Ibae73a946cadd16e6f03559d23cc256f4b9d3f3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3627454
Commit-Queue: Andrew Walbran <qwandor@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Andrew Walbran 2022-05-04 15:32:55 +01:00 committed by Chromeos LUCI
parent d4bfea4bb9
commit 0465b61b1e
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ const AARCH64_PROTECTED_VM_FW_START: u64 =
AARCH64_PHYS_MEM_START - AARCH64_PROTECTED_VM_FW_MAX_SIZE;
const AARCH64_PVTIME_IPA_MAX_SIZE: u64 = 0x10000;
const AARCH64_PVTIME_IPA_START: u64 = AARCH64_PROTECTED_VM_FW_START - AARCH64_PVTIME_IPA_MAX_SIZE;
const AARCH64_PVTIME_IPA_START: u64 = AARCH64_MMIO_BASE - AARCH64_PVTIME_IPA_MAX_SIZE;
const AARCH64_PVTIME_SIZE: u64 = 64;
// These constants indicate the placement of the GIC registers in the physical

View file

@ -52,11 +52,11 @@ These apply for all boot modes.
| [`SERIAL_ADDR[0]`][serial_addr] | `3f8` | `400` | 8 bytes | Serial port MMIO |
| [`AARCH64_RTC_ADDR`] | `2000` | `3000` | 4 KiB | Real-time clock |
| [`AARCH64_PCI_CFG_BASE`] | `1_0000` | `2_0000` | 64 KiB | PCI configuration (CAM) |
| [`AARCH64_PVTIME_IPA_START`] | `1f0_0000` | `200_0000` | 64 KiB | Paravirtualized time |
| [`AARCH64_MMIO_BASE`] | `200_0000` | `400_0000` | 32 MiB | Low MMIO allocation area |
| [`AARCH64_GIC_CPUI_BASE`] | `3ffd_0000` | `3fff_0000` | 128 KiB | vGIC |
| [`AARCH64_GIC_DIST_BASE`] | `3fff_0000` | `4000_0000` | 64 KiB | vGIC |
| [`AARCH64_AXI_BASE`] | `4000_0000` | | | Seemingly unused? Is this hard-coded somewhere in the kernel? |
| [`AARCH64_PVTIME_IPA_START`] | `7fd0_0000` | `7fe0_0000` | 64 KiB | Paravirtualized time |
| [`AARCH64_PROTECTED_VM_FW_START`] | `7fe0_0000` | `8000_0000` | 2 MiB | pVM firmware (if running a protected VM) |
| [`AARCH64_PHYS_MEM_START`] | `8000_0000` | | --mem size | RAM (starts at IPA = 2 GiB) |
| [`plat_mmio_base`] | after RAM | +0x800000 | 8 MiB | Platform device MMIO region |