#define DISABLE_BRANCH_PROFILING
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/dma-direct.h>
#include <linux/swiotlb.h>
#include <linux/mem_encrypt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <linux/cc_platform.h>
#include <asm/tlbflush.h>
#include <asm/fixmap.h>
#include <asm/setup.h>
#include <asm/mem_encrypt.h>
#include <asm/bootparam.h>
#include <asm/set_memory.h>
#include <asm/cacheflush.h>
#include <asm/processor-flags.h>
#include <asm/msr.h>
#include <asm/cmdline.h>
#include <asm/sev.h>
#include <asm/ia32.h>
#include "mm_internal.h"
u64 sme_me_mask __section(".data") = …;
u64 sev_status __section(".data") = …;
u64 sev_check_data __section(".data") = …;
EXPORT_SYMBOL(…);
static char sme_early_buffer[PAGE_SIZE] __initdata __aligned(…);
static inline void __init snp_memcpy(void *dst, void *src, size_t sz,
unsigned long paddr, bool decrypt)
{ … }
static void __init __sme_early_enc_dec(resource_size_t paddr,
unsigned long size, bool enc)
{ … }
void __init sme_early_encrypt(resource_size_t paddr, unsigned long size)
{ … }
void __init sme_early_decrypt(resource_size_t paddr, unsigned long size)
{ … }
static void __init __sme_early_map_unmap_mem(void *vaddr, unsigned long size,
bool map)
{ … }
void __init sme_unmap_bootdata(char *real_mode_data)
{ … }
void __init sme_map_bootdata(char *real_mode_data)
{ … }
static unsigned long pg_level_to_pfn(int level, pte_t *kpte, pgprot_t *ret_prot)
{ … }
static bool amd_enc_tlb_flush_required(bool enc)
{ … }
static bool amd_enc_cache_flush_required(void)
{ … }
static void enc_dec_hypercall(unsigned long vaddr, unsigned long size, bool enc)
{ … }
static int amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool enc)
{ … }
static int amd_enc_status_change_finish(unsigned long vaddr, int npages, bool enc)
{ … }
static void __init __set_clr_pte_enc(pte_t *kpte, int level, bool enc)
{ … }
static int __init early_set_memory_enc_dec(unsigned long vaddr,
unsigned long size, bool enc)
{ … }
int __init early_set_memory_decrypted(unsigned long vaddr, unsigned long size)
{ … }
int __init early_set_memory_encrypted(unsigned long vaddr, unsigned long size)
{ … }
void __init early_set_mem_enc_dec_hypercall(unsigned long vaddr, unsigned long size, bool enc)
{ … }
void __init sme_early_init(void)
{ … }
void __init mem_encrypt_free_decrypted_mem(void)
{ … }