mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-05-04 09:54:52 +00:00
hv: riscv: add uart init after paging
After BSP enable paging, add init uart to update uart virtual address. Tracked-On: #8831 Signed-off-by: hangliu1 <hang1.liu@intel.com> Reviewed-by: Fei Li <fei1.li@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <timer.h>
|
||||
#include <console.h>
|
||||
#include <shell.h>
|
||||
#include <uart16550.h>
|
||||
|
||||
static void init_pcpu_comm_post(void);
|
||||
|
||||
@@ -66,6 +67,11 @@ void init_primary_pcpu(uint64_t hart_id, uint64_t fdt_paddr)
|
||||
|
||||
init_debug_pre();
|
||||
init_paging();
|
||||
/*
|
||||
* Need update uart_base_address here for vaddr2paddr mapping may changed
|
||||
* WARNNING: DO NOT CALL PRINTF BETWEEN ENABLE PAGING IN init_paging AND HERE!
|
||||
*/
|
||||
uart16550_init(false);
|
||||
|
||||
if (!start_pcpus(AP_MASK)) {
|
||||
panic("Failed to start all secondary cores!");
|
||||
|
||||
@@ -137,7 +137,7 @@ enum serial_dev_type {
|
||||
#if CONFIG_SERIAL_8250_PCI
|
||||
#include <asm/pagemisc.h>
|
||||
#endif
|
||||
|
||||
union pci_bdf;
|
||||
void uart16550_init(bool early_boot);
|
||||
char uart16550_getc(void);
|
||||
size_t uart16550_puts(const char *buf, uint32_t len);
|
||||
|
||||
Reference in New Issue
Block a user