-
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.
core: add root cell configuration for the ARMv8 Foundation model
Add under config/foundation-v8.c a root cell configuration for the ARMv8 Foundation model, so we can in use this target with Jailhouse. We also add the neccessary parameters in asm/platform.h for this model. Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
- Loading branch information
Showing
2 changed files
with
152 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,120 @@ | ||
/* | ||
* 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_system header; | ||
__u64 cpus[1]; | ||
struct jailhouse_memory mem_regions[9]; | ||
struct jailhouse_irqchip irqchips[1]; | ||
} __attribute__((packed)) config = { | ||
.header = { | ||
.signature = JAILHOUSE_SYSTEM_SIGNATURE, | ||
.hypervisor_memory = { | ||
.phys_start = 0xfc000000, | ||
.size = 0x4000000, | ||
}, | ||
.debug_console = { | ||
.phys_start = 0x1c090000, | ||
.size = 0x1000, | ||
.flags = JAILHOUSE_MEM_IO, | ||
}, | ||
.root_cell = { | ||
.name = "Foundation ARMv8", | ||
|
||
.cpu_set_size = sizeof(config.cpus), | ||
.num_memory_regions = ARRAY_SIZE(config.mem_regions), | ||
.num_irqchips = 1, | ||
}, | ||
}, | ||
|
||
.cpus = { | ||
0xf, | ||
}, | ||
|
||
.mem_regions = { | ||
/* ethernet */ { | ||
.phys_start = 0x1a000000, | ||
.virt_start = 0x1a000000, | ||
.size = 0x00010000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* sysreg */ { | ||
.phys_start = 0x1c010000, | ||
.virt_start = 0x1c010000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* uart0 */ { | ||
.phys_start = 0x1c090000, | ||
.virt_start = 0x1c090000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* uart1 */ { | ||
.phys_start = 0x1c0a0000, | ||
.virt_start = 0x1c0a0000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* uart2 */ { | ||
.phys_start = 0x1c0b0000, | ||
.virt_start = 0x1c0b0000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* uart3 */ { | ||
.phys_start = 0x1c0c0000, | ||
.virt_start = 0x1c0c0000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* virtio_block */ { | ||
.phys_start = 0x1c130000, | ||
.virt_start = 0x1c130000, | ||
.size = 0x00001000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_IO, | ||
}, | ||
/* RAM */ { | ||
.phys_start = 0x80000000, | ||
.virt_start = 0x80000000, | ||
.size = 0x7c000000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_EXECUTE, | ||
}, | ||
/* RAM */ { | ||
.phys_start = 0x880000000, | ||
.virt_start = 0x880000000, | ||
.size = 0x80000000, | ||
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | | ||
JAILHOUSE_MEM_EXECUTE, | ||
}, | ||
}, | ||
.irqchips = { | ||
/* GIC */ { | ||
.address = 0x2c001000, | ||
.pin_bitmap = 0xffffffffffffffff, | ||
}, | ||
}, | ||
|
||
}; |
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