/root/src/xen/xen/include/xen/efi.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef __XEN_EFI_H__ |
2 | | #define __XEN_EFI_H__ |
3 | | |
4 | | #ifndef __ASSEMBLY__ |
5 | | #include <xen/types.h> |
6 | | #endif |
7 | | |
8 | 0 | #define EFI_INVALID_TABLE_ADDR (~0UL) |
9 | | |
10 | | extern unsigned int efi_flags; |
11 | 7 | #define EFI_BOOT 0 /* Were we booted from EFI? */ |
12 | 8 | #define EFI_LOADER 1 /* Were we booted directly from EFI loader? */ |
13 | 2 | #define EFI_RS 2 /* Can we use runtime services? */ |
14 | | |
15 | | /* Add fields here only if they need to be referenced from non-EFI code. */ |
16 | | struct efi { |
17 | | unsigned long mps; /* MPS table */ |
18 | | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ |
19 | | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ |
20 | | unsigned long smbios; /* SM BIOS table */ |
21 | | unsigned long smbios3; /* SMBIOS v3 table */ |
22 | | }; |
23 | | |
24 | | extern struct efi efi; |
25 | | |
26 | | #ifndef __ASSEMBLY__ |
27 | | |
28 | | union xenpf_efi_info; |
29 | | union compat_pf_efi_info; |
30 | | |
31 | | struct xenpf_efi_runtime_call; |
32 | | struct compat_pf_efi_runtime_call; |
33 | | |
34 | | bool efi_enabled(unsigned int feature); |
35 | | void efi_init_memory(void); |
36 | | bool efi_rs_using_pgtables(void); |
37 | | unsigned long efi_get_time(void); |
38 | | void efi_halt_system(void); |
39 | | void efi_reset_system(bool warm); |
40 | | #ifndef COMPAT |
41 | | int efi_get_info(uint32_t idx, union xenpf_efi_info *); |
42 | | int efi_runtime_call(struct xenpf_efi_runtime_call *); |
43 | | #endif |
44 | | int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *); |
45 | | int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *); |
46 | | |
47 | | #endif /* !__ASSEMBLY__ */ |
48 | | |
49 | | #endif /* __XEN_EFI_H__ */ |