~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/realmode.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ARCH_X86_REALMODE_H
  3 #define _ARCH_X86_REALMODE_H
  4 
  5 /*
  6  * Flag bit definitions for use with the flags field of the trampoline header
  7  * in the CONFIG_X86_64 variant.
  8  */
  9 #define TH_FLAGS_SME_ACTIVE_BIT         0
 10 #define TH_FLAGS_SME_ACTIVE             BIT(TH_FLAGS_SME_ACTIVE_BIT)
 11 
 12 #ifndef __ASSEMBLY__
 13 
 14 #include <linux/types.h>
 15 #include <asm/io.h>
 16 
 17 /* This must match data at realmode/rm/header.S */
 18 struct real_mode_header {
 19         u32     text_start;
 20         u32     ro_end;
 21         /* SMP trampoline */
 22         u32     trampoline_start;
 23         u32     trampoline_header;
 24 #ifdef CONFIG_AMD_MEM_ENCRYPT
 25         u32     sev_es_trampoline_start;
 26 #endif
 27 #ifdef CONFIG_X86_64
 28         u32     trampoline_start64;
 29         u32     trampoline_pgd;
 30 #endif
 31         /* ACPI S3 wakeup */
 32 #ifdef CONFIG_ACPI_SLEEP
 33         u32     wakeup_start;
 34         u32     wakeup_header;
 35 #endif
 36         /* APM/BIOS reboot */
 37         u32     machine_real_restart_asm;
 38 #ifdef CONFIG_X86_64
 39         u32     machine_real_restart_seg;
 40 #endif
 41 };
 42 
 43 /* This must match data at realmode/rm/trampoline_{32,64}.S */
 44 struct trampoline_header {
 45 #ifdef CONFIG_X86_32
 46         u32 start;
 47         u16 gdt_pad;
 48         u16 gdt_limit;
 49         u32 gdt_base;
 50 #else
 51         u64 start;
 52         u64 efer;
 53         u32 cr4;
 54         u32 flags;
 55         u32 lock;
 56 #endif
 57 };
 58 
 59 extern struct real_mode_header *real_mode_header;
 60 extern unsigned char real_mode_blob_end[];
 61 
 62 extern unsigned long initial_code;
 63 extern unsigned long initial_stack;
 64 #ifdef CONFIG_AMD_MEM_ENCRYPT
 65 extern unsigned long initial_vc_handler;
 66 #endif
 67 
 68 extern u32 *trampoline_lock;
 69 
 70 extern unsigned char real_mode_blob[];
 71 extern unsigned char real_mode_relocs[];
 72 
 73 #ifdef CONFIG_X86_32
 74 extern unsigned char startup_32_smp[];
 75 extern unsigned char boot_gdt[];
 76 #else
 77 extern unsigned char secondary_startup_64[];
 78 extern unsigned char secondary_startup_64_no_verify[];
 79 #endif
 80 
 81 static inline size_t real_mode_size_needed(void)
 82 {
 83         if (real_mode_header)
 84                 return 0;       /* already allocated. */
 85 
 86         return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
 87 }
 88 
 89 static inline void set_real_mode_mem(phys_addr_t mem)
 90 {
 91         real_mode_header = (struct real_mode_header *) __va(mem);
 92 }
 93 
 94 void reserve_real_mode(void);
 95 void load_trampoline_pgtable(void);
 96 void init_real_mode(void);
 97 
 98 #endif /* __ASSEMBLY__ */
 99 
100 #endif /* _ARCH_X86_REALMODE_H */
101 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php