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