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>
This commit is contained in:
Victor Sun
2020-06-05 12:08:07 +08:00
committed by wenlingz
parent e94922dfdc
commit c74b1941a0
9 changed files with 98 additions and 89 deletions

View File

@@ -39,7 +39,7 @@ static struct physical_seed g_phy_seed;
static uint32_t parse_seed_arg(void)
{
char *cmd_src = NULL;
const char *cmd_src = NULL;
char *arg, *arg_end;
struct acrn_multiboot_info *mbi = get_multiboot_info();
uint32_t i = SEED_ARG_NUM - 1U;