-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hypervisor: arm64: add uart demo cell config for Foundation v8
Add a cell configuration file for the foundation-v8 model, to be used with the PL011 UART inmate demo. Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#include <linux/types.h> | ||
#include <jailhouse/cell-config.h> | ||
|
||
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0]) | ||
|
||
struct { | ||
struct jailhouse_cell_desc cell; | ||
__u64 cpus[1]; | ||
struct jailhouse_memory mem_regions[2]; | ||
} __attribute__((packed)) config = { | ||
.cell = { | ||
.signature = JAILHOUSE_CELL_DESC_SIGNATURE, | ||
.name = "pl011-demo", | ||
.flags = JAILHOUSE_CELL_PASSIVE_COMMREG, | ||
|
||
.cpu_set_size = sizeof(config.cpus), | ||
.num_memory_regions = ARRAY_SIZE(config.mem_regions), | ||
.num_irqchips = 0, | ||
.pio_bitmap_size = 0, | ||
.num_pci_devices = 0, | ||
}, | ||
|
||
.cpus = { | ||
0x4, | ||
}, | ||
|
||
.mem_regions = { | ||
/* UART 2 */ { | ||
.phys_start = 0x1c0b0000, | ||
.virt_start = 0x1c090000, | ||
.size = 0x10000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* RAM */ { | ||
.phys_start = 0xfbff0000, | ||
.virt_start = 0, | ||
.size = 0x00010000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, | ||
}, | ||
} | ||
}; |