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>
This commit is contained in:
committed by
Tom Rini
parent
e87dfb0526
commit
60e49ff1f8
@@ -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__);
|
||||
|
||||
Reference in New Issue
Block a user