linux-boot-if.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef HW_ARM_LINUX_BOOT_IF_H
  6. #define HW_ARM_LINUX_BOOT_IF_H
  7. #include "qom/object.h"
  8. #define TYPE_ARM_LINUX_BOOT_IF "arm-linux-boot-if"
  9. typedef struct ARMLinuxBootIfClass ARMLinuxBootIfClass;
  10. DECLARE_CLASS_CHECKERS(ARMLinuxBootIfClass, ARM_LINUX_BOOT_IF,
  11. TYPE_ARM_LINUX_BOOT_IF)
  12. #define ARM_LINUX_BOOT_IF(obj) \
  13. INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
  14. typedef struct ARMLinuxBootIf ARMLinuxBootIf;
  15. struct ARMLinuxBootIfClass {
  16. /*< private >*/
  17. InterfaceClass parent_class;
  18. /*< public >*/
  19. /** arm_linux_init: configure the device for a direct boot
  20. * of an ARM Linux kernel (so that device reset puts it into
  21. * the state the kernel expects after firmware initialization,
  22. * rather than the true hardware reset state). This callback is
  23. * called once after machine construction is complete (before the
  24. * first system reset).
  25. *
  26. * @obj: the object implementing this interface
  27. * @secure_boot: true if we are booting Secure, false for NonSecure
  28. * (or for a CPU which doesn't support TrustZone)
  29. */
  30. void (*arm_linux_init)(ARMLinuxBootIf *obj, bool secure_boot);
  31. };
  32. #endif