/arch/um/include/shared/as-layout.h

http://github.com/mirrors/linux · C Header · 66 lines · 34 code · 17 blank · 15 comment · 0 complexity · 0a460e9048c4836fe6315983e62512b6 MD5 · raw file

  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. #ifdef __ASSEMBLY__
  20. #define _UML_AC(X, Y) (Y)
  21. #else
  22. #define __UML_AC(X, Y) (X(Y))
  23. #define _UML_AC(X, Y) __UML_AC(X, Y)
  24. #endif
  25. #define STUB_START _UML_AC(, 0x100000)
  26. #define STUB_CODE _UML_AC((unsigned long), STUB_START)
  27. #define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE)
  28. #define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE)
  29. #ifndef __ASSEMBLY__
  30. #include <sysdep/ptrace.h>
  31. struct cpu_task {
  32. int pid;
  33. void *task;
  34. };
  35. extern struct cpu_task cpu_tasks[];
  36. extern unsigned long high_physmem;
  37. extern unsigned long uml_physmem;
  38. extern unsigned long uml_reserved;
  39. extern unsigned long end_vm;
  40. extern unsigned long start_vm;
  41. extern unsigned long long highmem;
  42. extern unsigned long brk_start;
  43. extern unsigned long host_task_size;
  44. extern int linux_main(int argc, char **argv);
  45. extern void uml_finishsetup(void);
  46. struct siginfo;
  47. extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *);
  48. #endif
  49. #endif