diff options
Diffstat (limited to 'arch/x86/include/asm/mem_encrypt.h')
| -rw-r--r-- | arch/x86/include/asm/mem_encrypt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index c0643831706e..616f8e637bc3 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h | |||
| @@ -48,10 +48,13 @@ int __init early_set_memory_encrypted(unsigned long vaddr, unsigned long size); | |||
| 48 | 48 | ||
| 49 | /* Architecture __weak replacement functions */ | 49 | /* Architecture __weak replacement functions */ |
| 50 | void __init mem_encrypt_init(void); | 50 | void __init mem_encrypt_init(void); |
| 51 | void __init mem_encrypt_free_decrypted_mem(void); | ||
| 51 | 52 | ||
| 52 | bool sme_active(void); | 53 | bool sme_active(void); |
| 53 | bool sev_active(void); | 54 | bool sev_active(void); |
| 54 | 55 | ||
| 56 | #define __bss_decrypted __attribute__((__section__(".bss..decrypted"))) | ||
| 57 | |||
| 55 | #else /* !CONFIG_AMD_MEM_ENCRYPT */ | 58 | #else /* !CONFIG_AMD_MEM_ENCRYPT */ |
| 56 | 59 | ||
| 57 | #define sme_me_mask 0ULL | 60 | #define sme_me_mask 0ULL |
| @@ -77,6 +80,8 @@ early_set_memory_decrypted(unsigned long vaddr, unsigned long size) { return 0; | |||
| 77 | static inline int __init | 80 | static inline int __init |
| 78 | early_set_memory_encrypted(unsigned long vaddr, unsigned long size) { return 0; } | 81 | early_set_memory_encrypted(unsigned long vaddr, unsigned long size) { return 0; } |
| 79 | 82 | ||
| 83 | #define __bss_decrypted | ||
| 84 | |||
| 80 | #endif /* CONFIG_AMD_MEM_ENCRYPT */ | 85 | #endif /* CONFIG_AMD_MEM_ENCRYPT */ |
| 81 | 86 | ||
| 82 | /* | 87 | /* |
| @@ -88,6 +93,8 @@ early_set_memory_encrypted(unsigned long vaddr, unsigned long size) { return 0; | |||
| 88 | #define __sme_pa(x) (__pa(x) | sme_me_mask) | 93 | #define __sme_pa(x) (__pa(x) | sme_me_mask) |
| 89 | #define __sme_pa_nodebug(x) (__pa_nodebug(x) | sme_me_mask) | 94 | #define __sme_pa_nodebug(x) (__pa_nodebug(x) | sme_me_mask) |
| 90 | 95 | ||
| 96 | extern char __start_bss_decrypted[], __end_bss_decrypted[], __start_bss_decrypted_unused[]; | ||
| 97 | |||
| 91 | #endif /* __ASSEMBLY__ */ | 98 | #endif /* __ASSEMBLY__ */ |
| 92 | 99 | ||
| 93 | #endif /* __X86_MEM_ENCRYPT_H__ */ | 100 | #endif /* __X86_MEM_ENCRYPT_H__ */ |
