diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2020-08-06 12:42:53 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-14 22:18:30 +0300 |
commit | 60e49ff1f8a0b8d48b0d12bad94d0dfb8fdbeec8 (patch) | |
tree | 23255c3baca7f7d4924f18eea54ca171ccf6f5a2 /board | |
parent | e87dfb0526be231de89b299531a0e637d343fccd (diff) | |
download | u-boot-60e49ff1f8a0b8d48b0d12bad94d0dfb8fdbeec8.tar.xz |
xen: Port Xen bus driver from mini-os
Make required updates to run on u-boot and strip test code.
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/xen/xenguest_arm64/xenguest_arm64.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/board/xen/xenguest_arm64/xenguest_arm64.c b/board/xen/xenguest_arm64/xenguest_arm64.c index e3903bb987..c87ef70769 100644 --- a/board/xen/xenguest_arm64/xenguest_arm64.c +++ b/board/xen/xenguest_arm64/xenguest_arm64.c @@ -66,7 +66,7 @@ static int setup_mem_map(void) /* * Add "magic" region which is used by Xen to provide some essentials - * for the guest: we need console. + * for the guest: we need console and xenstore. */ ret = hvm_get_parameter_maintain_dcache(HVM_PARAM_CONSOLE_PFN, &gfn); if (ret < 0) { @@ -82,6 +82,20 @@ static int setup_mem_map(void) PTE_BLOCK_INNER_SHARE); i++; + ret = hvm_get_parameter_maintain_dcache(HVM_PARAM_STORE_PFN, &gfn); + if (ret < 0) { + printf("%s: Can't get HVM_PARAM_STORE_PFN, ret %d\n", + __func__, ret); + return -EINVAL; + } + + xen_mem_map[i].virt = PFN_PHYS(gfn); + xen_mem_map[i].phys = PFN_PHYS(gfn); + xen_mem_map[i].size = PAGE_SIZE; + xen_mem_map[i].attrs = (PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE); + i++; + mem = get_next_memory_node(blob, -1); if (mem < 0) { printf("%s: Missing /memory node\n", __func__); |