Porting 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Taken from list archive at http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html
  2. Initial definitions
  3. -------------------
  4. The following symbol definitions rely on you knowing the translation that
  5. __virt_to_phys() does for your machine. This macro converts the passed
  6. virtual address to a physical address. Normally, it is simply:
  7. phys = virt - PAGE_OFFSET + PHYS_OFFSET
  8. Decompressor Symbols
  9. --------------------
  10. ZTEXTADDR
  11. Start address of decompressor. There's no point in talking about
  12. virtual or physical addresses here, since the MMU will be off at
  13. the time when you call the decompressor code. You normally call
  14. the kernel at this address to start it booting. This doesn't have
  15. to be located in RAM, it can be in flash or other read-only or
  16. read-write addressable medium.
  17. ZBSSADDR
  18. Start address of zero-initialised work area for the decompressor.
  19. This must be pointing at RAM. The decompressor will zero initialise
  20. this for you. Again, the MMU will be off.
  21. ZRELADDR
  22. This is the address where the decompressed kernel will be written,
  23. and eventually executed. The following constraint must be valid:
  24. __virt_to_phys(TEXTADDR) == ZRELADDR
  25. The initial part of the kernel is carefully coded to be position
  26. independent.
  27. INITRD_PHYS
  28. Physical address to place the initial RAM disk. Only relevant if
  29. you are using the bootpImage stuff (which only works on the old
  30. struct param_struct).
  31. INITRD_VIRT
  32. Virtual address of the initial RAM disk. The following constraint
  33. must be valid:
  34. __virt_to_phys(INITRD_VIRT) == INITRD_PHYS
  35. PARAMS_PHYS
  36. Physical address of the struct param_struct or tag list, giving the
  37. kernel various parameters about its execution environment.
  38. Kernel Symbols
  39. --------------
  40. PHYS_OFFSET
  41. Physical start address of the first bank of RAM.
  42. PAGE_OFFSET
  43. Virtual start address of the first bank of RAM. During the kernel
  44. boot phase, virtual address PAGE_OFFSET will be mapped to physical
  45. address PHYS_OFFSET, along with any other mappings you supply.
  46. This should be the same value as TASK_SIZE.
  47. TASK_SIZE
  48. The maximum size of a user process in bytes. Since user space
  49. always starts at zero, this is the maximum address that a user
  50. process can access+1. The user space stack grows down from this
  51. address.
  52. Any virtual address below TASK_SIZE is deemed to be user process
  53. area, and therefore managed dynamically on a process by process
  54. basis by the kernel. I'll call this the user segment.
  55. Anything above TASK_SIZE is common to all processes. I'll call
  56. this the kernel segment.
  57. (In other words, you can't put IO mappings below TASK_SIZE, and
  58. hence PAGE_OFFSET).
  59. TEXTADDR
  60. Virtual start address of kernel, normally PAGE_OFFSET + 0x8000.
  61. This is where the kernel image ends up. With the latest kernels,
  62. it must be located at 32768 bytes into a 128MB region. Previous
  63. kernels placed a restriction of 256MB here.
  64. DATAADDR
  65. Virtual address for the kernel data segment. Must not be defined
  66. when using the decompressor.
  67. VMALLOC_START
  68. VMALLOC_END
  69. Virtual addresses bounding the vmalloc() area. There must not be
  70. any static mappings in this area; vmalloc will overwrite them.
  71. The addresses must also be in the kernel segment (see above).
  72. Normally, the vmalloc() area starts VMALLOC_OFFSET bytes above the
  73. last virtual RAM address (found using variable high_memory).
  74. VMALLOC_OFFSET
  75. Offset normally incorporated into VMALLOC_START to provide a hole
  76. between virtual RAM and the vmalloc area. We do this to allow
  77. out of bounds memory accesses (eg, something writing off the end
  78. of the mapped memory map) to be caught. Normally set to 8MB.
  79. Architecture Specific Macros
  80. ----------------------------
  81. BOOT_MEM(pram,pio,vio)
  82. `pram' specifies the physical start address of RAM. Must always
  83. be present, and should be the same as PHYS_OFFSET.
  84. `pio' is the physical address of an 8MB region containing IO for
  85. use with the debugging macros in arch/arm/kernel/debug-armv.S.
  86. `vio' is the virtual address of the 8MB debugging region.
  87. It is expected that the debugging region will be re-initialised
  88. by the architecture specific code later in the code (via the
  89. MAPIO function).
  90. BOOT_PARAMS
  91. Same as, and see PARAMS_PHYS.
  92. FIXUP(func)
  93. Machine specific fixups, run before memory subsystems have been
  94. initialised.
  95. MAPIO(func)
  96. Machine specific function to map IO areas (including the debug
  97. region above).
  98. INITIRQ(func)
  99. Machine specific function to initialise interrupts.