Files
Yifan Liu 78b7702f14 hv: riscv: Read physical memory layout from FDT
Reads physical memory layout from FDT.

Tracked-On: #8841
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
2025-11-14 10:44:41 +08:00

28 lines
448 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>
#define MAX_FDT_RSVD_REGIONS 16
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 */