1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* OpenSBI wants to make its own definitions for some of our compiler.h macros. */
7 #include <sbi/fw_dynamic.h>
9 /* DO NOT INCLUDE COREBOOT HEADERS HERE */
11 void run_opensbi(const int hart_id
,
15 const int payload_mode
)
17 struct fw_dynamic_info info
= {
18 .magic
= FW_DYNAMIC_INFO_MAGIC_VALUE
,
19 .version
= FW_DYNAMIC_INFO_VERSION_MAX
,
20 .next_mode
= payload_mode
,
21 .next_addr
= (uintptr_t)payload
,
24 csr_write(mepc
, opensbi
);
30 : "r"(hart_id
), "r"(fdt
), "r"(&info
)