|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v3 41/43] arm64: add mapping for GNT table
Implement the map_frames(), and use it for the GNT table mapping.
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
arch/arm/mm.c | 7 ++++++-
include/arm/arch_mm.h | 3 +--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mm.c b/arch/arm/mm.c
index eb5904f..fb9583b 100644
--- a/arch/arm/mm.c
+++ b/arch/arm/mm.c
@@ -352,6 +352,11 @@ void *map_frames_ex(const unsigned long *f, unsigned long
n, unsigned long strid
return (void *)addr;
}
+void *map_frames(unsigned long *frames, unsigned long pfn_num)
+{
+ return map_frames_ex(frames, pfn_num, 1, 0, 1, DOMID_SELF, NULL,
MEM_DEF_ATTR);
+}
+
static lpae_t *get_ptep(unsigned long vaddr)
{
lpae_t *pgd, *pud, *pmd, *pte;
@@ -527,5 +532,5 @@ grant_entry_v1_t *arch_init_gnttab(int nr_grant_frames)
BUG();
}
- return to_virt(gnttab_table);
+ return map_frames(frames, nr_grant_frames);
}
diff --git a/include/arm/arch_mm.h b/include/arm/arch_mm.h
index 150259a..413b167 100644
--- a/include/arm/arch_mm.h
+++ b/include/arm/arch_mm.h
@@ -57,8 +57,7 @@ extern paddr_t physical_address_offset;
#define virtual_to_mfn(_virt) virt_to_mfn(_virt)
void arch_mm_preinit(void *dtb_pointer);
-// FIXME
-#define map_frames(f, n) (NULL)
+void *map_frames(unsigned long *frames, unsigned long pfn_num);
void *ioremap(paddr_t addr, unsigned long size);
--
2.7.4
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |