1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020 Marvell International Ltd.
7 * Header file containing the ABI with the bootloader.
10 #ifndef __CVMX_BOOTINFO_H__
11 #define __CVMX_BOOTINFO_H__
13 #include "cvmx-coremask.h"
16 * Current major and minor versions of the CVMX bootinfo block that is
17 * passed from the bootloader to the application. This is versioned
18 * so that applications can properly handle multiple bootloader
21 #define CVMX_BOOTINFO_MAJ_VER 1
22 #define CVMX_BOOTINFO_MIN_VER 4
24 #if (CVMX_BOOTINFO_MAJ_VER == 1)
25 #define CVMX_BOOTINFO_OCTEON_SERIAL_LEN 20
27 * This structure is populated by the bootloader. For binary
28 * compatibility the only changes that should be made are
29 * adding members to the end of the structure, and the minor
30 * version should be incremented at that time.
31 * If an incompatible change is made, the major version
32 * must be incremented, and the minor version should be reset
35 struct cvmx_bootinfo {
44 u32 exception_base_addr;
48 /* DRAM size in megabytes */
50 /* physical address of free memory descriptor block*/
51 u32 phy_mem_desc_addr;
52 /* used to pass flags from app to debugger */
53 u32 debugger_flags_base_addr;
55 /* CPU clock speed, in hz */
58 /* DRAM clock speed, in hz */
68 char board_serial_number[CVMX_BOOTINFO_OCTEON_SERIAL_LEN];
71 #if (CVMX_BOOTINFO_MIN_VER >= 1)
73 * Several boards support compact flash on the Octeon boot
74 * bus. The CF memory spaces may be mapped to different
75 * addresses on different boards. These are the physical
76 * addresses, so care must be taken to use the correct
77 * XKPHYS/KSEG0 addressing depending on the application's
78 * ABI. These values will be 0 if CF is not present.
80 u64 compact_flash_common_base_addr;
81 u64 compact_flash_attribute_base_addr;
83 * Base address of the LED display (as on EBT3000 board)
84 * This will be 0 if LED display not present.
86 u64 led_display_base_addr;
88 #if (CVMX_BOOTINFO_MIN_VER >= 2)
89 /* DFA reference clock in hz (if applicable)*/
93 * flags indicating various configuration options. These
94 * flags supercede the 'flags' variable and should be used
95 * instead if available.
99 #if (CVMX_BOOTINFO_MIN_VER >= 3)
101 * Address of the OF Flattened Device Tree structure
102 * describing the board.
106 #if (CVMX_BOOTINFO_MIN_VER >= 4)
108 * Coremask used for processors with more than 32 cores
109 * or with OCI. This replaces core_mask.
111 struct cvmx_coremask ext_core_mask;
115 #define CVMX_BOOTINFO_CFG_FLAG_PCI_HOST (1ull << 0)
116 #define CVMX_BOOTINFO_CFG_FLAG_PCI_TARGET (1ull << 1)
117 #define CVMX_BOOTINFO_CFG_FLAG_DEBUG (1ull << 2)
118 #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3)
120 * This flag is set if the TLB mappings are not contained in the
121 * 0x10000000 - 0x20000000 boot bus region.
123 #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4)
124 #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5)
126 #endif /* (CVMX_BOOTINFO_MAJ_VER == 1) */
128 #endif /* __CVMX_BOOTINFO_H__ */