• Zixuan Wang's avatar
    x86 UEFI: Boot from UEFI · ad5fb883
    Zixuan Wang authored and Paolo Bonzini's avatar Paolo Bonzini committed
    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-...
    ad5fb883