bootparam.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  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)
  8. */
  9. #ifndef _XTENSA_BOOTPARAM_H
  10. #define _XTENSA_BOOTPARAM_H
  11. #define BP_VERSION 0x0001
  12. #define BP_TAG_COMMAND_LINE 0x1001 /* command line (0-terminated string)*/
  13. #define BP_TAG_INITRD 0x1002 /* ramdisk addr and size (bp_meminfo) */
  14. #define BP_TAG_MEMORY 0x1003 /* memory addr and size (bp_meminfo) */
  15. #define BP_TAG_SERIAL_BAUDRATE 0x1004 /* baud rate of current console */
  16. #define BP_TAG_SERIAL_PORT 0x1005 /* serial device of current console */
  17. #define BP_TAG_FDT 0x1006 /* flat device tree */
  18. #define BP_TAG_FIRST 0x7B0B /* first tag with a version number */
  19. #define BP_TAG_LAST 0x7E0B /* last tag */
  20. #ifndef __ASSEMBLY__
  21. /* All records are aligned to 4 bytes */
  22. struct bp_tag {
  23. unsigned short id; /* tag id */
  24. unsigned short size; /* size of this record excluding the structure*/
  25. unsigned long data[0]; /* data */
  26. };
  27. #define bp_tag_next(tag) \
  28. ((struct bp_tag *)((unsigned long)((tag) + 1) + (tag)->size))
  29. struct meminfo {
  30. unsigned long type;
  31. unsigned long start;
  32. unsigned long end;
  33. };
  34. #define MEMORY_TYPE_CONVENTIONAL 0x1000
  35. #define MEMORY_TYPE_NONE 0x2000
  36. struct sysmem_info {
  37. int nr_banks;
  38. struct meminfo bank[0];
  39. };
  40. #endif
  41. #endif