diff options
Diffstat (limited to 'include/linux/efi.h')
| -rw-r--r-- | include/linux/efi.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 8b84916dc671..7a9498ab3c2d 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -618,18 +618,30 @@ extern int __init efi_setup_pcdp_console(char *); | |||
| 618 | #endif | 618 | #endif |
| 619 | 619 | ||
| 620 | /* | 620 | /* |
| 621 | * We play games with efi_enabled so that the compiler will, if possible, remove | 621 | * We play games with efi_enabled so that the compiler will, if |
| 622 | * EFI-related code altogether. | 622 | * possible, remove EFI-related code altogether. |
| 623 | */ | 623 | */ |
| 624 | #define EFI_BOOT 0 /* Were we booted from EFI? */ | ||
| 625 | #define EFI_SYSTEM_TABLES 1 /* Can we use EFI system tables? */ | ||
| 626 | #define EFI_CONFIG_TABLES 2 /* Can we use EFI config tables? */ | ||
| 627 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ | ||
| 628 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ | ||
| 629 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ | ||
| 630 | |||
| 624 | #ifdef CONFIG_EFI | 631 | #ifdef CONFIG_EFI |
| 625 | # ifdef CONFIG_X86 | 632 | # ifdef CONFIG_X86 |
| 626 | extern int efi_enabled; | 633 | extern int efi_enabled(int facility); |
| 627 | extern bool efi_64bit; | ||
| 628 | # else | 634 | # else |
| 629 | # define efi_enabled 1 | 635 | static inline int efi_enabled(int facility) |
| 636 | { | ||
| 637 | return 1; | ||
| 638 | } | ||
| 630 | # endif | 639 | # endif |
| 631 | #else | 640 | #else |
| 632 | # define efi_enabled 0 | 641 | static inline int efi_enabled(int facility) |
| 642 | { | ||
| 643 | return 0; | ||
| 644 | } | ||
| 633 | #endif | 645 | #endif |
| 634 | 646 | ||
| 635 | /* | 647 | /* |
