Ok nevermind found out myself, that i was confused about hex and decimal
values
Julian
Am Dienstag, 18. August 2020 12:12:16 UTC+2 schrieb Julian Stehling:
>
> I am currently trying to make a non-root Linux-cell work on the Jetson
> TX2-board. I have created a new jetson-tx2-linux-demo.c file and have made
> a inmate-jetson-tx2.dts file according to the other ARM examples given.
>
> When i try to start the cell with
>
> sudo jailhouse cell linux
>> ~/linux-jailhouse-jetson/configs/arm64/jetson-tx2-linux-demo.cell
>> /boot/Image --dtb
>> ~/linux-jailhouse-jetson/configs/arm64/dts/inmate-jetson-tx2.dtb -i
>> /boot/initrd
>
>
> i get the following error:
>
> Traceback (most recent call last):
>
> File "/usr/local/libexec/jailhouse/jailhouse-cell-linux", line 846, in
>> <module>
>
> arch.setup(args, config)
>
> File "/usr/local/libexec/jailhouse/jailhouse-cell-linux", line 378, in
>> setup
>
> reg += struct.pack(reg_format, region.virt_start, region.size)
>
> struct.error: 'I' format requires 0 <= number <= 4294967295
>
>
> My jetson-tx2-demo-linux.c looks like this:
>
>
>
> #include <jailhouse/types.h>
>
> #include <jailhouse/cell-config.h>
>
>
>> #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
>
>
>> struct {
>
> struct jailhouse_cell_desc cell;
>
> __u64 cpus[1];
>
> struct jailhouse_memory mem_regions[5];
>
> struct jailhouse_irqchip irqchips[1];
>
> struct jailhouse_pci_device pci_devices[1];
>
> } __attribute__((packed)) config = {
>
> .cell = {
>
> .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
>
> .revision = JAILHOUSE_CONFIG_REVISION,
>
> .name = "jetson-tx2-linux-demo",
>
> .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
>
> JAILHOUSE_CELL_DEBUG_CONSOLE,
>
>
>> .cpu_set_size = sizeof(config.cpus),
>
> .num_memory_regions = ARRAY_SIZE(config.mem_regions),
>
> .num_irqchips = ARRAY_SIZE(config.irqchips),
>
> .num_pci_devices = ARRAY_SIZE(config.pci_devices),
>
> .vpci_irq_base = 300,
>
> },
>
>
>> .cpus = {
>
> 0x18,
>
> },
>
>
>> .mem_regions = {
>
> /* UART */ {
>
> .phys_start = 0x3100000,
>
> .virt_start = 0x3100000,
>
> .size = 0x1000,
>
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>
> JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED,
>
> },
>
> /* RAM */ {
>
> .phys_start = 0x270000000,
>
> .virt_start = 0x0,
>
> .size = 0x10000,
>
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>
> JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
>
> JAILHOUSE_MEM_LOADABLE,
>
> },
>
> /* RAM */ {
>
> .phys_start = 0x255310000,
>
> .virt_start = 0x255310000,
>
> .size = 0x1acf0000,
>
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>
> JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
>
> JAILHOUSE_MEM_LOADABLE,
>
> },
>
> /* communication region */ {
>
> .virt_start = 0x80000000,
>
> .size = 0x00001000,
>
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>
> JAILHOUSE_MEM_COMM_REGION,
>
> },
>
>
>> /* IVHSMEM 1*/ {
>
> .phys_start = 0x27f000000,
>
> .virt_start = 0x27f000000,
>
> .size = 0x1000,
>
> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE
>
> | JAILHOUSE_MEM_ROOTSHARED,
>
>
>> },
>
>
>>
>
> },
>
>
>> .irqchips = {
>
> /* GIC */
>
> {
>
> .address = 0x03881000,
>
> .pin_base = 288,
>
> .pin_bitmap = {
>
> 0,
>
> 1 << (330 - 320) /* irq 330 */
>
> },
>
> },
>
> },
>
>
>> .pci_devices = {
>
> {
>
> .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
>
> .bdf = 0x0,
>
> .bar_mask = {
>
> 0xffffff00, 0xffffffff, 0x00000000,
>
> 0x00000000, 0x00000000, 0x00000000,
>
> },
>
> .shmem_region = 3,
>
> .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED,
>
> .domain = 0x0,
>
> },
>
>
>>
>
> },
>
>
>> };
>
>
> So my question is, whrere to search for the error, since the defined
> memory regions are in bounds of the value given by the error message.
>
> Thanks for any advice
>
> Julian
>
>
>
>
--
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/50d7d2aa-eaf9-4a76-8423-c57d352b701do%40googlegroups.com.