2 * Utility for QEMU MIPS to generate it's simple bootloader
4 * Copyright (C) 2020 Jiaxun Yang <jiaxun.yang@flygoat.com>
6 * SPDX-License-Identifier: GPL-2.0-or-later
9 #ifndef HW_MIPS_BOOTLOADER_H
10 #define HW_MIPS_BOOTLOADER_H
12 #include "exec/cpu-defs.h"
14 void bl_gen_jump_to(uint32_t **p
, target_ulong jump_addr
);
15 void bl_gen_jump_kernel(uint32_t **p
, target_ulong sp
, target_ulong a0
,
16 target_ulong a1
, target_ulong a2
, target_ulong a3
,
17 target_ulong kernel_addr
);
18 void bl_gen_write_ulong(uint32_t **p
, target_ulong addr
, target_ulong val
);
19 void bl_gen_write_u32(uint32_t **p
, target_ulong addr
, uint32_t val
);
20 void bl_gen_write_u64(uint32_t **p
, target_ulong addr
, uint64_t val
);