Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2012 The Chromium OS Authors. |
| 4 | * (C) Copyright 2002-2010 |
| 5 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __ASM_GENERIC_GBL_DATA_H |
| 9 | #define __ASM_GENERIC_GBL_DATA_H |
| 10 | /* |
| 11 | * The following data structure is placed in some memory which is |
| 12 | * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or |
| 13 | * some locked parts of the data cache) to allow for a minimum set of |
| 14 | * global variables during system initialization (until we have set |
| 15 | * up the memory controller so that we can use RAM). |
| 16 | * |
| 17 | * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t) |
| 18 | * |
| 19 | * Each architecture has its own private fields. For now all are private |
| 20 | */ |
| 21 | |
| 22 | #ifndef __ASSEMBLY__ |
Simon Glass | 7f67b37 | 2024-08-21 10:19:09 -0600 | [diff] [blame] | 23 | #include <board_f.h> |
Simon Glass | aa4bce9 | 2022-03-04 08:43:00 -0700 | [diff] [blame] | 24 | #include <event_internal.h> |
Stefan Roese | 85bddff | 2019-04-12 16:42:28 +0200 | [diff] [blame] | 25 | #include <fdtdec.h> |
Simon Glass | 1bb4923 | 2015-11-08 23:47:48 -0700 | [diff] [blame] | 26 | #include <membuff.h> |
Simon Glass | dd6ab88 | 2014-02-26 15:59:18 -0700 | [diff] [blame] | 27 | #include <linux/list.h> |
Rasmus Villemoes | b8cfd9e | 2021-05-18 11:19:47 +0200 | [diff] [blame] | 28 | #include <linux/build_bug.h> |
| 29 | #include <asm-offsets.h> |
Simon Glass | dd6ab88 | 2014-02-26 15:59:18 -0700 | [diff] [blame] | 30 | |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 31 | struct acpi_ctx; |
Simon Glass | cfd6a00 | 2020-10-03 11:31:33 -0600 | [diff] [blame] | 32 | struct driver_rt; |
Simon Glass | 3a028c2 | 2024-08-07 16:47:30 -0600 | [diff] [blame] | 33 | struct upl; |
Simon Glass | cfd6a00 | 2020-10-03 11:31:33 -0600 | [diff] [blame] | 34 | |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 35 | typedef struct global_data gd_t; |
| 36 | |
| 37 | /** |
| 38 | * struct global_data - global data structure |
| 39 | */ |
| 40 | struct global_data { |
| 41 | /** |
| 42 | * @bd: board information |
| 43 | */ |
Masahiro Yamada | d788bba | 2020-02-25 02:22:27 +0900 | [diff] [blame] | 44 | struct bd_info *bd; |
Simon Glass | 6852467 | 2024-08-21 10:19:23 -0600 | [diff] [blame] | 45 | /** |
| 46 | * @new_gd: pointer to relocated global data |
| 47 | */ |
| 48 | struct global_data *new_gd; |
| 49 | /** |
| 50 | * @fdt_blob: U-Boot's own device tree, NULL if none |
| 51 | */ |
| 52 | const void *fdt_blob; |
| 53 | /** |
Simon Glass | 8a0417f | 2024-08-21 10:19:24 -0600 | [diff] [blame] | 54 | * @cur_serial_dev: current serial device |
| 55 | */ |
| 56 | struct udevice *cur_serial_dev; |
Simon Glass | 209ae76 | 2024-09-29 19:49:49 -0600 | [diff] [blame] | 57 | #ifndef CONFIG_XPL_BUILD |
Simon Glass | 8a0417f | 2024-08-21 10:19:24 -0600 | [diff] [blame] | 58 | /** |
Simon Glass | 6852467 | 2024-08-21 10:19:23 -0600 | [diff] [blame] | 59 | * @jt: jump table |
| 60 | * |
| 61 | * The jump table contains pointers to exported functions. A pointer to |
| 62 | * the jump table is passed to standalone applications. |
| 63 | */ |
| 64 | struct jt_funcs *jt; |
| 65 | /** |
Simon Glass | 7f67b37 | 2024-08-21 10:19:09 -0600 | [diff] [blame] | 66 | * @boardf: information only used before relocation |
| 67 | */ |
| 68 | struct board_f *boardf; |
| 69 | #endif |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 70 | /** |
Simon Glass | 04b480a | 2024-08-21 10:19:21 -0600 | [diff] [blame] | 71 | * @ram_size: RAM size in bytes |
| 72 | */ |
| 73 | phys_size_t ram_size; |
| 74 | /** |
| 75 | * @ram_top: top address of RAM used by U-Boot |
| 76 | */ |
| 77 | phys_addr_t ram_top; |
| 78 | /** |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 79 | * @flags: global data flags |
| 80 | * |
| 81 | * See &enum gd_flags |
| 82 | */ |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 83 | unsigned long flags; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 84 | /** |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 85 | * @cpu_clk: CPU clock rate in Hz |
| 86 | */ |
| 87 | unsigned long cpu_clk; |
Simon Glass | ee8e6a6 | 2024-08-21 10:19:25 -0600 | [diff] [blame] | 88 | #if CONFIG_IS_ENABLED(ENV_SUPPORT) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 89 | /** |
Simon Glass | fe61684 | 2024-08-21 10:19:20 -0600 | [diff] [blame] | 90 | * @env_addr: address of environment structure |
| 91 | * |
| 92 | * @env_addr contains the address of the structure holding the |
| 93 | * environment variables. |
| 94 | */ |
| 95 | unsigned long env_addr; |
Simon Glass | ee8e6a6 | 2024-08-21 10:19:25 -0600 | [diff] [blame] | 96 | #endif /* ENV_SUPPORT */ |
Simon Glass | fe61684 | 2024-08-21 10:19:20 -0600 | [diff] [blame] | 97 | /** |
Simon Glass | dbd8eb2 | 2024-08-21 10:19:22 -0600 | [diff] [blame] | 98 | * @ram_base: base address of RAM used by U-Boot |
| 99 | */ |
| 100 | unsigned long ram_base; |
| 101 | /** |
| 102 | * @relocaddr: start address of U-Boot in RAM |
| 103 | * |
| 104 | * After relocation this field indicates the address to which U-Boot |
| 105 | * has been relocated. It can be displayed using the bdinfo command. |
| 106 | * Its value is needed to display the source code when debugging with |
| 107 | * GDB using the 'add-symbol-file u-boot <relocaddr>' command. |
| 108 | */ |
| 109 | unsigned long relocaddr; |
| 110 | /** |
| 111 | * @irq_sp: IRQ stack pointer |
| 112 | */ |
| 113 | unsigned long irq_sp; |
| 114 | /** |
| 115 | * @start_addr_sp: initial stack pointer address |
| 116 | */ |
| 117 | unsigned long start_addr_sp; |
| 118 | /** |
| 119 | * @reloc_off: relocation offset |
| 120 | */ |
| 121 | unsigned long reloc_off; |
| 122 | /** |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 123 | * @bus_clk: platform clock rate in Hz |
| 124 | */ |
Simon Glass | f782d54 | 2024-08-21 10:19:15 -0600 | [diff] [blame] | 125 | unsigned int bus_clk; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 126 | /** |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 127 | * @mem_clk: memory clock rate in Hz |
| 128 | */ |
Simon Glass | f782d54 | 2024-08-21 10:19:15 -0600 | [diff] [blame] | 129 | unsigned int mem_clk; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 130 | /** |
Simon Glass | 0b6675d | 2024-08-21 10:19:16 -0600 | [diff] [blame] | 131 | * @mon_len: monitor length in bytes |
| 132 | */ |
| 133 | unsigned int mon_len; |
| 134 | /** |
Simon Glass | df71aab | 2024-08-21 10:19:19 -0600 | [diff] [blame] | 135 | * @baudrate: baud rate of the serial interface |
| 136 | */ |
| 137 | unsigned int baudrate; |
Simon Glass | ee8e6a6 | 2024-08-21 10:19:25 -0600 | [diff] [blame] | 138 | #if CONFIG_IS_ENABLED(ENV_SUPPORT) |
Simon Glass | df71aab | 2024-08-21 10:19:19 -0600 | [diff] [blame] | 139 | /** |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 140 | * @env_has_init: bit mask indicating environment locations |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 141 | * |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 142 | * &enum env_location defines which bit relates to which location |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 143 | */ |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 144 | unsigned short env_has_init; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 145 | /** |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 146 | * @env_valid: environment is valid |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 147 | * |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 148 | * See &enum env_valid |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 149 | */ |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 150 | unsigned char env_valid; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 151 | /** |
| 152 | * @env_load_prio: priority of the loaded environment |
| 153 | */ |
Simon Glass | c726f28 | 2024-08-21 10:19:08 -0600 | [diff] [blame] | 154 | char env_load_prio; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 155 | /** |
Simon Glass | a9ffc54 | 2024-08-21 10:19:14 -0600 | [diff] [blame] | 156 | * @env_buf: buffer for env_get() before reloc |
| 157 | */ |
| 158 | char env_buf[32]; |
Simon Glass | ee8e6a6 | 2024-08-21 10:19:25 -0600 | [diff] [blame] | 159 | #endif /* ENV_SUPPORT */ |
| 160 | /** |
| 161 | * @fdt_src: Source of FDT |
| 162 | */ |
| 163 | enum fdt_source_t fdt_src; |
Simon Glass | a9ffc54 | 2024-08-21 10:19:14 -0600 | [diff] [blame] | 164 | /** |
Simon Glass | a9ffc54 | 2024-08-21 10:19:14 -0600 | [diff] [blame] | 165 | * @arch: architecture-specific data |
| 166 | */ |
| 167 | struct arch_global_data arch; |
| 168 | /** |
| 169 | * @dmtag_list: List of DM tags |
| 170 | */ |
| 171 | struct list_head dmtag_list; |
| 172 | /** |
| 173 | * @timebase_h: high 32 bits of timer |
| 174 | */ |
| 175 | unsigned int timebase_h; |
| 176 | /** |
| 177 | * @timebase_l: low 32 bits of timer |
| 178 | */ |
| 179 | unsigned int timebase_l; |
| 180 | #if defined(CONFIG_POST) |
| 181 | /** |
| 182 | * @post_log_word: active POST tests |
| 183 | * |
| 184 | * @post_log_word is a bit mask defining which POST tests are recorded |
| 185 | * (see constants POST_*). |
| 186 | */ |
| 187 | unsigned long post_log_word; |
| 188 | /** |
| 189 | * @post_log_res: POST results |
| 190 | * |
| 191 | * @post_log_res is a bit mask with the POST results. A bit with value 1 |
| 192 | * indicates successful execution. |
| 193 | */ |
| 194 | unsigned long post_log_res; |
| 195 | /** |
| 196 | * @post_init_f_time: time in ms when post_init_f() started |
| 197 | */ |
| 198 | unsigned long post_init_f_time; |
| 199 | #endif |
| 200 | #ifdef CONFIG_BOARD_TYPES |
| 201 | /** |
| 202 | * @board_type: board type |
| 203 | * |
| 204 | * If a U-Boot configuration supports multiple board types, the actual |
| 205 | * board type may be stored in this field. |
| 206 | */ |
| 207 | unsigned long board_type; |
| 208 | #endif |
| 209 | #if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) |
| 210 | /** |
| 211 | * @precon_buf_idx: pre-console buffer index |
| 212 | * |
| 213 | * @precon_buf_idx indicates the current position of the |
| 214 | * buffer used to collect output before the console becomes |
| 215 | * available. When negative, the pre-console buffer is |
| 216 | * temporarily disabled (used when the pre-console buffer is |
| 217 | * being written out, to prevent adding its contents to |
| 218 | * itself). |
| 219 | */ |
| 220 | long precon_buf_idx; |
| 221 | #endif |
Simon Glass | dd6ab88 | 2014-02-26 15:59:18 -0700 | [diff] [blame] | 222 | #ifdef CONFIG_DM |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 223 | /** |
| 224 | * @dm_root: root instance for Driver Model |
| 225 | */ |
| 226 | struct udevice *dm_root; |
| 227 | /** |
Heinrich Schuchardt | 18000fe | 2021-01-24 21:48:00 +0100 | [diff] [blame] | 228 | * @uclass_root_s: |
| 229 | * head of core tree when uclasses are not in read-only memory. |
| 230 | * |
| 231 | * When uclasses are in read-only memory, @uclass_root_s is not used and |
| 232 | * @uclass_root points to the root node generated by dtoc. |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 233 | */ |
Simon Glass | 784cd9e | 2020-12-19 10:40:17 -0700 | [diff] [blame] | 234 | struct list_head uclass_root_s; |
| 235 | /** |
Heinrich Schuchardt | 18000fe | 2021-01-24 21:48:00 +0100 | [diff] [blame] | 236 | * @uclass_root: |
| 237 | * pointer to head of core tree, if uclasses are in read-only memory and |
| 238 | * cannot be adjusted to use @uclass_root as a list head. |
| 239 | * |
| 240 | * When not in read-only memory, @uclass_root_s is used to hold the |
| 241 | * uclass root, and @uclass_root points to the address of |
| 242 | * @uclass_root_s. |
Simon Glass | 784cd9e | 2020-12-19 10:40:17 -0700 | [diff] [blame] | 243 | */ |
| 244 | struct list_head *uclass_root; |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 245 | # if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT) |
Simon Glass | 9286eb9 | 2020-11-29 17:07:05 -0700 | [diff] [blame] | 246 | /** @dm_driver_rt: Dynamic info about the driver */ |
Simon Glass | cfd6a00 | 2020-10-03 11:31:33 -0600 | [diff] [blame] | 247 | struct driver_rt *dm_driver_rt; |
| 248 | # endif |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 249 | #if CONFIG_IS_ENABLED(OF_PLATDATA_RT) |
| 250 | /** @dm_udevice_rt: Dynamic info about the udevice */ |
| 251 | struct udevice_rt *dm_udevice_rt; |
Simon Glass | 8dee67a | 2021-03-15 17:25:38 +1300 | [diff] [blame] | 252 | /** |
| 253 | * @dm_priv_base: Base address of the priv/plat region used when |
| 254 | * udevices and uclasses are in read-only memory. This is NULL if not |
| 255 | * used |
| 256 | */ |
| 257 | void *dm_priv_base; |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 258 | # endif |
Simon Glass | dd6ab88 | 2014-02-26 15:59:18 -0700 | [diff] [blame] | 259 | #endif |
Thomas Chou | fb798b1 | 2015-10-09 13:46:34 +0800 | [diff] [blame] | 260 | #ifdef CONFIG_TIMER |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 261 | /** |
| 262 | * @timer: timer instance for Driver Model |
| 263 | */ |
| 264 | struct udevice *timer; |
Thomas Chou | fb798b1 | 2015-10-09 13:46:34 +0800 | [diff] [blame] | 265 | #endif |
Simon Glass | 40916e6 | 2020-10-03 09:25:22 -0600 | [diff] [blame] | 266 | #if CONFIG_IS_ENABLED(OF_LIVE) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 267 | /** |
| 268 | * @of_root: root node of the live tree |
| 269 | */ |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 270 | struct device_node *of_root; |
| 271 | #endif |
Jean-Jacques Hiblot | 7c530e3 | 2018-12-07 14:50:52 +0100 | [diff] [blame] | 272 | #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 273 | /** |
| 274 | * @multi_dtb_fit: pointer to uncompressed multi-dtb FIT image |
| 275 | */ |
| 276 | const void *multi_dtb_fit; |
Jean-Jacques Hiblot | 7c530e3 | 2018-12-07 14:50:52 +0100 | [diff] [blame] | 277 | #endif |
Simon Glass | 209a1a6 | 2013-06-11 11:14:42 -0700 | [diff] [blame] | 278 | #ifdef CONFIG_TRACE |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 279 | /** |
| 280 | * @trace_buff: trace buffer |
| 281 | * |
| 282 | * When tracing function in U-Boot this field points to the buffer |
| 283 | * recording the function calls. |
| 284 | */ |
| 285 | void *trace_buff; |
Simon Glass | 209a1a6 | 2013-06-11 11:14:42 -0700 | [diff] [blame] | 286 | #endif |
Tom Rini | 52b2e26 | 2021-08-18 23:12:24 -0400 | [diff] [blame] | 287 | #if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 288 | /** |
| 289 | * @cur_i2c_bus: currently used I2C bus |
| 290 | */ |
| 291 | int cur_i2c_bus; |
Heiko Schocher | e7d9c4f | 2012-01-16 21:12:23 +0000 | [diff] [blame] | 292 | #endif |
Simon Glass | a9ffc54 | 2024-08-21 10:19:14 -0600 | [diff] [blame] | 293 | #if CONFIG_IS_ENABLED(CMD_BDINFO_EXTRA) |
Simon Glass | 345c974 | 2023-07-15 21:38:53 -0600 | [diff] [blame] | 294 | /** |
| 295 | * @malloc_start: start of malloc() region |
| 296 | */ |
Simon Glass | 345c974 | 2023-07-15 21:38:53 -0600 | [diff] [blame] | 297 | unsigned long malloc_start; |
| 298 | #endif |
Simon Glass | adad2d0 | 2023-09-26 08:14:27 -0600 | [diff] [blame] | 299 | #if CONFIG_IS_ENABLED(SYS_MALLOC_F) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 300 | /** |
| 301 | * @malloc_base: base address of early malloc() |
| 302 | */ |
| 303 | unsigned long malloc_base; |
| 304 | /** |
Simon Glass | 91bbb3b | 2024-08-23 14:27:04 -0600 | [diff] [blame] | 305 | * @malloc_limit: maximum size of early malloc() |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 306 | */ |
Simon Glass | 91bbb3b | 2024-08-23 14:27:04 -0600 | [diff] [blame] | 307 | unsigned int malloc_limit; |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 308 | /** |
Simon Glass | 91bbb3b | 2024-08-23 14:27:04 -0600 | [diff] [blame] | 309 | * @malloc_ptr: currently used bytes of early malloc() |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 310 | */ |
Simon Glass | 91bbb3b | 2024-08-23 14:27:04 -0600 | [diff] [blame] | 311 | unsigned int malloc_ptr; |
Simon Glass | 863e404 | 2014-07-10 22:23:28 -0600 | [diff] [blame] | 312 | #endif |
Simon Glass | 1bb4923 | 2015-11-08 23:47:48 -0700 | [diff] [blame] | 313 | #ifdef CONFIG_CONSOLE_RECORD |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 314 | /** |
| 315 | * @console_out: output buffer for console recording |
| 316 | * |
| 317 | * This buffer is used to collect output during console recording. |
| 318 | */ |
| 319 | struct membuff console_out; |
| 320 | /** |
| 321 | * @console_in: input buffer for console recording |
| 322 | * |
| 323 | * If console recording is activated, this buffer can be used to |
| 324 | * emulate input. |
| 325 | */ |
| 326 | struct membuff console_in; |
Simon Glass | 1bb4923 | 2015-11-08 23:47:48 -0700 | [diff] [blame] | 327 | #endif |
Nikhil M Jain | 7f561e1 | 2023-04-20 17:41:10 +0530 | [diff] [blame] | 328 | #if CONFIG_IS_ENABLED(VIDEO) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 329 | /** |
| 330 | * @video_top: top of video frame buffer area |
| 331 | */ |
| 332 | ulong video_top; |
| 333 | /** |
| 334 | * @video_bottom: bottom of video frame buffer area |
| 335 | */ |
| 336 | ulong video_bottom; |
Simon Glass | fce58f5 | 2016-01-18 19:52:21 -0700 | [diff] [blame] | 337 | #endif |
Simon Glass | 8820033 | 2017-05-22 05:05:25 -0600 | [diff] [blame] | 338 | #ifdef CONFIG_BOOTSTAGE |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 339 | /** |
| 340 | * @bootstage: boot stage information |
| 341 | */ |
| 342 | struct bootstage_data *bootstage; |
Simon Glass | 8820033 | 2017-05-22 05:05:25 -0600 | [diff] [blame] | 343 | #endif |
Simon Glass | d95645d | 2017-12-04 13:48:24 -0700 | [diff] [blame] | 344 | #ifdef CONFIG_LOG |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 345 | /** |
Simon Glass | 9113dd3 | 2024-08-21 10:19:17 -0600 | [diff] [blame] | 346 | * @log_head: list of logging devices |
| 347 | */ |
| 348 | struct list_head log_head; |
| 349 | /** |
| 350 | * @log_fmt: bit mask for logging format |
| 351 | * |
| 352 | * The @log_fmt bit mask selects the fields to be shown in log messages. |
| 353 | * &enum log_fmt defines the bits of the bit mask. |
| 354 | */ |
| 355 | /** |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 356 | * @log_drop_count: number of dropped log messages |
| 357 | * |
| 358 | * This counter is incremented for each log message which can not |
| 359 | * be processed because logging is not yet available as signaled by |
| 360 | * flag %GD_FLG_LOG_READY in @flags. |
| 361 | */ |
| 362 | int log_drop_count; |
| 363 | /** |
| 364 | * @default_log_level: default logging level |
| 365 | * |
| 366 | * For logging devices without filters @default_log_level defines the |
| 367 | * logging level, cf. &enum log_level_t. |
| 368 | */ |
Simon Glass | 9113dd3 | 2024-08-21 10:19:17 -0600 | [diff] [blame] | 369 | char default_log_level; |
| 370 | char log_fmt; |
Heinrich Schuchardt | 0fc9f4f | 2020-10-17 14:31:58 +0200 | [diff] [blame] | 371 | /** |
| 372 | * @logc_prev: logging category of previous message |
| 373 | * |
| 374 | * This value is used as logging category for continuation messages. |
| 375 | */ |
Simon Glass | 9113dd3 | 2024-08-21 10:19:17 -0600 | [diff] [blame] | 376 | unsigned char logc_prev; |
Heinrich Schuchardt | 0fc9f4f | 2020-10-17 14:31:58 +0200 | [diff] [blame] | 377 | /** |
Heinrich Schuchardt | 14e7722 | 2020-10-30 18:50:31 +0100 | [diff] [blame] | 378 | * @logl_prev: logging level of the previous message |
Heinrich Schuchardt | 0fc9f4f | 2020-10-17 14:31:58 +0200 | [diff] [blame] | 379 | * |
| 380 | * This value is used as logging level for continuation messages. |
| 381 | */ |
Simon Glass | 9113dd3 | 2024-08-21 10:19:17 -0600 | [diff] [blame] | 382 | unsigned char logl_prev; |
Simon Glass | 5fc47e3 | 2021-01-20 20:10:53 -0700 | [diff] [blame] | 383 | /** |
| 384 | * @log_cont: Previous log line did not finished wtih \n |
| 385 | * |
| 386 | * This allows for chained log messages on the same line |
| 387 | */ |
| 388 | bool log_cont; |
Simon Glass | 9113dd3 | 2024-08-21 10:19:17 -0600 | [diff] [blame] | 389 | /** |
| 390 | * @processing_msg: a log message is being processed |
| 391 | * |
| 392 | * This flag is used to suppress the creation of additional messages |
| 393 | * while another message is being processed. |
| 394 | */ |
| 395 | bool processing_msg; |
Simon Glass | d95645d | 2017-12-04 13:48:24 -0700 | [diff] [blame] | 396 | #endif |
Simon Glass | a815dab | 2018-11-15 18:43:52 -0700 | [diff] [blame] | 397 | #if CONFIG_IS_ENABLED(BLOBLIST) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 398 | /** |
| 399 | * @bloblist: blob list information |
| 400 | */ |
| 401 | struct bloblist_hdr *bloblist; |
Ovidiu Panait | c1b30d5 | 2020-11-28 10:43:20 +0200 | [diff] [blame] | 402 | #endif |
Stefan Roese | 85bddff | 2019-04-12 16:42:28 +0200 | [diff] [blame] | 403 | #if defined(CONFIG_TRANSLATION_OFFSET) |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 404 | /** |
| 405 | * @translation_offset: optional translation offset |
| 406 | * |
| 407 | * See CONFIG_TRANSLATION_OFFSET. |
| 408 | */ |
| 409 | fdt_addr_t translation_offset; |
Stefan Roese | 85bddff | 2019-04-12 16:42:28 +0200 | [diff] [blame] | 410 | #endif |
Simon Glass | cf1f4bb | 2023-05-04 16:54:59 -0600 | [diff] [blame] | 411 | #ifdef CONFIG_ACPI |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 412 | /** |
| 413 | * @acpi_ctx: ACPI context pointer |
| 414 | */ |
| 415 | struct acpi_ctx *acpi_ctx; |
Simon Glass | b33f2f9 | 2021-12-01 09:02:37 -0700 | [diff] [blame] | 416 | /** |
| 417 | * @acpi_start: Start address of ACPI tables |
| 418 | */ |
| 419 | ulong acpi_start; |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 420 | #endif |
Simon Glass | a05eb04 | 2021-02-04 21:17:20 -0700 | [diff] [blame] | 421 | #if CONFIG_IS_ENABLED(GENERATE_SMBIOS_TABLE) |
| 422 | /** |
| 423 | * @smbios_version: Points to SMBIOS type 0 version |
| 424 | */ |
| 425 | char *smbios_version; |
| 426 | #endif |
Simon Glass | aa4bce9 | 2022-03-04 08:43:00 -0700 | [diff] [blame] | 427 | #if CONFIG_IS_ENABLED(EVENT) |
| 428 | /** |
| 429 | * @event_state: Points to the current state of events |
| 430 | */ |
| 431 | struct event_state event_state; |
| 432 | #endif |
Simon Glass | 0b38522 | 2024-07-31 08:44:08 -0600 | [diff] [blame] | 433 | #if CONFIG_IS_ENABLED(CYCLIC) |
Stefan Roese | 036f89a | 2022-09-02 13:57:48 +0200 | [diff] [blame] | 434 | /** |
Rasmus Villemoes | c794e49 | 2022-10-28 13:50:54 +0200 | [diff] [blame] | 435 | * @cyclic_list: list of registered cyclic functions |
Stefan Roese | 036f89a | 2022-09-02 13:57:48 +0200 | [diff] [blame] | 436 | */ |
Rasmus Villemoes | c794e49 | 2022-10-28 13:50:54 +0200 | [diff] [blame] | 437 | struct hlist_head cyclic_list; |
Stefan Roese | 036f89a | 2022-09-02 13:57:48 +0200 | [diff] [blame] | 438 | #endif |
Simon Glass | 3a028c2 | 2024-08-07 16:47:30 -0600 | [diff] [blame] | 439 | #if CONFIG_IS_ENABLED(UPL) |
| 440 | /** |
| 441 | * @upl: Universal Payload-handoff information |
| 442 | */ |
| 443 | struct upl *upl; |
| 444 | #endif |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 445 | }; |
Rasmus Villemoes | b8cfd9e | 2021-05-18 11:19:47 +0200 | [diff] [blame] | 446 | #ifndef DO_DEPS_ONLY |
| 447 | static_assert(sizeof(struct global_data) == GD_SIZE); |
| 448 | #endif |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 449 | |
Heinrich Schuchardt | 50d9286 | 2020-10-05 08:30:09 +0200 | [diff] [blame] | 450 | /** |
| 451 | * gd_board_type() - retrieve board type |
| 452 | * |
| 453 | * Return: global board type |
| 454 | */ |
Simon Glass | b4de3f3 | 2017-03-31 08:40:24 -0600 | [diff] [blame] | 455 | #ifdef CONFIG_BOARD_TYPES |
| 456 | #define gd_board_type() gd->board_type |
| 457 | #else |
| 458 | #define gd_board_type() 0 |
| 459 | #endif |
| 460 | |
Simon Glass | 40916e6 | 2020-10-03 09:25:22 -0600 | [diff] [blame] | 461 | /* These macros help avoid #ifdefs in the code */ |
| 462 | #if CONFIG_IS_ENABLED(OF_LIVE) |
| 463 | #define gd_of_root() gd->of_root |
| 464 | #define gd_of_root_ptr() &gd->of_root |
| 465 | #define gd_set_of_root(_root) gd->of_root = (_root) |
| 466 | #else |
| 467 | #define gd_of_root() NULL |
| 468 | #define gd_of_root_ptr() NULL |
| 469 | #define gd_set_of_root(_root) |
| 470 | #endif |
| 471 | |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 472 | #if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT) |
Simon Glass | cfd6a00 | 2020-10-03 11:31:33 -0600 | [diff] [blame] | 473 | #define gd_set_dm_driver_rt(dyn) gd->dm_driver_rt = dyn |
| 474 | #define gd_dm_driver_rt() gd->dm_driver_rt |
| 475 | #else |
| 476 | #define gd_set_dm_driver_rt(dyn) |
| 477 | #define gd_dm_driver_rt() NULL |
| 478 | #endif |
| 479 | |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 480 | #if CONFIG_IS_ENABLED(OF_PLATDATA_RT) |
| 481 | #define gd_set_dm_udevice_rt(dyn) gd->dm_udevice_rt = dyn |
| 482 | #define gd_dm_udevice_rt() gd->dm_udevice_rt |
Simon Glass | 8dee67a | 2021-03-15 17:25:38 +1300 | [diff] [blame] | 483 | #define gd_set_dm_priv_base(dyn) gd->dm_priv_base = dyn |
| 484 | #define gd_dm_priv_base() gd->dm_priv_base |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 485 | #else |
| 486 | #define gd_set_dm_udevice_rt(dyn) |
| 487 | #define gd_dm_udevice_rt() NULL |
Simon Glass | 8dee67a | 2021-03-15 17:25:38 +1300 | [diff] [blame] | 488 | #define gd_set_dm_priv_base(dyn) |
| 489 | #define gd_dm_priv_base() NULL |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 490 | #endif |
| 491 | |
Simon Glass | cf1f4bb | 2023-05-04 16:54:59 -0600 | [diff] [blame] | 492 | #ifdef CONFIG_ACPI |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 493 | #define gd_acpi_ctx() gd->acpi_ctx |
Simon Glass | b33f2f9 | 2021-12-01 09:02:37 -0700 | [diff] [blame] | 494 | #define gd_acpi_start() gd->acpi_start |
| 495 | #define gd_set_acpi_start(addr) gd->acpi_start = addr |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 496 | #else |
| 497 | #define gd_acpi_ctx() NULL |
Simon Glass | b33f2f9 | 2021-12-01 09:02:37 -0700 | [diff] [blame] | 498 | #define gd_acpi_start() 0UL |
| 499 | #define gd_set_acpi_start(addr) |
Simon Glass | de0115a | 2020-11-04 09:57:19 -0700 | [diff] [blame] | 500 | #endif |
| 501 | |
Simon Glass | 9b38810 | 2023-09-19 21:00:15 -0600 | [diff] [blame] | 502 | #ifdef CONFIG_SMBIOS |
Simon Glass | 42b7da5 | 2023-12-31 08:25:48 -0700 | [diff] [blame] | 503 | #define gd_smbios_start() gd->arch.smbios_start |
Simon Glass | 9b38810 | 2023-09-19 21:00:15 -0600 | [diff] [blame] | 504 | #define gd_set_smbios_start(addr) gd->arch.smbios_start = addr |
| 505 | #else |
| 506 | #define gd_smbios_start() 0UL |
| 507 | #define gd_set_smbios_start(addr) |
| 508 | #endif |
| 509 | |
Simon Glass | 69daf5a | 2021-12-16 20:59:25 -0700 | [diff] [blame] | 510 | #if CONFIG_IS_ENABLED(MULTI_DTB_FIT) |
| 511 | #define gd_multi_dtb_fit() gd->multi_dtb_fit |
| 512 | #define gd_set_multi_dtb_fit(_dtb) gd->multi_dtb_fit = _dtb |
| 513 | #else |
| 514 | #define gd_multi_dtb_fit() NULL |
| 515 | #define gd_set_multi_dtb_fit(_dtb) |
| 516 | #endif |
| 517 | |
Simon Glass | aa4bce9 | 2022-03-04 08:43:00 -0700 | [diff] [blame] | 518 | #if CONFIG_IS_ENABLED(EVENT_DYNAMIC) |
| 519 | #define gd_event_state() ((struct event_state *)&gd->event_state) |
| 520 | #else |
| 521 | #define gd_event_state() NULL |
| 522 | #endif |
| 523 | |
Simon Glass | 345c974 | 2023-07-15 21:38:53 -0600 | [diff] [blame] | 524 | #if CONFIG_IS_ENABLED(CMD_BDINFO_EXTRA) |
| 525 | #define gd_malloc_start() gd->malloc_start |
| 526 | #define gd_set_malloc_start(_val) gd->malloc_start = (_val) |
| 527 | #else |
| 528 | #define gd_malloc_start() 0 |
| 529 | #define gd_set_malloc_start(val) |
| 530 | #endif |
Troy Kisky | e143c27 | 2023-03-13 14:31:43 -0700 | [diff] [blame] | 531 | |
Simon Glass | e8804d7 | 2023-09-26 08:14:31 -0600 | [diff] [blame] | 532 | #if CONFIG_VAL(SYS_MALLOC_F_LEN) |
| 533 | #define gd_malloc_ptr() gd->malloc_ptr |
| 534 | #else |
| 535 | #define gd_malloc_ptr() 0L |
| 536 | #endif |
| 537 | |
Simon Glass | 3a028c2 | 2024-08-07 16:47:30 -0600 | [diff] [blame] | 538 | #if CONFIG_IS_ENABLED(UPL) |
| 539 | #define gd_upl() gd->upl |
| 540 | #define gd_set_upl(_val) gd->upl = (_val) |
| 541 | #else |
| 542 | #define gd_upl() NULL |
| 543 | #define gd_set_upl(val) |
| 544 | #endif |
| 545 | |
Simon Glass | 78be640 | 2024-10-21 10:19:27 +0200 | [diff] [blame] | 546 | #if CONFIG_IS_ENABLED(BLOBLIST) |
| 547 | #define gd_bloblist() gd->bloblist |
Simon Glass | be277ee | 2024-10-28 13:47:53 +0100 | [diff] [blame] | 548 | #define gd_set_bloblist(_val) gd->bloblist = (_val) |
Simon Glass | 78be640 | 2024-10-21 10:19:27 +0200 | [diff] [blame] | 549 | #else |
| 550 | #define gd_bloblist() NULL |
Simon Glass | be277ee | 2024-10-28 13:47:53 +0100 | [diff] [blame] | 551 | #define gd_set_bloblist(_val) |
Simon Glass | 78be640 | 2024-10-21 10:19:27 +0200 | [diff] [blame] | 552 | #endif |
| 553 | |
| 554 | #if CONFIG_IS_ENABLED(BOOTSTAGE) |
| 555 | #define gd_bootstage() gd->bootstage |
| 556 | #else |
| 557 | #define gd_bootstage() NULL |
| 558 | #endif |
| 559 | |
| 560 | #if CONFIG_IS_ENABLED(TRACE) |
| 561 | #define gd_trace_buff() gd->trace_buff |
| 562 | #define gd_trace_size() CONFIG_TRACE_BUFFER_SIZE |
| 563 | #else |
| 564 | #define gd_trace_buff() NULL |
| 565 | #define gd_trace_size() 0 |
| 566 | #endif |
| 567 | |
| 568 | #if CONFIG_IS_ENABLED(VIDEO) |
| 569 | #define gd_video_top() gd->video_top |
| 570 | #define gd_video_bottom() gd->video_bottom |
| 571 | #define gd_video_size() (gd->video_top - gd->video_bottom) |
| 572 | #else |
| 573 | #define gd_video_top() 0 |
| 574 | #define gd_video_bottom() 0 |
| 575 | #define gd_video_size() 0 |
| 576 | #endif |
| 577 | |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 578 | /** |
| 579 | * enum gd_flags - global data flags |
| 580 | * |
| 581 | * See field flags of &struct global_data. |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 582 | */ |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 583 | enum gd_flags { |
| 584 | /** |
| 585 | * @GD_FLG_RELOC: code was relocated to RAM |
| 586 | */ |
| 587 | GD_FLG_RELOC = 0x00001, |
| 588 | /** |
| 589 | * @GD_FLG_DEVINIT: devices have been initialized |
| 590 | */ |
| 591 | GD_FLG_DEVINIT = 0x00002, |
| 592 | /** |
| 593 | * @GD_FLG_SILENT: silent mode |
| 594 | */ |
| 595 | GD_FLG_SILENT = 0x00004, |
| 596 | /** |
| 597 | * @GD_FLG_POSTFAIL: critical POST test failed |
| 598 | */ |
| 599 | GD_FLG_POSTFAIL = 0x00008, |
| 600 | /** |
| 601 | * @GD_FLG_POSTSTOP: POST sequence aborted |
| 602 | */ |
| 603 | GD_FLG_POSTSTOP = 0x00010, |
| 604 | /** |
| 605 | * @GD_FLG_LOGINIT: log Buffer has been initialized |
| 606 | */ |
| 607 | GD_FLG_LOGINIT = 0x00020, |
| 608 | /** |
| 609 | * @GD_FLG_DISABLE_CONSOLE: disable console (in & out) |
| 610 | */ |
| 611 | GD_FLG_DISABLE_CONSOLE = 0x00040, |
| 612 | /** |
| 613 | * @GD_FLG_ENV_READY: environment imported into hash table |
| 614 | */ |
| 615 | GD_FLG_ENV_READY = 0x00080, |
| 616 | /** |
| 617 | * @GD_FLG_SERIAL_READY: pre-relocation serial console ready |
| 618 | */ |
| 619 | GD_FLG_SERIAL_READY = 0x00100, |
| 620 | /** |
| 621 | * @GD_FLG_FULL_MALLOC_INIT: full malloc() is ready |
| 622 | */ |
| 623 | GD_FLG_FULL_MALLOC_INIT = 0x00200, |
| 624 | /** |
| 625 | * @GD_FLG_SPL_INIT: spl_init() has been called |
| 626 | */ |
| 627 | GD_FLG_SPL_INIT = 0x00400, |
| 628 | /** |
| 629 | * @GD_FLG_SKIP_RELOC: don't relocate |
| 630 | */ |
| 631 | GD_FLG_SKIP_RELOC = 0x00800, |
| 632 | /** |
| 633 | * @GD_FLG_RECORD: record console |
| 634 | */ |
| 635 | GD_FLG_RECORD = 0x01000, |
| 636 | /** |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 637 | * @GD_FLG_RECORD_OVF: record console overflow |
| 638 | */ |
| 639 | GD_FLG_RECORD_OVF = 0x02000, |
| 640 | /** |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 641 | * @GD_FLG_ENV_DEFAULT: default variable flag |
| 642 | */ |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 643 | GD_FLG_ENV_DEFAULT = 0x04000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 644 | /** |
| 645 | * @GD_FLG_SPL_EARLY_INIT: early SPL initialization is done |
| 646 | */ |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 647 | GD_FLG_SPL_EARLY_INIT = 0x08000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 648 | /** |
| 649 | * @GD_FLG_LOG_READY: log system is ready for use |
| 650 | */ |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 651 | GD_FLG_LOG_READY = 0x10000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 652 | /** |
Stefan Roese | 5128a87 | 2022-11-17 09:20:34 +0100 | [diff] [blame] | 653 | * @GD_FLG_CYCLIC_RUNNING: cyclic_run is in progress |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 654 | */ |
Stefan Roese | 5128a87 | 2022-11-17 09:20:34 +0100 | [diff] [blame] | 655 | GD_FLG_CYCLIC_RUNNING = 0x20000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 656 | /** |
| 657 | * @GD_FLG_SKIP_LL_INIT: don't perform low-level initialization |
| 658 | */ |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 659 | GD_FLG_SKIP_LL_INIT = 0x40000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 660 | /** |
| 661 | * @GD_FLG_SMP_READY: SMP initialization is complete |
| 662 | */ |
Simon Glass | d6ed4af | 2021-05-08 06:59:56 -0600 | [diff] [blame] | 663 | GD_FLG_SMP_READY = 0x80000, |
Simon Glass | 60f0899 | 2022-09-06 20:27:06 -0600 | [diff] [blame] | 664 | /** |
| 665 | * @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests |
| 666 | */ |
| 667 | GD_FLG_FDT_CHANGED = 0x100000, |
Simon Glass | c2727e5 | 2023-02-13 08:56:32 -0700 | [diff] [blame] | 668 | /** |
| 669 | * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags |
| 670 | */ |
| 671 | GD_FLG_OF_TAG_MIGRATE = 0x200000, |
Simon Glass | 31ef834 | 2023-09-07 09:58:13 -0600 | [diff] [blame] | 672 | /** |
| 673 | * @GD_FLG_DM_DEAD: Driver model is not accessible. This can be set when |
| 674 | * the memory used to holds its tables has been mapped out. |
| 675 | */ |
| 676 | GD_FLG_DM_DEAD = 0x400000, |
Simon Glass | a28f39c | 2023-09-26 08:14:51 -0600 | [diff] [blame] | 677 | /** |
| 678 | * @GD_FLG_BLOBLIST_READY: bloblist is ready for use |
| 679 | */ |
| 680 | GD_FLG_BLOBLIST_READY = 0x800000, |
Francis Laniel | 1239d23 | 2023-12-22 22:02:30 +0100 | [diff] [blame] | 681 | /** |
| 682 | * @GD_FLG_HUSH_OLD_PARSER: Use hush old parser. |
| 683 | */ |
| 684 | GD_FLG_HUSH_OLD_PARSER = 0x1000000, |
Francis Laniel | 3b66e57 | 2023-12-22 22:02:32 +0100 | [diff] [blame] | 685 | /** |
| 686 | * @GD_FLG_HUSH_MODERN_PARSER: Use hush 2021 parser. |
| 687 | */ |
| 688 | GD_FLG_HUSH_MODERN_PARSER = 0x2000000, |
Simon Glass | 9b5bfba | 2024-08-07 16:47:33 -0600 | [diff] [blame] | 689 | /** |
| 690 | * @GD_FLG_UPL: Read/write a Universal Payload (UPL) handoff |
| 691 | */ |
| 692 | GD_FLG_UPL = 0x4000000, |
Simon Glass | d4b0fdb | 2024-08-21 10:19:04 -0600 | [diff] [blame] | 693 | /** |
| 694 | * @GD_FLG_HAVE_CONSOLE: serial_init() was called and a console |
| 695 | * is available. When not set, indicates that console input and output |
| 696 | * drivers shall not be called. |
| 697 | */ |
| 698 | GD_FLG_HAVE_CONSOLE = 0x8000000, |
Heinrich Schuchardt | 1e5c4fe | 2020-10-05 08:30:08 +0200 | [diff] [blame] | 699 | }; |
| 700 | |
| 701 | #endif /* __ASSEMBLY__ */ |
Simon Glass | 0e72403 | 2012-12-13 20:49:12 +0000 | [diff] [blame] | 702 | |
| 703 | #endif /* __ASM_GENERIC_GBL_DATA_H */ |