もともと、Linux Kernelのソースコードの一部なので、GPLv2扱いになる(はずの認識)。
https://www.kernel.org/doc/html/latest/index.html
Licensing documentation
The following describes the license of the Linux kernel source code (GPLv2), how to properly mark the license of individual files in the source tree, as well as links to the full license text.
https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing
Porting
Taken from list archive at http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html
Initial definitions
The following symbol definitions rely on you knowing the translation that __virt_to_phys() does for your machine. This macro converts the passed virtual address to a physical address. Normally, it is simply:
以下のシンボル定義は、あなたがあなたのマシンに対して __virt_to_phys()が行う変換を知っていることものとします。 このマクロは、渡された仮想アドレスを物理アドレスに変換します。 通常、それは単純です:
phys = virt - PAGE_OFFSET + PHYS_OFFSET
Decompressor Symbols
ZTEXTADDR
Start address of decompressor. There’s no point in talking about virtual or physical addresses here, since the MMU will be off at the time when you call the decompressor code. You normally call the kernel at this address to start it booting. This doesn’t have to be located in RAM, it can be in flash or other read-only or read-write addressable medium.
decompressorの開始アドレス。これは、仮想アドレスであるか物理アドレスであるかについては問わないが、decompressor codeを呼び出すときにはMMUはoffである。通常、kernelは起動を開始するときにこのアドレスを呼び出す。これは、RAMである必要はなく、flashあるいはほかの読み込み専用、読み書き可能なメディアであってもよい。
ZBSSADDR
Start address of zero-initialised work area for the decompressor. This must be pointing at RAM. The decompressor will zero initialise this for you. Again, the MMU will be off.
decompressorのために0で初期化されるワークメモリのスタートアドレス。これはRAM上になければならない。decompressorはこれを0で初期化するだろう。繰り返しとなるが、MMUはoffでなければならない。
ZRELADDR
This is the address where the decompressed kernel will be written, and eventually executed. The following constraint must be valid:
decompressed kernelが書き込まれる、実行されるアドレス。これは下記制約を満たさなければならない。
__virt_to_phys(TEXTADDR) == ZRELADDR
The initial part of the kernel is carefully coded to be position independent.
カーネルの初期化部分は、位置非依存のコードであることに注意深くコーディングされています。
INITRD_PHYS
Physical address to place the initial RAM disk. Only relevant if you are using the bootpImage stuff (which only works on the old struct param_struct).
initial RAM diskが置かれた物理アドレス。bootpImageを使用している場合にのみ関連します(古い構造体param_structでのみ機能します)。
INITRD_VIRT
Virtual address of the initial RAM disk. The following constraint must be valid:
initial RAM diskが置かれた仮想アドレス。これは下記制約を満たさなければならない。
__virt_to_phys(INITRD_VIRT) == INITRD_PHYS
PARAMS_PHYS
Physical address of the struct param_struct or tag list, giving the kernel various parameters about its execution environment.
param_struct構造体やtag listの物理アドレスであって、実行完了に関する様々なパラメータをカーネルに提供します。
Kernel Symbols
PHYS_OFFSET
Physical start address of the first bank of RAM.
RAMのfirst bankが開始する物理アドレス。
PAGE_OFFSET
Virtual start address of the first bank of RAM. During the kernel boot phase, virtual address PAGE_OFFSET will be mapped to physical address PHYS_OFFSET, along with any other mappings you supply. This should be the same value as TASK_SIZE.
RAMのfirst bankが開始する仮想アドレス。kernelの起動フェイズの間、仮想アドレスPAGE_OFFSETは、ユーザーが指定した他のマッピングとともに、物理アドレスPHTS_OFFSETにマッピングされます。これは、TASK_SIZEと同じ値である必要があります。
TASK_SIZE
The maximum size of a user process in bytes. Since user space always starts at zero, this is the maximum address that a user process can access+1. The user space stack grows down from this address.
bytes単位での、ユーザープロセスの最大サイズ。ユーザー空間は常に0から始まるため、これはユーザープロセスがアクセスできるアドレス+1になります。ユーザー空間のスタックは、このアドレスから大きくなります。
Any virtual address below TASK_SIZE is deemed to be user process area, and therefore managed dynamically on a process by process basis by the kernel. I’ll call this the user segment.
TASK_SIZE未満の仮想アドレスは、ユーザープロセスの領域とみなされるため、カーネルにより、プロセス単位で動的に管理されます。これを、user segmentと呼びます。
Anything above TASK_SIZE is common to all processes. I’ll call this the kernel segment.
TASK_SIZEを超過するものは、全プロセスで共通になります。これは、kernel segmentと呼びます。
(In other words, you can’t put IO mappings below TASK_SIZE, and hence PAGE_OFFSET).
(言い換えれば、TASK_SIZE以降にIO mappingを置く事は出来ず、それゆえ、PAGE_OFFSET以降に置きます)
TEXTADDR
Virtual start address of kernel, normally PAGE_OFFSET + 0x8000. This is where the kernel image ends up. With the latest kernels, it must be located at 32768 bytes into a 128MB region. Previous kernels placed a restriction of 256MB here.
kernelの仮想空間上での開始アドレスであって、通常はPAGE_OFFSET + 0x8000です。これは、これがカーネルイメージの最終的な位置になります。最新のカーネルでは、32768 bytesから128MB のregionに置く必要があります。従来のkernelでは、256MBの制限があります。
DATAADDR
Virtual address for the kernel data segment. Must not be defined when using the decompressor.
kernelのdata segmentの仮想アドレス。decompressorを使う場合には、定義してはいけません。
VMALLOC_START / VMALLOC_END
Virtual addresses bounding the vmalloc() area. There must not be any static mappings in this area; vmalloc will overwrite them. The addresses must also be in the kernel segment (see above). Normally, the vmalloc() area starts VMALLOC_OFFSET bytes above the last virtual RAM address (found using variable high_memory).
vmalloc()領域の境界となる仮想アドレス。この領域に、静的マッピングがあってはいけません。vmallocはそれらを上書きします。アドレスはまた、kernel segment(前述)に含まれている必要があります。通常、vmalloc()領域は、VMALLOC_OFFSET bytesから開始し、(high_memoryの変数を用いて検出される)仮想アドレス上のRAM addressの末端上に位置します。
VMALLOC_OFFSET
Offset normally incorporated into VMALLOC_START to provide a hole between virtual RAM and the vmalloc area. We do this to allow out of bounds memory accesses (eg, something writing off the end of the mapped memory map) to be caught. Normally set to 8MB.
Architecture Specific Macros
BOOT_MEM(pram,pio,vio)
pram specifies the physical start address of RAM. Must always be present, and should be the same as PHYS_OFFSET.
pramは、RAMの物理的な開始アドレスを指定します。 常に存在している必要があり、PHYS_OFFSETと同じである必要があります。
pio is the physical address of an 8MB region containing IO for use with the debugging macros in arch/arm/kernel/debug-armv.S.
pioは、arch/arm/kernel/debug-armv.Sのデバッグマクロで使用するIOを含む8MB領域の物理アドレスです。
vio is the virtual address of the 8MB debugging region.
vioは、8MBのデバッグ領域の仮想アドレスです。
It is expected that the debugging region will be re-initialised by the architecture specific code later in the code (via the MAPIO function).
デバッグ領域は、コードの後半で(MAPIO関数を介して)architecture specific codeによって再初期化されることが予想されます。
BOOT_PARAMS
Same as, and see PARAMS_PHYS.
PARAMS_PHYSと同様なので参照してください。
FIXUP(func)
Machine specific fixups, run before memory subsystems have been initialised.
マシン固有の修正処理。memory subsystemsが初期化される前に実行されます。
MAPIO(func)
Machine specific function to map IO areas (including the debug region above).
マシン固有のIO areaのマッピング関数(前述の、debug regionを含む)
INITIRQ(func)
Machine specific function to initialise interrupts.
マシン固有の初期の割り込み関数。