as-layout.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __START_H__
  6. #define __START_H__
  7. #include "kern_constants.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 low_physmem;
  37. extern unsigned long high_physmem;
  38. extern unsigned long uml_physmem;
  39. extern unsigned long uml_reserved;
  40. extern unsigned long end_vm;
  41. extern unsigned long start_vm;
  42. extern unsigned long long highmem;
  43. extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
  44. extern unsigned long _unprotected_end;
  45. extern unsigned long brk_start;
  46. extern unsigned long host_task_size;
  47. extern int linux_main(int argc, char **argv);
  48. extern void (*sig_info[])(int, struct uml_pt_regs *);
  49. #endif
  50. #endif