xref: /qemu/include/hw/openrisc/boot.h (revision 09951f5a27a7f8633118c1808cf17e66b30c3c62)
17025114bSStafford Horne /*
27025114bSStafford Horne  * QEMU OpenRISC boot helpers.
37025114bSStafford Horne  *
47025114bSStafford Horne  * Copyright (c) 2022 Stafford Horne <shorne@gmail.com>
57025114bSStafford Horne  *
67025114bSStafford Horne  * This program is free software; you can redistribute it and/or modify it
77025114bSStafford Horne  * under the terms and conditions of the GNU General Public License,
87025114bSStafford Horne  * version 2 or later, as published by the Free Software Foundation.
97025114bSStafford Horne  *
107025114bSStafford Horne  * This program is distributed in the hope it will be useful, but WITHOUT
117025114bSStafford Horne  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
127025114bSStafford Horne  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
137025114bSStafford Horne  * more details.
147025114bSStafford Horne  *
157025114bSStafford Horne  * You should have received a copy of the GNU General Public License along with
167025114bSStafford Horne  * this program.  If not, see <http://www.gnu.org/licenses/>.
177025114bSStafford Horne  */
187025114bSStafford Horne 
197025114bSStafford Horne #ifndef OPENRISC_BOOT_H
207025114bSStafford Horne #define OPENRISC_BOOT_H
217025114bSStafford Horne 
227025114bSStafford Horne #include "exec/cpu-defs.h"
23*3c25f487SPeter Maydell #include "hw/boards.h"
247025114bSStafford Horne 
257025114bSStafford Horne hwaddr openrisc_load_kernel(ram_addr_t ram_size,
267025114bSStafford Horne                             const char *kernel_filename,
277025114bSStafford Horne                             uint32_t *bootstrap_pc);
287025114bSStafford Horne 
297025114bSStafford Horne hwaddr openrisc_load_initrd(void *fdt, const char *filename,
307025114bSStafford Horne                             hwaddr load_start, uint64_t mem_size);
317025114bSStafford Horne 
32*3c25f487SPeter Maydell uint32_t openrisc_load_fdt(MachineState *ms, void *fdt, hwaddr load_start,
337025114bSStafford Horne                            uint64_t mem_size);
347025114bSStafford Horne 
357025114bSStafford Horne #endif /* OPENRISC_BOOT_H */
36