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

TOMOYO Linux Cross Reference
Linux/arch/x86/kernel/asm-offsets_32.c

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 __LINUX_KBUILD_H
  3 # error "Please do not build this file directly, build asm-offsets.c instead"
  4 #endif
  5 
  6 #include <linux/efi.h>
  7 
  8 #include <asm/ucontext.h>
  9 
 10 /* workaround for a warning with -Wmissing-prototypes */
 11 void foo(void);
 12 
 13 void foo(void)
 14 {
 15         OFFSET(CPUINFO_x86, cpuinfo_x86, x86);
 16         OFFSET(CPUINFO_x86_vendor, cpuinfo_x86, x86_vendor);
 17         OFFSET(CPUINFO_x86_model, cpuinfo_x86, x86_model);
 18         OFFSET(CPUINFO_x86_stepping, cpuinfo_x86, x86_stepping);
 19         OFFSET(CPUINFO_cpuid_level, cpuinfo_x86, cpuid_level);
 20         OFFSET(CPUINFO_x86_capability, cpuinfo_x86, x86_capability);
 21         OFFSET(CPUINFO_x86_vendor_id, cpuinfo_x86, x86_vendor_id);
 22         BLANK();
 23 
 24         OFFSET(PT_EBX, pt_regs, bx);
 25         OFFSET(PT_ECX, pt_regs, cx);
 26         OFFSET(PT_EDX, pt_regs, dx);
 27         OFFSET(PT_ESI, pt_regs, si);
 28         OFFSET(PT_EDI, pt_regs, di);
 29         OFFSET(PT_EBP, pt_regs, bp);
 30         OFFSET(PT_EAX, pt_regs, ax);
 31         OFFSET(PT_DS,  pt_regs, ds);
 32         OFFSET(PT_ES,  pt_regs, es);
 33         OFFSET(PT_FS,  pt_regs, fs);
 34         OFFSET(PT_GS,  pt_regs, gs);
 35         OFFSET(PT_ORIG_EAX, pt_regs, orig_ax);
 36         OFFSET(PT_EIP, pt_regs, ip);
 37         OFFSET(PT_CS,  pt_regs, cs);
 38         OFFSET(PT_EFLAGS, pt_regs, flags);
 39         OFFSET(PT_OLDESP, pt_regs, sp);
 40         OFFSET(PT_OLDSS,  pt_regs, ss);
 41         BLANK();
 42 
 43         OFFSET(saved_context_gdt_desc, saved_context, gdt_desc);
 44         BLANK();
 45 
 46         /*
 47          * Offset from the entry stack to task stack stored in TSS. Kernel entry
 48          * happens on the per-cpu entry-stack, and the asm code switches to the
 49          * task-stack pointer stored in x86_tss.sp1, which is a copy of
 50          * task->thread.sp0 where entry code can find it.
 51          */
 52         DEFINE(TSS_entry2task_stack,
 53                offsetof(struct cpu_entry_area, tss.x86_tss.sp1) -
 54                offsetofend(struct cpu_entry_area, entry_stack_page.stack));
 55 
 56         BLANK();
 57         DEFINE(EFI_svam, offsetof(efi_runtime_services_t, set_virtual_address_map));
 58 }
 59 

~ [ 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