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