HV: remove DBG_LEVEL_PARSE

- It is meaningless to enable debug function in parse_hv_cmdline() because
the function run in very eary stage and uart has not been initialized at
that time, so remove this debug level definition;

- Rewrite parse_hv_cmdline() function to make it compliant with MISRA-C;

- Decouple uart16550 stuff from Init.c module and let console.c handle it;

Tracked-On: #4419

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2020-02-11 21:06:40 +08:00
committed by wenlingz
parent a46a7b3524
commit 708cae7c88
4 changed files with 15 additions and 30 deletions

View File

@@ -8,14 +8,11 @@
#include <init.h>
#include <console.h>
#include <per_cpu.h>
#include <profiling.h>
#include <vtd.h>
#include <shell.h>
#include <vmx.h>
#include <vm.h>
#include <logmsg.h>
#include <seed.h>
#include <uart16550.h>
#include <ld_sym.h>
#include <vboot.h>
@@ -32,12 +29,6 @@
/*TODO: move into debug module */
static void init_debug_pre(void)
{
/*
* Enable UART as early as possible.
* Then we could use printf for debugging on early boot stage.
*/
uart16550_init(true);
/* Initialize console */
console_init();
@@ -88,7 +79,7 @@ void init_primary_pcpu(void)
/* Clear BSS */
(void)memset(&ld_bss_start, 0U, (size_t)(&ld_bss_end - &ld_bss_start));
(void)parse_hv_cmdline();
parse_hv_cmdline();
init_debug_pre();