Skip to content
  1. Feb 01, 2022
  2. Jan 18, 2022
  3. Nov 26, 2021
  4. Oct 31, 2021
    • Zixuan Wang's avatar
      x86 UEFI: Boot from UEFI · ad5fb883
      Zixuan Wang authored
      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: default avatarVarad Gautam <varad.gautam@suse.com>
      Signed-off-by: default avatarVarad Gautam <varad.gautam@suse.com>
      Signed-off-by: default avatarZixuan Wang <zixuanwang@google.com>
      Message-Id: <20211004204931.1537823-6-zxwang42@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ad5fb883
  5. Jul 22, 2021
  6. Jun 10, 2021
  7. Sep 28, 2020
  8. May 18, 2020
  9. Jan 21, 2020
  10. Nov 26, 2018
  11. Jun 13, 2017
  12. Jun 02, 2017
  13. Mar 02, 2017
  14. Jan 12, 2017
  15. Feb 18, 2016
  16. Nov 10, 2015
  17. Jul 30, 2015
  18. Jun 16, 2014
  19. Feb 26, 2014
  20. Mar 04, 2013
  21. Oct 10, 2011
  22. Aug 26, 2010
  23. Aug 03, 2010
Loading