as-layout.h 1.7 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 "uml-config.h"
  8. #include "kern_constants.h"
  9. /*
  10. * Stolen from linux/const.h, which can't be directly included since
  11. * this is used in userspace code, which has no access to the kernel
  12. * headers. Changed to be suitable for adding casts to the start,
  13. * rather than "UL" to the end.
  14. */
  15. /* Some constant macros are used in both assembler and
  16. * C code. Therefore we cannot annotate them always with
  17. * 'UL' and other type specifiers unilaterally. We
  18. * use the following macros to deal with this.
  19. */
  20. #ifdef __ASSEMBLY__
  21. #define _UML_AC(X, Y) (Y)
  22. #else
  23. #define __UML_AC(X, Y) (X(Y))
  24. #define _UML_AC(X, Y) __UML_AC(X, Y)
  25. #endif
  26. #define STUB_START _UML_AC(, 0x100000)
  27. #define STUB_CODE _UML_AC((unsigned long), STUB_START)
  28. #define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE)
  29. #define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE)
  30. #ifndef __ASSEMBLY__
  31. #include "sysdep/ptrace.h"
  32. struct cpu_task {
  33. int pid;
  34. void *task;
  35. };
  36. extern struct cpu_task cpu_tasks[];
  37. extern unsigned long low_physmem;
  38. extern unsigned long high_physmem;
  39. extern unsigned long uml_physmem;
  40. extern unsigned long uml_reserved;
  41. extern unsigned long end_vm;
  42. extern unsigned long start_vm;
  43. extern unsigned long long highmem;
  44. extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
  45. extern unsigned long _unprotected_end;
  46. extern unsigned long brk_start;
  47. extern unsigned long host_task_size;
  48. extern int linux_main(int argc, char **argv);
  49. extern void (*sig_info[])(int, struct uml_pt_regs *);
  50. #endif
  51. #endif