mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 02:00:27 +00:00
move some funcitons like hpa2hva to common file. change some files to include file from asm/pgtable.h to common/pgtable.h 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>
28 lines
619 B
C
28 lines
619 B
C
/*
|
|
* Copyright (C) 2018-2024 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef RISCV_PGTABLE_H
|
|
#define RISCV_PGTABLE_H
|
|
|
|
|
|
#include <asm/page.h>
|
|
|
|
/* FIXME: Temporary RISC-V build workaround
|
|
* This file provides hva2hpa[_early] and hpa2hva[_early] function stubs to
|
|
* satisfy existing code dependencies. Remove this file and migrate to the
|
|
* common pgtable.h implementation once the MMU module is properly integrated.
|
|
*/
|
|
static inline void *hpa2hva_early(uint64_t x)
|
|
{
|
|
return (void *)x;
|
|
}
|
|
|
|
static inline uint64_t hva2hpa_early(void *x)
|
|
{
|
|
return (uint64_t)x;
|
|
}
|
|
|
|
#endif /* RISCV_PGTABLE_H */
|