xref: /openbmc/qemu/include/hw/mips/bootloader.h (revision 2df1eb27)
1 /*
2  * Utility for QEMU MIPS to generate it's simple bootloader
3  *
4  * Copyright (C) 2020 Jiaxun Yang <jiaxun.yang@flygoat.com>
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef HW_MIPS_BOOTLOADER_H
10 #define HW_MIPS_BOOTLOADER_H
11 
12 #include "exec/cpu-defs.h"
13 
14 void bl_gen_jump_to(void **ptr, target_ulong jump_addr);
15 void bl_gen_jump_kernel(void **ptr,
16                         bool set_sp, target_ulong sp,
17                         bool set_a0, target_ulong a0,
18                         bool set_a1, target_ulong a1,
19                         bool set_a2, target_ulong a2,
20                         bool set_a3, target_ulong a3,
21                         target_ulong kernel_addr);
22 void bl_gen_write_ulong(void **ptr, target_ulong addr, target_ulong val);
23 void bl_gen_write_u32(void **ptr, target_ulong addr, uint32_t val);
24 void bl_gen_write_u64(void **ptr, target_ulong addr, uint64_t val);
25 
26 #endif
27