as-layout.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  4. */
  5. #ifndef __START_H__
  6. #define __START_H__
  7. #include <generated/asm-offsets.h>
  8. /*
  9. * Stolen from linux/const.h, which can't be directly included since
  10. * this is used in userspace code, which has no access to the kernel
  11. * headers. Changed to be suitable for adding casts to the start,
  12. * rather than "UL" to the end.
  13. */
  14. /* Some constant macros are used in both assembler and
  15. * C code. Therefore we cannot annotate them always with
  16. * 'UL' and other type specifiers unilaterally. We
  17. * use the following macros to deal with this.
  18. */
  19. #define STUB_START stub_start
  20. #define STUB_CODE STUB_START
  21. #define STUB_DATA (STUB_CODE + UM_KERN_PAGE_SIZE)
  22. #define STUB_DATA_PAGES 2
  23. #define STUB_SIZE ((1 + STUB_DATA_PAGES) * UM_KERN_PAGE_SIZE)
  24. #define STUB_END (STUB_START + STUB_SIZE)
  25. #ifndef __ASSEMBLER__
  26. #include <sysdep/ptrace.h>
  27. struct task_struct;
  28. extern struct task_struct *cpu_tasks[];
  29. extern unsigned long long physmem_size;
  30. extern unsigned long high_physmem;
  31. extern unsigned long uml_physmem;
  32. extern unsigned long uml_reserved;
  33. extern unsigned long end_vm;
  34. extern unsigned long start_vm;
  35. extern unsigned long brk_start;
  36. extern unsigned long stub_start;
  37. extern int linux_main(int argc, char **argv, char **envp);
  38. extern void uml_finishsetup(void);
  39. struct siginfo;
  40. extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *, void *);
  41. #endif
  42. #endif