Files
acrn-hypervisor/hypervisor/include/arch/riscv/asm/pgtable.h
Fei Li 0774a517a0 mmu: add dummy APIs for risc-v
This patch doesn's wrap a arch_xxx.

Tracked-On: #8805
Signed-off-by: Fei Li <fei1.li@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2025-10-14 14:45:12 +08:00

37 lines
754 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;
}
static inline void *hpa2hva(uint64_t x)
{
return (void *)x;
}
static inline uint64_t hva2hpa(const void *x)
{
return (uint64_t)x;
}
#endif /* RISCV_PGTABLE_H */