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