#
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
|
#
529ab889 |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
lib/efi: Add support for reading an FDT
This change adds support for reading environment variables. To do so it introduces a new GUID: 97ef3e03-7329-4a6a-b9ba-6c1fdcc5f823 that the user needs to pro
lib/efi: Add support for reading an FDT
This change adds support for reading environment variables. To do so it introduces a new GUID: 97ef3e03-7329-4a6a-b9ba-6c1fdcc5f823 that the user needs to provide when setting environment variables. For example, to set the path to the fdt a user can execute:
In addition, this change add support for reading the fdt into memory and providing a pointer to the test through efi_bootinfo_t.
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> [Ensure DTB pathname is nul-terminated.] Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
92a6c9b9 |
| 18-Jan-2022 |
Paolo Bonzini <pbonzini@redhat.com> |
Merge remote-tracking branch 'upstream/uefi' into master
Merge UEFI test support into the master branch.
|
#
b4e8c300 |
| 31-Oct-2021 |
Zixuan Wang <zxwang42@gmail.com> |
x86 UEFI: Refactor set up process
Refactor the EFI set up process. The previous set up process calls multiple arch-specific functions, now it's simplified to call only one arch-specific function:
1
x86 UEFI: Refactor set up process
Refactor the EFI set up process. The previous set up process calls multiple arch-specific functions, now it's simplified to call only one arch-specific function:
1. (Arch neutral ) Extract EFI data structures, e.g., memory maps 2. (Arch neutral ) Exit EFI boot services 3. (Arch specific) Parse EFI data structures and set up arch-specific resources 4. (Arch neutral ) Run test cases' main functions
Signed-off-by: Zixuan Wang <zxwang42@gmail.com> Message-Id: <20211031055634.894263-3-zxwang42@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
f20589d6 |
| 04-Oct-2021 |
Zixuan Wang <zixuanwang@google.com> |
x86 UEFI: Set up RSDP after UEFI boot up
Root system description pointer (RSDP) is a data structure used in the ACPI programming interface. In BIOS, RSDP is located within a predefined memory area,
x86 UEFI: Set up RSDP after UEFI boot up
Root system description pointer (RSDP) is a data structure used in the ACPI programming interface. In BIOS, RSDP is located within a predefined memory area, so a program can scan the memory area and find RSDP. But in UEFI, RSDP may not appear in that memory area, instead, a program should find it in the EFI system table.
This commit provides RSDP set up code in UEFI: 1. Read RSDP from EFI system table 2. Pass RSDP pointer to find_acpi_table_attr() function
From this commit, the `x86/s3.c` test can run in UEFI and generates similar output as in Seabios, note that: 1. In its output, memory addresses are different than Seabios's, this is because EFI application starts from a dynamic runtime address, not a fixed predefined memory address 2. There is a short delay (~5 secs) after the test case prints "PM1a event registers" line. This test case sleeps for a few seconds and then wakes up, so give it a few seconds to run.
Signed-off-by: Zixuan Wang <zixuanwang@google.com> Message-Id: <20211004204931.1537823-10-zxwang42@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
1ae9072e |
| 04-Oct-2021 |
Zixuan Wang <zixuanwang@google.com> |
x86 UEFI: Set up memory allocator
KVM-Unit-Tests library implements a memory allocator which requires two arguments to set up (See `lib/alloc_phys.c:phys_alloc_init()` for more details): 1. A bas
x86 UEFI: Set up memory allocator
KVM-Unit-Tests library implements a memory allocator which requires two arguments to set up (See `lib/alloc_phys.c:phys_alloc_init()` for more details): 1. A base (start) physical address 2. Size of available memory for allocation
To get this memory info, we scan all the memory regions returned by `LibMemoryMap()`, find out the largest free memory region and use it for memory allocation.
After retrieving this memory info, we call `ExitBootServices` so that KVM-Unit-Tests has full control of the machine, and UEFI will not touch the memory after this point.
Starting from this commit, `x86/hypercall.c` test case can run in UEFI and generates the same output as in Seabios.
Co-developed-by: Varad Gautam <varad.gautam@suse.com> Signed-off-by: Varad Gautam <varad.gautam@suse.com> Signed-off-by: Zixuan Wang <zixuanwang@google.com> Message-Id: <20211004204931.1537823-9-zxwang42@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
ad5fb883 |
| 04-Oct-2021 |
Zixuan Wang <zixuanwang@google.com> |
x86 UEFI: Boot from UEFI
This commit provides initial support for x86 test cases to boot from UEFI:
1. UEFI compiler flags are added to Makefile 2. A new TARGET_EFI macro is added to turn on/
x86 UEFI: Boot from UEFI
This commit provides initial support for x86 test cases to boot from UEFI:
1. UEFI compiler flags are added to Makefile 2. A new TARGET_EFI macro is added to turn on/off UEFI startup code 3. Previous Multiboot setup code is refactored and updated for supporting UEFI, including the following changes: 1. x86/efi/crt0-efi-x86_64.S: provides entry point and jumps to setup code in lib/efi.c. 2. lib/efi.c: performs UEFI setup, calls arch-related setup functions, then jumps to test case main() function 3. lib/x86/setup.c: provides arch-related setup under UEFI
To build test cases for UEFI, please first install the GNU-EFI library. Check x86/efi/README.md for more details.
This commit is tested by a simple test calling report() and report_summayr(). This commit does not include such a test to avoid unnecessary files added into git history. To build and run this test in UEFI (assuming file name is x86/dummy.c):
./configure --target-efi make x86/dummy.efi ./x86/efi/run ./x86/dummy.efi
To use the default Multiboot instead of UEFI:
./configure make x86/dummy.flat ./x86/run ./x86/dummy.flat
Some x86 test cases require additional fixes to work in UEFI, e.g., converting to position independent code (PIC), setting up page tables, etc. This commit does not provide these fixes, so compiling and running UEFI test cases other than x86/dummy.c may trigger compiler errors or QEMU crashes. These test cases will be fixed by the follow-up commits in this series.
The following code is ported from github.com/rhdrjones/kvm-unit-tests - ./configure: 'target-efi'-related code
See original code: - Repo: https://github.com/rhdrjones/kvm-unit-tests - Branch: target-efi
Co-developed-by: Varad Gautam <varad.gautam@suse.com> Signed-off-by: Varad Gautam <varad.gautam@suse.com> Signed-off-by: Zixuan Wang <zixuanwang@google.com> Message-Id: <20211004204931.1537823-6-zxwang42@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|