xref: /kvm-unit-tests/lib/x86/asm/setup.h (revision e6f65fa4647a2a9fbaa6a256c32c8b0b2172d166)
1dbd38004SZixuan Wang #ifndef _X86_ASM_SETUP_H_
2dbd38004SZixuan Wang #define _X86_ASM_SETUP_H_
3dbd38004SZixuan Wang 
47e33895dSPaolo Bonzini unsigned long setup_tss(u8 *stacktop);
5dbd38004SZixuan Wang 
6ad5fb883SZixuan Wang #ifdef TARGET_EFI
7f20589d6SZixuan Wang #include "x86/acpi.h"
8ad5fb883SZixuan Wang #include "x86/apic.h"
9*e6f65fa4SZixuan Wang #include "x86/processor.h"
10ad5fb883SZixuan Wang #include "x86/smp.h"
11*e6f65fa4SZixuan Wang #include "asm/page.h"
121ae9072eSZixuan Wang #include "efi.h"
13ad5fb883SZixuan Wang 
141ae9072eSZixuan Wang /*
151ae9072eSZixuan Wang  * efi_bootinfo_t: stores EFI-related machine info retrieved by
161ae9072eSZixuan Wang  * setup_efi_pre_boot(), and is then used by setup_efi(). setup_efi() cannot
171ae9072eSZixuan Wang  * retrieve this info as it is called after ExitBootServices and thus some EFI
181ae9072eSZixuan Wang  * resources are not available.
191ae9072eSZixuan Wang  */
201ae9072eSZixuan Wang typedef struct {
211ae9072eSZixuan Wang 	phys_addr_t free_mem_start;
221ae9072eSZixuan Wang 	phys_addr_t free_mem_size;
23f20589d6SZixuan Wang 	struct rsdp_descriptor *rsdp;
241ae9072eSZixuan Wang } efi_bootinfo_t;
251ae9072eSZixuan Wang 
261ae9072eSZixuan Wang void setup_efi_bootinfo(efi_bootinfo_t *efi_bootinfo);
271ae9072eSZixuan Wang void setup_efi(efi_bootinfo_t *efi_bootinfo);
281ae9072eSZixuan Wang efi_status_t setup_efi_pre_boot(unsigned long *mapkey, efi_bootinfo_t *efi_bootinfo);
29*e6f65fa4SZixuan Wang void setup_5level_page_table(void);
30ad5fb883SZixuan Wang #endif /* TARGET_EFI */
31ad5fb883SZixuan Wang 
32dbd38004SZixuan Wang #endif /* _X86_ASM_SETUP_H_ */
33