Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(demos/linux+zephyr): fix linux+zephyr demo on fvp-a #47

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion demos/linux+zephyr/configs/fvp-a-aarch32.c

This file was deleted.

137 changes: 137 additions & 0 deletions demos/linux+zephyr/configs/fvp-a-aarch32.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#include <config.h>

VM_IMAGE(linux_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/linux.bin));
VM_IMAGE(zephyr_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/zephyr.bin));

struct config config = {

.shmemlist_size = 1,
.shmemlist = (struct shmem[]) {
[0] = { .size = 0x00010000, }
},

.vmlist_size = 2,
.vmlist = {
{
.image = {
.base_addr = 0xa0000000,
.load_addr = VM_IMAGE_OFFSET(linux_image),
.size = VM_IMAGE_SIZE(linux_image),
},

.entry = 0xa0000000,

.platform = {
.cpu_num = 2,

.region_num = 1,
.regions = (struct vm_mem_region[]) {
{
.base = 0xa0000000,
.size = 0x40000000,
.place_phys = true,
.phys = 0xa0000000,
}
},

.ipc_num = 1,
.ipcs = (struct ipc[]) {
{
.base = 0xf0000000,
.size = 0x00010000,
.shmem_id = 0,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {52}
}
},

.dev_num = 3,
.devs = (struct vm_dev_region[]) {
{
/* UART1, PL011 */
.pa = 0x1c0a0000,
.va = 0x1c0a0000,
.size = 0x10000,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {38}
},
{
/* smsc,lan91c111t */
.pa = 0x01a000000,
.va = 0x01a000000,
.size = 0x10000,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {47}
},
{
.interrupt_num = 1,
.interrupts = (irqid_t[]) {27}
}
},

.arch = {
.gic = {
.gicr_addr = 0x2F100000,
.gicd_addr = 0x2F000000
}
}
},
},
{
.image = {
.base_addr = 0x20000000,
.load_addr = VM_IMAGE_OFFSET(zephyr_image),
.size = VM_IMAGE_SIZE(zephyr_image)
},

.entry = 0x20000000,

.platform = {
.cpu_num = 2,

.region_num = 1,
.regions = (struct vm_mem_region[]) {
{
.base = 0x20000000,
.size = 0x8000000
}
},


.ipc_num = 1,
.ipcs = (struct ipc[]) {
{
.base = 0x70000000,
.size = 0x00010000,
.shmem_id = 0,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {52}
}
},

.dev_num = 2,
.devs = (struct vm_dev_region[]) {
{
/* UART2, PL011 */
.pa = 0x1c0b0000,
.va = 0x9c0b0000,
.size = 0x10000,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {39}
},
{
.interrupt_num = 1,
.interrupts = (irqid_t[]) {27}
}
},

.arch = {
.gic = {
.gicd_addr = 0xaf000000,
.gicr_addr = 0xaf100000,
}
}
},
},
},
};
12 changes: 6 additions & 6 deletions demos/linux+zephyr/configs/fvp-a.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ struct config config = {
},
{
.image = {
.base_addr = 0x20000000,
.base_addr = 0x90000000,
.load_addr = VM_IMAGE_OFFSET(zephyr_image),
.size = VM_IMAGE_SIZE(zephyr_image)
},

.entry = 0x20000000,
.entry = 0x90000000,

.platform = {
.cpu_num = 2,

.region_num = 1,
.regions = (struct vm_mem_region[]) {
{
.base = 0x20000000,
.base = 0x90000000,
.size = 0x8000000
}
},
Expand All @@ -114,7 +114,7 @@ struct config config = {
{
/* UART2, PL011 */
.pa = 0x1c0b0000,
.va = 0x9c0b0000,
.va = 0x1c0b0000,
.size = 0x10000,
.interrupt_num = 1,
.interrupts = (irqid_t[]) {39}
Expand All @@ -127,8 +127,8 @@ struct config config = {

.arch = {
.gic = {
.gicd_addr = 0xaf000000,
.gicr_addr = 0xaf100000,
.gicd_addr = 0x2f000000,
.gicr_addr = 0x2f100000,
}
}
},
Expand Down