]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/arm/linux-boot-if.h
qom: make interface types abstract
[mirror_qemu.git] / include / hw / arm / linux-boot-if.h
1 /*
2 * hw/arm/linux-boot-if.h : interface for devices which need to behave
3 * specially for direct boot of an ARM Linux kernel
4 */
5
6 #ifndef HW_ARM_LINUX_BOOT_IF_H
7 #define HW_ARM_LINUX_BOOT_IF_H
8
9 #include "qom/object.h"
10
11 #define TYPE_ARM_LINUX_BOOT_IF "arm-linux-boot-if"
12 #define ARM_LINUX_BOOT_IF_CLASS(klass) \
13 OBJECT_CLASS_CHECK(ARMLinuxBootIfClass, (klass), TYPE_ARM_LINUX_BOOT_IF)
14 #define ARM_LINUX_BOOT_IF_GET_CLASS(obj) \
15 OBJECT_GET_CLASS(ARMLinuxBootIfClass, (obj), TYPE_ARM_LINUX_BOOT_IF)
16 #define ARM_LINUX_BOOT_IF(obj) \
17 INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
18
19 typedef struct ARMLinuxBootIf ARMLinuxBootIf;
20
21 typedef struct ARMLinuxBootIfClass {
22 /*< private >*/
23 InterfaceClass parent_class;
24
25 /*< public >*/
26 /** arm_linux_init: configure the device for a direct boot
27 * of an ARM Linux kernel (so that device reset puts it into
28 * the state the kernel expects after firmware initialization,
29 * rather than the true hardware reset state). This callback is
30 * called once after machine construction is complete (before the
31 * first system reset).
32 *
33 * @obj: the object implementing this interface
34 * @secure_boot: true if we are booting Secure, false for NonSecure
35 * (or for a CPU which doesn't support TrustZone)
36 */
37 void (*arm_linux_init)(ARMLinuxBootIf *obj, bool secure_boot);
38 } ARMLinuxBootIfClass;
39
40 #endif