Files
acrn-hypervisor/hypervisor/include/arch/riscv/asm/pgtable.h
hangliu1 2ab068400b hv: multiarch: move some function to common
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>
2025-10-21 14:14:55 +08:00

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 */