blob: 23392c5630ce9939b04bae3ff6de4fd67417852a [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
2 * include/asm-xtensa/bootparam.h
3 *
4 * Definition of the Linux/Xtensa boot parameter structure
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 *
12 * (Concept borrowed from the 68K port)
13 */
14
15#ifndef _XTENSA_BOOTPARAM_H
16#define _XTENSA_BOOTPARAM_H
17
18#define BP_VERSION 0x0001
19
20#define BP_TAG_COMMAND_LINE 0x1001 /* command line (0-terminated string)*/
21#define BP_TAG_INITRD 0x1002 /* ramdisk addr and size (bp_meminfo) */
22#define BP_TAG_MEMORY 0x1003 /* memory addr and size (bp_meminfo) */
Baruch Siach661b40b2013-06-06 14:23:37 +030023#define BP_TAG_SERIAL_BAUDRATE 0x1004 /* baud rate of current console. */
Chris Zankel9a8fd552005-06-23 22:01:26 -070024#define BP_TAG_SERIAL_PORT 0x1005 /* serial device of current console */
Max Filippovda844a82012-11-04 00:30:13 +040025#define BP_TAG_FDT 0x1006 /* flat device tree addr */
Chris Zankel9a8fd552005-06-23 22:01:26 -070026
27#define BP_TAG_FIRST 0x7B0B /* first tag with a version number */
28#define BP_TAG_LAST 0x7E0B /* last tag */
29
30#ifndef __ASSEMBLY__
31
32/* All records are aligned to 4 bytes */
33
34typedef struct bp_tag {
Chris Zankelc4c45942012-11-28 16:53:51 -080035 unsigned short id; /* tag id */
36 unsigned short size; /* size of this record excluding the structure*/
37 unsigned long data[0]; /* data */
Chris Zankel9a8fd552005-06-23 22:01:26 -070038} bp_tag_t;
39
40typedef struct meminfo {
Chris Zankelc4c45942012-11-28 16:53:51 -080041 unsigned long type;
42 unsigned long start;
43 unsigned long end;
Chris Zankel9a8fd552005-06-23 22:01:26 -070044} meminfo_t;
45
46#define SYSMEM_BANKS_MAX 5
47
48#define MEMORY_TYPE_CONVENTIONAL 0x1000
49#define MEMORY_TYPE_NONE 0x2000
50
51typedef struct sysmem_info {
Chris Zankelc4c45942012-11-28 16:53:51 -080052 int nr_banks;
53 meminfo_t bank[SYSMEM_BANKS_MAX];
Chris Zankel9a8fd552005-06-23 22:01:26 -070054} sysmem_info_t;
55
56extern sysmem_info_t sysmem;
57
58#endif
59#endif