1/*
2 * Copyright 2019, Data61, CSIRO (ABN 41 687 119 230)
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7/***
8 * @module guest_boot_init.h
9 * The libsel4vmmplatsupport arm guest boot init interface provides helpers to initialise the booting state of
10 * a VM instance. This currently only targets booting a Linux guest OS.
11 */
12
13#include <sel4/sel4.h>
14
15#include <sel4vm/guest_vm.h>
16
17/***
18 * @function vcpu_set_bootargs(vcpu, pc, mach_type, atags)
19 * Set the boot args and pc for the VM.
20 * For linux:
21 *   r0 -> 0
22 *   r1 -> MACH_TYPE  (e.g #4151 for EXYNOS5410 eval. platform smdk5410)
23 *   r2 -> atags/dtb address
24 * @param {vm_vcpu_t *} vcpu        A handle to the boot VCPU
25 * @param {seL4_Word} pc            The initial PC for the VM
26 * @param {seL4_Word} mach_type     Linux specific machine ID see http://www.arm.linux.org.uk/developer/machines/
27 * @param {seL4_Word} atags         Linux specific IPA of atags. Can also be substituted with dtb address
28 * @return                          0 on success, otherwise -1 for failure
29 */
30int vcpu_set_bootargs(vm_vcpu_t *vcpu, seL4_Word pc, seL4_Word mach_type, seL4_Word atags);
31