xref: /kvm-unit-tests/lib/x86/asm/setup.h (revision 1ae9072e800c1675f84778946f24e060abd0d845)
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/apic.h"
8 #include "x86/smp.h"
9 #include "efi.h"
10 
11 /*
12  * efi_bootinfo_t: stores EFI-related machine info retrieved by
13  * setup_efi_pre_boot(), and is then used by setup_efi(). setup_efi() cannot
14  * retrieve this info as it is called after ExitBootServices and thus some EFI
15  * resources are not available.
16  */
17 typedef struct {
18 	phys_addr_t free_mem_start;
19 	phys_addr_t free_mem_size;
20 } efi_bootinfo_t;
21 
22 void setup_efi_bootinfo(efi_bootinfo_t *efi_bootinfo);
23 void setup_efi(efi_bootinfo_t *efi_bootinfo);
24 efi_status_t setup_efi_pre_boot(unsigned long *mapkey, efi_bootinfo_t *efi_bootinfo);
25 #endif /* TARGET_EFI */
26 
27 #endif /* _X86_ASM_SETUP_H_ */
28