mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-13 09:02:53 +00:00
add BSP and AP initialization function. and call uart16550_init to update uart_base_address after init paging. 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>
26 lines
415 B
C
26 lines
415 B
C
/*
|
|
* Copyright (C) 2023-2025 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef RISCV_MMU_H
|
|
#define RISCV_MMU_H
|
|
|
|
#include <types.h>
|
|
#include <asm/page.h>
|
|
#include <asm/pgtable.h>
|
|
|
|
static inline void set_satp(uint64_t satp)
|
|
{
|
|
asm volatile (
|
|
"csrw satp, %0\n\t" \
|
|
"sfence.vma"
|
|
:: "r"(satp)
|
|
: "memory"
|
|
);
|
|
}
|
|
void init_paging(void);
|
|
void enable_paging(void);
|
|
|
|
#endif /* RISCV_MMU_H */
|