0001 =======
0002 Porting
0003 =======
0004
0005 Taken from list archive at http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html
0006
0007 Initial definitions
0008 -------------------
0009
0010 The following symbol definitions rely on you knowing the translation that
0011 __virt_to_phys() does for your machine. This macro converts the passed
0012 virtual address to a physical address. Normally, it is simply:
0013
0014 phys = virt - PAGE_OFFSET + PHYS_OFFSET
0015
0016
0017 Decompressor Symbols
0018 --------------------
0019
0020 ZTEXTADDR
0021 Start address of decompressor. There's no point in talking about
0022 virtual or physical addresses here, since the MMU will be off at
0023 the time when you call the decompressor code. You normally call
0024 the kernel at this address to start it booting. This doesn't have
0025 to be located in RAM, it can be in flash or other read-only or
0026 read-write addressable medium.
0027
0028 ZBSSADDR
0029 Start address of zero-initialised work area for the decompressor.
0030 This must be pointing at RAM. The decompressor will zero initialise
0031 this for you. Again, the MMU will be off.
0032
0033 ZRELADDR
0034 This is the address where the decompressed kernel will be written,
0035 and eventually executed. The following constraint must be valid:
0036
0037 __virt_to_phys(TEXTADDR) == ZRELADDR
0038
0039 The initial part of the kernel is carefully coded to be position
0040 independent.
0041
0042 INITRD_PHYS
0043 Physical address to place the initial RAM disk. Only relevant if
0044 you are using the bootpImage stuff (which only works on the old
0045 struct param_struct).
0046
0047 INITRD_VIRT
0048 Virtual address of the initial RAM disk. The following constraint
0049 must be valid:
0050
0051 __virt_to_phys(INITRD_VIRT) == INITRD_PHYS
0052
0053 PARAMS_PHYS
0054 Physical address of the struct param_struct or tag list, giving the
0055 kernel various parameters about its execution environment.
0056
0057
0058 Kernel Symbols
0059 --------------
0060
0061 PHYS_OFFSET
0062 Physical start address of the first bank of RAM.
0063
0064 PAGE_OFFSET
0065 Virtual start address of the first bank of RAM. During the kernel
0066 boot phase, virtual address PAGE_OFFSET will be mapped to physical
0067 address PHYS_OFFSET, along with any other mappings you supply.
0068 This should be the same value as TASK_SIZE.
0069
0070 TASK_SIZE
0071 The maximum size of a user process in bytes. Since user space
0072 always starts at zero, this is the maximum address that a user
0073 process can access+1. The user space stack grows down from this
0074 address.
0075
0076 Any virtual address below TASK_SIZE is deemed to be user process
0077 area, and therefore managed dynamically on a process by process
0078 basis by the kernel. I'll call this the user segment.
0079
0080 Anything above TASK_SIZE is common to all processes. I'll call
0081 this the kernel segment.
0082
0083 (In other words, you can't put IO mappings below TASK_SIZE, and
0084 hence PAGE_OFFSET).
0085
0086 TEXTADDR
0087 Virtual start address of kernel, normally PAGE_OFFSET + 0x8000.
0088 This is where the kernel image ends up. With the latest kernels,
0089 it must be located at 32768 bytes into a 128MB region. Previous
0090 kernels placed a restriction of 256MB here.
0091
0092 DATAADDR
0093 Virtual address for the kernel data segment. Must not be defined
0094 when using the decompressor.
0095
0096 VMALLOC_START / VMALLOC_END
0097 Virtual addresses bounding the vmalloc() area. There must not be
0098 any static mappings in this area; vmalloc will overwrite them.
0099 The addresses must also be in the kernel segment (see above).
0100 Normally, the vmalloc() area starts VMALLOC_OFFSET bytes above the
0101 last virtual RAM address (found using variable high_memory).
0102
0103 VMALLOC_OFFSET
0104 Offset normally incorporated into VMALLOC_START to provide a hole
0105 between virtual RAM and the vmalloc area. We do this to allow
0106 out of bounds memory accesses (eg, something writing off the end
0107 of the mapped memory map) to be caught. Normally set to 8MB.
0108
0109 Architecture Specific Macros
0110 ----------------------------
0111
0112 BOOT_MEM(pram,pio,vio)
0113 `pram` specifies the physical start address of RAM. Must always
0114 be present, and should be the same as PHYS_OFFSET.
0115
0116 `pio` is the physical address of an 8MB region containing IO for
0117 use with the debugging macros in arch/arm/kernel/debug-armv.S.
0118
0119 `vio` is the virtual address of the 8MB debugging region.
0120
0121 It is expected that the debugging region will be re-initialised
0122 by the architecture specific code later in the code (via the
0123 MAPIO function).
0124
0125 BOOT_PARAMS
0126 Same as, and see PARAMS_PHYS.
0127
0128 FIXUP(func)
0129 Machine specific fixups, run before memory subsystems have been
0130 initialised.
0131
0132 MAPIO(func)
0133 Machine specific function to map IO areas (including the debug
0134 region above).
0135
0136 INITIRQ(func)
0137 Machine specific function to initialise interrupts.