Files
acrn-hypervisor/hypervisor/arch/x86
Zide Chen f3249e77bd hv: enable early pr_xxx() logs
Currently panic() and pr_xxx() statements before init_primary_pcpu_post()
won't be printed, which is inconvenient and misleading for debugging.

This patch makes pr_xxx() APIs working before init_pcpu_pre():

- clear .bss in init.c, which makes sense to clear .bss at the very beginning
  of initialization code. Also this makes it possible to call init_logmsg()
  before init_pcpu_pre().

- move parse_hv_cmdline() and uart16550_init(true) to init.c.

- refine ticks_to_us() to handle the case that it's called before
  calibrate_tsc(). As a side effect, it prints "0us" in early pr_xxx() calls.

- call init_debug_pre() in init_primary_pcpu() and after this point,
  both printf() and pr_xxx() APIs are available.

However, this patch doesn't address the issue that pr_xxx() could be called
on PCPUs that set_current_pcpu_id() hasn't been called, which implies that
the PCPU ID shown in early logs may not be accurate.

Tracked-On: #2987
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-02-11 08:53:56 +08:00
..
2019-10-31 09:02:59 +08:00
2019-12-02 09:31:12 +08:00
2020-02-11 08:53:56 +08:00
2020-01-14 10:21:23 +08:00
2019-12-13 10:13:09 +08:00
2020-02-11 08:53:56 +08:00
2020-01-14 10:21:23 +08:00
2020-01-14 10:21:23 +08:00
2020-01-14 10:21:23 +08:00
2020-02-11 08:53:56 +08:00
2020-01-14 10:21:23 +08:00
2019-09-11 17:30:24 +08:00