linux/arch/x86/include/asm/realmode.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ARCH_X86_REALMODE_H
#define _ARCH_X86_REALMODE_H

/*
 * Flag bit definitions for use with the flags field of the trampoline header
 * in the CONFIG_X86_64 variant.
 */
#define TH_FLAGS_SME_ACTIVE_BIT
#define TH_FLAGS_SME_ACTIVE

#ifndef __ASSEMBLY__

#include <linux/types.h>
#include <asm/io.h>

/* This must match data at realmode/rm/header.S */
struct real_mode_header {};

/* This must match data at realmode/rm/trampoline_{32,64}.S */
struct trampoline_header {};

extern struct real_mode_header *real_mode_header;
extern unsigned char real_mode_blob_end[];

extern unsigned long initial_code;
extern unsigned long initial_stack;
#ifdef CONFIG_AMD_MEM_ENCRYPT
extern unsigned long initial_vc_handler;
#endif

extern u32 *trampoline_lock;

extern unsigned char real_mode_blob[];
extern unsigned char real_mode_relocs[];

#ifdef CONFIG_X86_32
extern unsigned char startup_32_smp[];
extern unsigned char boot_gdt[];
#else
extern unsigned char secondary_startup_64[];
extern unsigned char secondary_startup_64_no_verify[];
#endif

static inline size_t real_mode_size_needed(void)
{}

static inline void set_real_mode_mem(phys_addr_t mem)
{}

void reserve_real_mode(void);
void load_trampoline_pgtable(void);
void init_real_mode(void);

#endif /* __ASSEMBLY__ */

#endif /* _ARCH_X86_REALMODE_H */