#
abdc5d02 |
| 08-Apr-2025 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: Default to 'max' cpu type and add MTE test
See merge request kvm-unit-tests/kvm-unit-tests!76
|
#
cef98dea |
| 08-Apr-2025 |
Andrew Jones <andrew.jones@linux.dev> |
arm/arm64: efi: Bump number of memregions
When using QEMU's 'max' cpu type additional EFI memory regions are present. Just like riscv's commit f35fe0ee486a ("riscv: efi: Bump number of memregions"),
arm/arm64: efi: Bump number of memregions
When using QEMU's 'max' cpu type additional EFI memory regions are present. Just like riscv's commit f35fe0ee486a ("riscv: efi: Bump number of memregions"), bump the number we allow to ensure we don't hit the assert in memregions_add().
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
201b9e8b |
| 03-Jul-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: LPA2 support and fpu/sve s/r test
See merge request kvm-unit-tests/kvm-unit-tests!61
|
#
4e07d331 |
| 12-Apr-2024 |
Suzuki K Poulose <suzuki.poulose@arm.com> |
arm: Detect FDT overlap with uninitialised data
If the FDT was placed in a region overlapping the bss/stack area, it would have been overwritten at early boot. Assert this never happened to detect t
arm: Detect FDT overlap with uninitialised data
If the FDT was placed in a region overlapping the bss/stack area, it would have been overwritten at early boot. Assert this never happened to detect the case.
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> [Fixed EFI compile error.] Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
611fe6de |
| 18-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: EFI improvements and no more MAX_SMP probing
See merge request kvm-unit-tests/kvm-unit-tests!53
|
#
606a63ad |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm64: efi: Switch to our own stack
We don't want to map EFI_BOOT_SERVICES_DATA regions, so move the stack from its EFI_BOOT_SERVICES_DATA region to EFI_LOADER_CODE, which we always map. We'll still
arm64: efi: Switch to our own stack
We don't want to map EFI_BOOT_SERVICES_DATA regions, so move the stack from its EFI_BOOT_SERVICES_DATA region to EFI_LOADER_CODE, which we always map. We'll still map the stack as R/W instead of R/X because we split EFI_LOADER_CODE regions on the _etext boundary and map addresses before _etext as R/X and the rest as R/W.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
6182cb91 |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm64: efi: Don't map reserved regions
We shouldn't need to map all the regions that the EFI memory map contains. Just map EFI_LOADER_CODE and EFI_LOADER_DATA, since those are for the loaded unit te
arm64: efi: Don't map reserved regions
We shouldn't need to map all the regions that the EFI memory map contains. Just map EFI_LOADER_CODE and EFI_LOADER_DATA, since those are for the loaded unit test, and any region types which could be used by the unit test for its own memory allocations. We still map EFI_BOOT_SERVICES_DATA since the primary stack is on a region of that type. In a later patch we'll switch to a stack we allocate ourselves to drop that one too.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
fa8e5d67 |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm64: Add memregions_efi_init
Provide a memregions function which initialized memregions from an EFI memory map. Add a new memregions flag (MR_F_PERSISTENT) for EFI_PERSISTENT_MEMORY since that typ
arm64: Add memregions_efi_init
Provide a memregions function which initialized memregions from an EFI memory map. Add a new memregions flag (MR_F_PERSISTENT) for EFI_PERSISTENT_MEMORY since that type should not be reserved, but it should also be distinct from conventional memory. The function also points out the largest conventional memory region by returning a pointer to it in the freemem parameter. Immediately apply this function to arm64's efi_mem_init(). riscv will make use of it as well.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
dfccbc76 |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm64: Simplify efi_mem_init
Reduce the EFI mem_map loop to only setting flags and finding the largest free memory region. Then, apply memregions_split() for the code/data region split (which requir
arm64: Simplify efi_mem_init
Reduce the EFI mem_map loop to only setting flags and finding the largest free memory region. Then, apply memregions_split() for the code/data region split (which requires ensuring _etext is page aligned). Finally, do the rest of the things that used to be done in the EFI mem_map loop in a separate mem_region loop.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
b7d2a05b |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm/arm64: Factor out allocator init from mem_init
The allocator init is identical for mem_init() and efi_mem_init(). Share it.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by:
arm/arm64: Factor out allocator init from mem_init
The allocator init is identical for mem_init() and efi_mem_init(). Share it.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
1c9bc97d |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm/arm64: Factor out some initial setup
Factor out some initial setup code into separate functions in order to share more code between setup() and setup_efi().
Reviewed-by: Nikos Nikoleris <nikos.
arm/arm64: Factor out some initial setup
Factor out some initial setup code into separate functions in order to share more code between setup() and setup_efi().
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
48d59524 |
| 02-Feb-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'riscv/initial-port-v3' into 'master'
riscv: Initial port
See merge request kvm-unit-tests/kvm-unit-tests!50
|
#
2479ae50 |
| 19-Jan-2024 |
Andrew Jones <andrew.jones@linux.dev> |
arm/arm64: Share memregions
arm/arm64 (and to a small extent powerpc) have memory regions which get built from hardware descriptions (DT/ACPI/EFI) and then used to build page tables. Move memregions
arm/arm64: Share memregions
arm/arm64 (and to a small extent powerpc) have memory regions which get built from hardware descriptions (DT/ACPI/EFI) and then used to build page tables. Move memregions to common code, tweaking the API a bit at the same time, e.g. change 'mem_region' to 'memregions'. The biggest change is there is now a default number of memory regions which, if too small, should be overridden at setup time with a new init function, memregions_init().
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
e526bc78 |
| 01-Jul-2023 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: EFI support, arm64 backtrace support, PMU test improvements, and more
See merge request kvm-unit-tests/kvm-unit-tests!43
|
#
2e080daf |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
arm64: Use the provided fdt when booting through EFI
This patch uses the fdt pointer provided through efi_bootinfo_t for tests that run as EFI apps. As in Linux, we give priority to the fdt. First,
arm64: Use the provided fdt when booting through EFI
This patch uses the fdt pointer provided through efi_bootinfo_t for tests that run as EFI apps. As in Linux, we give priority to the fdt. First, we check if the pointer to the fdt is set and only if it isn't we fallback to using the ACPI.
In addition, this patches changes the efi run script to generate and use a fdt unless the user has set the enviroment variable EFI_USE_ACPI to 'y'.
As a result:
$> ./arm/efi/run ./arm/selftest.efi -append "setup smp=2 mem=256" -smp 2 -m 256
will use an fdt, where as
$> EFI_USE_ACPI=y ./arm/efi/run ./arm/selftest.efi -append "setup smp=2 mem=256" -smp 2 -m 256
will run relying on ACPI.
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
23e17626 |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
arm64: Add a setup sequence for systems that boot through EFI
This change implements an alternative setup sequence for the system when we are booting through EFI. The memory map is discovered throug
arm64: Add a setup sequence for systems that boot through EFI
This change implements an alternative setup sequence for the system when we are booting through EFI. The memory map is discovered through EFI boot services and devices through ACPI.
This change is based on a change initially proposed by Andrew Jones <drjones@redhat.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Shaoqin Huang <shahuang@redhat.com> [Changed __ALIGN to ALIGN as pointed out by Nadav Amit.] Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
2b9c908e |
| 30-May-2023 |
Andrew Jones <drjones@redhat.com> |
arm/arm64: Rename etext to _etext
Rename etext to the more popular _etext allowing different linker scripts to more easily be used.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: N
arm/arm64: Rename etext to _etext
Rename etext to the more popular _etext allowing different linker scripts to more easily be used.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Ricardo Koller <ricarkol@google.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
3d29f825 |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
arm64: Add support for cpu initialization through ACPI
In systems with ACPI support and when a DT is not provided, we can use the MADTs to discover the number of CPUs and their corresponding MIDR. T
arm64: Add support for cpu initialization through ACPI
In systems with ACPI support and when a DT is not provided, we can use the MADTs to discover the number of CPUs and their corresponding MIDR. This change implements this but retains the default behavior; we check if a valid DT is provided, if not, we try to discover the cores in the system using ACPI.
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Shaoqin Huang <shahuang@redhat.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
bb4c17e3 |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
arm64: Add support for timer initialization through ACPI
For systems with ACPI support, we can discover timers through the ACPI GTDT table. This change implements the code to discover timers through
arm64: Add support for timer initialization through ACPI
For systems with ACPI support, we can discover timers through the ACPI GTDT table. This change implements the code to discover timers through the GTDT and adds ACPI support in timer_save_state. This change retains the default behavior; we check if a valid DT is provided, if not, we try to discover timers using ACPI.
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
74ff0e96 |
| 18-May-2021 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 'arm/queue' into 'master'
arm/arm64: target-efi prep
This series mostly prepares kvm-unit-tests/arm for targeting EFI platforms. The actually EFI support will come in another series, b
Merge branch 'arm/queue' into 'master'
arm/arm64: target-efi prep
This series mostly prepares kvm-unit-tests/arm for targeting EFI platforms. The actually EFI support will come in another series, but these patches are good for removing assumptions from our memory maps and about our PSCI conduit, even if we never merge EFI support.
See merge request kvm-unit-tests/kvm-unit-tests!8
show more ...
|
#
bd5bd157 |
| 06-Apr-2021 |
Andrew Jones <drjones@redhat.com> |
arm/arm64: psci: Don't assume method is hvc
The method can be smc in addition to hvc, and it will be when running on bare metal. Additionally, we move the invocations to assembly so we don't have to
arm/arm64: psci: Don't assume method is hvc
The method can be smc in addition to hvc, and it will be when running on bare metal. Additionally, we move the invocations to assembly so we don't have to rely on compiler assumptions. We also fix the prototype of psci_invoke. function_id should be an unsigned int, not an unsigned long.
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Tested-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
5a2a7371 |
| 06-Apr-2021 |
Andrew Jones <drjones@redhat.com> |
arm/arm64: setup: Consolidate memory layout assumptions
Keep as much memory layout assumptions as possible in init::start and a single setup function. This prepares us for calling setup() from diffe
arm/arm64: setup: Consolidate memory layout assumptions
Keep as much memory layout assumptions as possible in init::start and a single setup function. This prepares us for calling setup() from different start functions which have been linked with different linker scripts. To do this, stacktop is only referenced from init::start, making freemem_start a parameter to setup(). We also split mem_init() into three parts, one that populates the mem regions per the DT, one that populates the mem regions per assumptions, and one that does the mem init. The concept of a primary region is dropped, but we add a sanity check for the absence of memory holes, because we don't know how to deal with them yet.
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Tested-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
c1cd1a2b |
| 12-Oct-2020 |
Andrew Jones <drjones@redhat.com> |
arm/arm64: mmu: Remove memory layout assumptions
Rather than making too many assumptions about the memory layout in mmu code, just set up the page tables per the memory regions (which means putting
arm/arm64: mmu: Remove memory layout assumptions
Rather than making too many assumptions about the memory layout in mmu code, just set up the page tables per the memory regions (which means putting all the memory layout assumptions in setup). To ensure we get the right default flags set we need to split the primary region into two regions for code and data.
We still only expect the primary regions to be present, but the next patch will remove that assumption too.
(Unfortunately we still have an assumption in setup_mmu. We assume the range 3G-4G is available for the virtual memory allocator. We'll need to remove that assumption as well with another patch in order to support arbitrary memory maps.)
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Tested-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
c0edb3d2 |
| 31-Mar-2021 |
Andrew Jones <drjones@redhat.com> |
arm/arm64: Move setup_vm into setup
Consolidate our setup calls to reduce the amount we need to do from init::start. Also remove a couple of pointless comments from setup().
Reviewed-by: Nikos Niko
arm/arm64: Move setup_vm into setup
Consolidate our setup calls to reduce the amount we need to do from init::start. Also remove a couple of pointless comments from setup().
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Tested-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
f583d924 |
| 30-Mar-2021 |
Paolo Bonzini <bonzini@gnu.org> |
Merge branch 'arm/queue' into 'master'
arm/arm64: Fixes, improvements, and prep for target-efi
See merge request kvm-unit-tests/kvm-unit-tests!6
|