1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright (c) 2019 Western Digital Corporation or its affiliates.
5 * Based on include/sbi/{fw_dynamic.h,sbi_scratch.h} from the OpenSBI project.
10 /** Expected value of info magic ('OSBI' ascii string in hex) */
11 #define FW_DYNAMIC_INFO_MAGIC_VALUE 0x4942534f
13 /** Maximum supported info version */
14 #define FW_DYNAMIC_INFO_VERSION 0x1
16 /** Possible next mode values */
17 #define FW_DYNAMIC_INFO_NEXT_MODE_U 0x0
18 #define FW_DYNAMIC_INFO_NEXT_MODE_S 0x1
19 #define FW_DYNAMIC_INFO_NEXT_MODE_M 0x3
21 enum sbi_scratch_options {
22 /** Disable prints during boot */
23 SBI_SCRATCH_NO_BOOT_PRINTS = (1 << 0),
26 /** Representation dynamic info passed by previous booting stage */
27 struct fw_dynamic_info {
31 unsigned long version;
32 /** Next booting stage address */
33 unsigned long next_addr;
34 /** Next booting stage mode */
35 unsigned long next_mode;
36 /** Options for OpenSBI library */
37 unsigned long options;