acrn-hypervisor/hypervisor/boot/include/guest/vboot.h
Victor Sun c74b1941a0 HV: split sanitize_multiboot_info api
Previously sanitize_multiboot_info() was called after init_debug_pre() because
the debug message can only print after uart is initialized. On the other hand,
multiboot cmdline need to be parsed before init_debug_pre() because the cmdline
could override uart settings and make sure debug message printed successfully.
This cause multiboot info was parsed in two stages.

The patch revise the multiboot parse logic that split sanitize_multiboot_info()
api and use init_acrn_multiboot_info() api for the early stage. The most of
multiboot info will be initialized during this stage and no debug message need
to be printed. After uart is initialized, the sanitize_multiboot_info() would
do sanitize multiboot info and print needed debug messages.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00

31 lines
558 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);
const void *(*get_rsdp)(void);
void (*init_irq)(void);
};
void init_vboot(void);
void init_vboot_irq(void);
uint64_t get_ap_trampoline_buf(void);
const void *get_rsdp_ptr(void);
enum vboot_mode get_sos_boot_mode(void);
#endif /* end of include guard: VBOOT_H */