mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-07-25 22:47:34 +00:00
hv: riscv: initialize service vm vfdt
Initialize Service VM vFDT by reserving hypervisor and pre-launched VM memory regions. The vFDT is copied to Service VM to the place just before the kernel load address, and this needs to be fixed later when MMU module is implemented. Tracked-On: #8841 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <dm/vrtc.h>
|
||||
#include <spinlock.h>
|
||||
#include <vm_config.h>
|
||||
#include <fdt_api.h>
|
||||
#include <asm/guest/vm.h>
|
||||
|
||||
#include <vcpu.h>
|
||||
@@ -100,6 +101,8 @@ struct acrn_vm {
|
||||
void *root_stg2ptp;
|
||||
struct pgtable stg2_pgtable;
|
||||
spinlock_t stg2pt_lock; /* Spin-lock used to protect stg2pt to add/modify/remove for a VM */
|
||||
|
||||
uint8_t fdt_raw[MAX_FDT_SIZE] __aligned(8);
|
||||
} __aligned(PAGE_SIZE);
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,4 +12,11 @@
|
||||
*/
|
||||
#define VIRT_FDT_LOAD_ADDR 0x80200000UL
|
||||
|
||||
void init_service_vm_vfdt(struct acrn_vm *vm);
|
||||
void arch_init_service_vm_vfdt(struct acrn_vm *vm);
|
||||
|
||||
static inline void *vm_get_vfdt(struct acrn_vm *vm) {
|
||||
return (void *)vm->fdt_raw;
|
||||
}
|
||||
|
||||
#endif /* VFDT_H */
|
||||
|
||||
Reference in New Issue
Block a user