xref: /rk3399_rockchip-uboot/arch/xtensa/include/asm/bootparam.h (revision c978b52410016b0ab5a213f235596340af8d45f7)
1*c978b524SChris Zankel /*
2*c978b524SChris Zankel  * Definition of the Linux/Xtensa boot parameter structure
3*c978b524SChris Zankel  *
4*c978b524SChris Zankel  * Copyright (C) 2001 - 2009  Tensilica Inc.
5*c978b524SChris Zankel  *
6*c978b524SChris Zankel  * (Concept borrowed from the 68K port)
7*c978b524SChris Zankel  *
8*c978b524SChris Zankel  * SPDX-License-Identifier:	GPL-2.0+
9*c978b524SChris Zankel  */
10*c978b524SChris Zankel 
11*c978b524SChris Zankel #ifndef _XTENSA_BOOTPARAM_H
12*c978b524SChris Zankel #define _XTENSA_BOOTPARAM_H
13*c978b524SChris Zankel 
14*c978b524SChris Zankel #define BP_VERSION 0x0001
15*c978b524SChris Zankel 
16*c978b524SChris Zankel #define BP_TAG_COMMAND_LINE	0x1001	/* command line (0-terminated string)*/
17*c978b524SChris Zankel #define BP_TAG_INITRD		0x1002	/* ramdisk addr and size (bp_meminfo) */
18*c978b524SChris Zankel #define BP_TAG_MEMORY		0x1003	/* memory addr and size (bp_meminfo) */
19*c978b524SChris Zankel #define BP_TAG_SERIAL_BAUDRATE	0x1004	/* baud rate of current console */
20*c978b524SChris Zankel #define BP_TAG_SERIAL_PORT	0x1005	/* serial device of current console */
21*c978b524SChris Zankel #define BP_TAG_FDT		0x1006	/* flat device tree */
22*c978b524SChris Zankel 
23*c978b524SChris Zankel #define BP_TAG_FIRST		0x7B0B  /* first tag with a version number */
24*c978b524SChris Zankel #define BP_TAG_LAST		0x7E0B	/* last tag */
25*c978b524SChris Zankel 
26*c978b524SChris Zankel #ifndef __ASSEMBLY__
27*c978b524SChris Zankel 
28*c978b524SChris Zankel /* All records are aligned to 4 bytes */
29*c978b524SChris Zankel 
30*c978b524SChris Zankel struct bp_tag {
31*c978b524SChris Zankel 	unsigned short id;	/* tag id */
32*c978b524SChris Zankel 	unsigned short size;	/* size of this record excluding the structure*/
33*c978b524SChris Zankel 	unsigned long data[0];	/* data */
34*c978b524SChris Zankel };
35*c978b524SChris Zankel 
36*c978b524SChris Zankel #define bp_tag_next(tag)						\
37*c978b524SChris Zankel 	((struct bp_tag *)((unsigned long)((tag) + 1) + (tag)->size))
38*c978b524SChris Zankel 
39*c978b524SChris Zankel struct meminfo {
40*c978b524SChris Zankel 	unsigned long type;
41*c978b524SChris Zankel 	unsigned long start;
42*c978b524SChris Zankel 	unsigned long end;
43*c978b524SChris Zankel };
44*c978b524SChris Zankel 
45*c978b524SChris Zankel #define MEMORY_TYPE_CONVENTIONAL     0x1000
46*c978b524SChris Zankel #define MEMORY_TYPE_NONE             0x2000
47*c978b524SChris Zankel 
48*c978b524SChris Zankel struct sysmem_info {
49*c978b524SChris Zankel 	int nr_banks;
50*c978b524SChris Zankel 	struct meminfo bank[0];
51*c978b524SChris Zankel };
52*c978b524SChris Zankel 
53*c978b524SChris Zankel #endif
54*c978b524SChris Zankel #endif
55