From 87437c42bf52c95407fb8a53202c7f2e715319a7 Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Tue, 26 Mar 2019 15:19:59 +0100 Subject: [PATCH] configs: miriac-sbc-ls1046a: adjust memory flags for qbman portals The qbman portal regions are split into two, cache-inhibited and cache-enabled. (see DPAA_PORTAL_C[IE] in drivers/soc/fsl/qbman/) When the underlying memory is not mapped correctly, like it was before this commit, you will see TX errors and loose a significant amount of packets on the DPAA NICs after jailhouse is enabled. Signed-off-by: Henning Schild Signed-off-by: Jan Kiszka --- configs/arm64/miriac-sbc-ls1046a.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/configs/arm64/miriac-sbc-ls1046a.c b/configs/arm64/miriac-sbc-ls1046a.c index a98f9c244..9597500d7 100644 --- a/configs/arm64/miriac-sbc-ls1046a.c +++ b/configs/arm64/miriac-sbc-ls1046a.c @@ -22,7 +22,7 @@ struct { struct jailhouse_system header; __u64 cpus[1]; - struct jailhouse_memory mem_regions[50]; + struct jailhouse_memory mem_regions[52]; struct jailhouse_irqchip irqchips[2]; struct jailhouse_pci_device pci_devices[1]; } __attribute__((packed)) config = { @@ -137,17 +137,29 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, - /* qportals */ { + /* qportals CE */ { .phys_start = 0x500000000, .virt_start = 0x500000000, - .size = 0x8000000, + .size = 0x4000000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, + }, + /* qportals CI */ { + .phys_start = 0x504000000, + .virt_start = 0x504000000, + .size = 0x4000000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, - /* bportals */ { + /* bportals CE */ { .phys_start = 0x508000000, .virt_start = 0x508000000, - .size = 0x8000000, + .size = 0x4000000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, + }, + /* bportals CI */ { + .phys_start = 0x50c000000, + .virt_start = 0x50c000000, + .size = 0x4000000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, },