xref: /OK3568_Linux_fs/kernel/Documentation/xtensa/booting.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun=====================================
2*4882a593SmuzhiyunPassing boot parameters to the kernel
3*4882a593Smuzhiyun=====================================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunBoot parameters are represented as a TLV list in the memory. Please see
6*4882a593Smuzhiyunarch/xtensa/include/asm/bootparam.h for definition of the bp_tag structure and
7*4882a593Smuzhiyuntag value constants. First entry in the list must have type BP_TAG_FIRST, last
8*4882a593Smuzhiyunentry must have type BP_TAG_LAST. The address of the first list entry is
9*4882a593Smuzhiyunpassed to the kernel in the register a2. The address type depends on MMU type:
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun- For configurations without MMU, with region protection or with MPU the
12*4882a593Smuzhiyun  address must be the physical address.
13*4882a593Smuzhiyun- For configurations with region translarion MMU or with MMUv3 and CONFIG_MMU=n
14*4882a593Smuzhiyun  the address must be a valid address in the current mapping. The kernel will
15*4882a593Smuzhiyun  not change the mapping on its own.
16*4882a593Smuzhiyun- For configurations with MMUv2 the address must be a virtual address in the
17*4882a593Smuzhiyun  default virtual mapping (0xd0000000..0xffffffff).
18*4882a593Smuzhiyun- For configurations with MMUv3 and CONFIG_MMU=y the address may be either a
19*4882a593Smuzhiyun  virtual or physical address. In either case it must be within the default
20*4882a593Smuzhiyun  virtual mapping. It is considered physical if it is within the range of
21*4882a593Smuzhiyun  physical addresses covered by the default KSEG mapping (XCHAL_KSEG_PADDR..
22*4882a593Smuzhiyun  XCHAL_KSEG_PADDR + XCHAL_KSEG_SIZE), otherwise it is considered virtual.
23