From: Nikhil Devshatwar <[email protected]> Define the jailhouse_memory regions for the USB toplevel MMRs This fixes the crash when root cell or inmate cell tries to access the USB devices.
Signed-off-by: Nikhil Devshatwar <[email protected]> --- configs/arm64/k3-j721e-evm-linux-demo.c | 16 +++++++++++++++- configs/arm64/k3-j721e-evm.c | 20 +++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/configs/arm64/k3-j721e-evm-linux-demo.c b/configs/arm64/k3-j721e-evm-linux-demo.c index f494b0cb..4a5aa3d9 100644 --- a/configs/arm64/k3-j721e-evm-linux-demo.c +++ b/configs/arm64/k3-j721e-evm-linux-demo.c @@ -24,7 +24,7 @@ struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; - struct jailhouse_memory mem_regions[25]; + struct jailhouse_memory mem_regions[27]; struct jailhouse_irqchip irqchips[4]; struct jailhouse_pci_device pci_devices[1]; __u32 stream_ids[2]; @@ -86,6 +86,20 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, + /* usbss1 */ { + .phys_start = 0x04114000, + .virt_start = 0x04114000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* usbss1 */ { + .phys_start = 0x06400000, + .virt_start = 0x06400000, + .size = 0x00030000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* main_gpio2 */ { .phys_start = 0x00610000, .virt_start = 0x00610000, diff --git a/configs/arm64/k3-j721e-evm.c b/configs/arm64/k3-j721e-evm.c index 4f9755a8..2b67ac8e 100644 --- a/configs/arm64/k3-j721e-evm.c +++ b/configs/arm64/k3-j721e-evm.c @@ -19,7 +19,7 @@ struct { struct jailhouse_system header; __u64 cpus[1]; - struct jailhouse_memory mem_regions[36]; + struct jailhouse_memory mem_regions[38]; struct jailhouse_irqchip irqchips[6]; struct jailhouse_pci_device pci_devices[1]; __u32 stream_ids[30]; @@ -128,17 +128,31 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, + /* usbss0 */ { + .phys_start = 0x04104000, + .virt_start = 0x04104000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* usbss0 */ { .phys_start = 0x06000000, .virt_start = 0x06000000, - .size = 0x00400000, + .size = 0x00030000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* usbss1 */ { + .phys_start = 0x04114000, + .virt_start = 0x04114000, + .size = 0x00001000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, /* usbss1 */ { .phys_start = 0x06400000, .virt_start = 0x06400000, - .size = 0x00400000, + .size = 0x00030000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, -- 2.17.1 -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20200527122358.14723-3-nikhil.nd%40ti.com.
