xref: /kvm-unit-tests/lib/x86/asm/setup.h (revision 350bf64a67f6b00edf466363c47c7d0ef1c3c52b)
1 #ifndef _X86_ASM_SETUP_H_
2 #define _X86_ASM_SETUP_H_
3 
4 unsigned long setup_tss(u8 *stacktop);
5 
6 #ifdef TARGET_EFI
7 #include "x86/acpi.h"
8 #include "x86/apic.h"
9 #include "x86/processor.h"
10 #include "x86/smp.h"
11 #include "asm/page.h"
12 #include "efi.h"
13 #include "x86/amd_sev.h"
14 
15 /*
16  * efi_bootinfo_t: stores EFI-related machine info retrieved by
17  * setup_efi_pre_boot(), and is then used by setup_efi(). setup_efi() cannot
18  * retrieve this info as it is called after ExitBootServices and thus some EFI
19  * resources are not available.
20  */
21 typedef struct {
22 	phys_addr_t free_mem_start;
23 	phys_addr_t free_mem_size;
24 	struct rsdp_descriptor *rsdp;
25 } efi_bootinfo_t;
26 
27 void setup_efi_bootinfo(efi_bootinfo_t *efi_bootinfo);
28 void setup_efi(efi_bootinfo_t *efi_bootinfo);
29 efi_status_t setup_efi_pre_boot(unsigned long *mapkey, efi_bootinfo_t *efi_bootinfo);
30 void setup_5level_page_table(void);
31 #endif /* TARGET_EFI */
32 
33 #endif /* _X86_ASM_SETUP_H_ */
34