mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 03:33:39 +00:00
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>