Re: [PATCH] configs: arm64: resolve overlapping memory regions in k3-am654-idk cell

2022-04-02 Thread Jan Kiszka
On 24.03.22 02:23, 'Matt Ranostay' via Jailhouse wrote:
> There were several memory regions overlapping in current k3-am654-idk
> configuration including GICD/GICR regions for the interrupt controller.
>
> These issues have been resolved by changing region sizes and adding
> addition regions to avoid conflicts.
>
> Signed-off-by: Matt Ranostay 
> ---
>  configs/arm64/k3-am654-idk.c | 20 +---
>  1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/configs/arm64/k3-am654-idk.c b/configs/arm64/k3-am654-idk.c
> index ddd770fe..4e6857f8 100644
> --- a/configs/arm64/k3-am654-idk.c
> +++ b/configs/arm64/k3-am654-idk.c
> @@ -18,7 +18,7 @@
>  struct {
>   struct jailhouse_system header;
>   __u64 cpus[1];
> - struct jailhouse_memory mem_regions[18];
> + struct jailhouse_memory mem_regions[20];
>   struct jailhouse_irqchip irqchips[5];
>   struct jailhouse_pci_device pci_devices[1];
>  } __attribute__((packed)) config = {
> @@ -112,7 +112,21 @@ struct {
>   /* Most MAIN domain peripherals */ {
>   .phys_start = 0x0100,
>   .virt_start = 0x0100,
> - .size = 0x0af04000,
> + .size = 0x0080,
> + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> + JAILHOUSE_MEM_IO,
> + },
> + {
> + .phys_start = 0x0181,
> + .virt_start = 0x0181,
> + .size = 0x0007,
> + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> + JAILHOUSE_MEM_IO,
> + },
> + {
> + .phys_start = 0x018a,
> + .virt_start = 0x018a,
> + .size = 0xa664000,
>   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>   JAILHOUSE_MEM_IO,
>   },
> @@ -140,7 +154,7 @@ struct {
>   /* MCUSS */ {
>   .phys_start = 0x4204,
>   .virt_start = 0x4204,
> - .size = 0x03ac3000,
> + .size = 0x030c,
>   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>   JAILHOUSE_MEM_IO,
>   },

Thanks, rebased and applied over next.

Jan

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/6f2a091c-4617-4ffc-86c4-0c9b121349be%40web.de.


[PATCH] configs: arm64: resolve overlapping memory regions in k3-am654-idk cell

2022-03-23 Thread 'Matt Ranostay' via Jailhouse
There were several memory regions overlapping in current k3-am654-idk
configuration including GICD/GICR regions for the interrupt controller.

These issues have been resolved by changing region sizes and adding
addition regions to avoid conflicts.

Signed-off-by: Matt Ranostay 
---
 configs/arm64/k3-am654-idk.c | 20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/configs/arm64/k3-am654-idk.c b/configs/arm64/k3-am654-idk.c
index ddd770fe..4e6857f8 100644
--- a/configs/arm64/k3-am654-idk.c
+++ b/configs/arm64/k3-am654-idk.c
@@ -18,7 +18,7 @@
 struct {
struct jailhouse_system header;
__u64 cpus[1];
-   struct jailhouse_memory mem_regions[18];
+   struct jailhouse_memory mem_regions[20];
struct jailhouse_irqchip irqchips[5];
struct jailhouse_pci_device pci_devices[1];
 } __attribute__((packed)) config = {
@@ -112,7 +112,21 @@ struct {
/* Most MAIN domain peripherals */ {
.phys_start = 0x0100,
.virt_start = 0x0100,
-   .size = 0x0af04000,
+   .size = 0x0080,
+   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+   JAILHOUSE_MEM_IO,
+   },
+   {
+   .phys_start = 0x0181,
+   .virt_start = 0x0181,
+   .size = 0x0007,
+   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+   JAILHOUSE_MEM_IO,
+   },
+   {
+   .phys_start = 0x018a,
+   .virt_start = 0x018a,
+   .size = 0xa664000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO,
},
@@ -140,7 +154,7 @@ struct {
/* MCUSS */ {
.phys_start = 0x4204,
.virt_start = 0x4204,
-   .size = 0x03ac3000,
+   .size = 0x030c,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO,
},
-- 
2.30.2

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20220324012326.3001-1-mranostay%40ti.com.