acrn-hypervisor/hypervisor/boot/include/guest/vboot.h
Victor Sun 19ffaa50dc HV: init and sanitize acrn multiboot info
Initialize and sanitize a acrn specific multiboot info struct with current
supported multiboot1 in very early boot stage, which would bring below
benifits:

- don't need to do hpa2hva convention every time when refering boot_regs;

- panic early if failed to sanitize multiboot info, so that don't need to
  check multiboot info pointer/flags and panic in later boot process;

- keep most code unchanged when introduce multiboot2 support in future;

Tracked-On: #4419

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-02-26 09:24:16 +08:00

31 lines
546 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef VBOOT_H
#define VBOOT_H
enum vboot_mode {
DIRECT_BOOT_MODE,
DEPRI_BOOT_MODE
};
struct vboot_operations {
void (*init)(void);
uint64_t (*get_ap_trampoline)(void);
void *(*get_rsdp)(void);
void (*init_irq)(void);
};
void init_vboot(void);
void init_vboot_irq(void);
uint64_t get_ap_trampoline_buf(void);
void *get_rsdp_ptr(void);
enum vboot_mode get_sos_boot_mode(void);
#endif /* end of include guard: VBOOT_H */