efi.h (ccc27ae77494252965aedca68588e7457829cfad) | efi.h (0a75561489f534cf2e8f6883e0cf8cdf51c534c5) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_X86_EFI_H 3#define _ASM_X86_EFI_H 4 5#include <asm/fpu/api.h> 6#include <asm/pgtable.h> 7#include <asm/processor-flags.h> 8#include <asm/tlb.h> --- 211 unchanged lines hidden (view full) --- 220efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size, 221 unsigned long descriptor_size, 222 u32 descriptor_version, 223 efi_memory_desc_t *virtual_map, 224 unsigned long systab_phys); 225 226/* arch specific definitions used by the stub code */ 227 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_X86_EFI_H 3#define _ASM_X86_EFI_H 4 5#include <asm/fpu/api.h> 6#include <asm/pgtable.h> 7#include <asm/processor-flags.h> 8#include <asm/tlb.h> --- 211 unchanged lines hidden (view full) --- 220efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size, 221 unsigned long descriptor_size, 222 u32 descriptor_version, 223 efi_memory_desc_t *virtual_map, 224 unsigned long systab_phys); 225 226/* arch specific definitions used by the stub code */ 227 |
228__attribute_const__ bool efi_is_64bit(void); | 228extern const bool efi_is64; |
229 | 229 |
230static inline bool efi_is_64bit(void) 231{ 232 if (IS_ENABLED(CONFIG_EFI_MIXED)) 233 return efi_is64; 234 return IS_ENABLED(CONFIG_X86_64); 235} 236 |
|
230static inline bool efi_is_native(void) 231{ 232 if (!IS_ENABLED(CONFIG_X86_64)) 233 return true; | 237static inline bool efi_is_native(void) 238{ 239 if (!IS_ENABLED(CONFIG_X86_64)) 240 return true; |
234 if (!IS_ENABLED(CONFIG_EFI_MIXED)) 235 return true; | |
236 return efi_is_64bit(); 237} 238 239#define efi_mixed_mode_cast(attr) \ 240 __builtin_choose_expr( \ 241 __builtin_types_compatible_p(u32, __typeof__(attr)), \ 242 (unsigned long)(attr), (attr)) 243 --- 142 unchanged lines hidden --- | 241 return efi_is_64bit(); 242} 243 244#define efi_mixed_mode_cast(attr) \ 245 __builtin_choose_expr( \ 246 __builtin_types_compatible_p(u32, __typeof__(attr)), \ 247 (unsigned long)(attr), (attr)) 248 --- 142 unchanged lines hidden --- |