#define DISABLE_BRANCH_PROFILING
#define __pa(x) …
#define __va(x) …
#undef CONFIG_PARAVIRT
#undef CONFIG_PARAVIRT_XXL
#undef CONFIG_PARAVIRT_SPINLOCKS
#define USE_EARLY_PGTABLE_L5
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mem_encrypt.h>
#include <linux/cc_platform.h>
#include <asm/init.h>
#include <asm/setup.h>
#include <asm/sections.h>
#include <asm/coco.h>
#include <asm/sev.h>
#include "mm_internal.h"
#define PGD_FLAGS …
#define P4D_FLAGS …
#define PUD_FLAGS …
#define PMD_FLAGS …
#define PMD_FLAGS_LARGE …
#define PMD_FLAGS_DEC …
#define PMD_FLAGS_DEC_WP …
#define PMD_FLAGS_ENC …
#define PTE_FLAGS …
#define PTE_FLAGS_DEC …
#define PTE_FLAGS_DEC_WP …
#define PTE_FLAGS_ENC …
struct sme_populate_pgd_data { … };
static char sme_workarea[2 * PMD_SIZE] __section(…);
static void __head sme_clear_pgd(struct sme_populate_pgd_data *ppd)
{ … }
static pud_t __head *sme_prepare_pgd(struct sme_populate_pgd_data *ppd)
{ … }
static void __head sme_populate_pgd_large(struct sme_populate_pgd_data *ppd)
{ … }
static void __head sme_populate_pgd(struct sme_populate_pgd_data *ppd)
{ … }
static void __head __sme_map_range_pmd(struct sme_populate_pgd_data *ppd)
{ … }
static void __head __sme_map_range_pte(struct sme_populate_pgd_data *ppd)
{ … }
static void __head __sme_map_range(struct sme_populate_pgd_data *ppd,
pmdval_t pmd_flags, pteval_t pte_flags)
{ … }
static void __head sme_map_range_encrypted(struct sme_populate_pgd_data *ppd)
{ … }
static void __head sme_map_range_decrypted(struct sme_populate_pgd_data *ppd)
{ … }
static void __head sme_map_range_decrypted_wp(struct sme_populate_pgd_data *ppd)
{ … }
static unsigned long __head sme_pgtable_calc(unsigned long len)
{ … }
void __head sme_encrypt_kernel(struct boot_params *bp)
{ … }
void __head sme_enable(struct boot_params *bp)
{ … }