On 02/10/2017 09:38 AM, [email protected] wrote: > I refer to the 'jetson-tk1-linux-demo.c', 'jetson-tk1.c' and 'jetson-demo.c' > for adding 'jetson-tx1-linux.c'. (tx1, not tk1) FYI: jetson-demo.c is compatible with both, TX1 and TK1. > So, i wrote the following text. > > ------------------------------------------------------------------------------- > #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[2]; > struct jailhouse_irqchip irqchips[2]; No virtual ethernet for the moment? Then you only need one irqchip. > } __attribute__((packed)) config = { > .cell = { > .signature = JAILHOUSE_CELL_DESC_SIGNATURE, > .revision = JAILHOUSE_CONFIG_REVISION, > .name = "jetson-tx1-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), > }, > .cpus = { > 0x8, > }, > > .mem_regions = { > /* UART */ { > .phys_start = 0x70006000, > .virt_start = 0x70006000, > .size = 0x1000, > .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, > }, > > /* RAM */ { > .phys_start = 0xdc000000, > .virt_start = 0xdc000000, > .size = 0x20000000, That's 512MiB, starting at 1472MiB, right? So make sure to add "mem=1472M vmalloc=512M" to your root kernel command line. > .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | > JAILHOUSE_MEM_LOADABLE, > }, > }; > .irqchips = { > /* GIC */ { > .address = 0x50041000, > .pin_base = 32, > .pin_bitmap = { > 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff > }, > }, > > /* GIC */ { > .address = 0x50041000, > .pin_base = 160, > .pin_bitmap = { > 0xffffffff, 0xffffffff > }, > }, > }; > }; > ------------------------------------------------------------------------------- > But, I don't know where i can find GIC pin_base and pin_bitmap position. > Could you give me some hint?? Have a look at jailhouse/inmates/lib/arm64/include/mach.h:
#elif defined(CONFIG_MACH_JETSON_TX1) #define CON_TYPE "8250" #define CON_BASE 0x70006000 #define GICD_V2_BASE ((void *)0x50041000) #define GICC_V2_BASE ((void *)0x50042000) #define TIMER_IRQ 27 As you can see, GIC addresses for the TX1 are the same as for TK1. If you don't use virtual ethernet (so it seems, as there are no pci devices nor shared memory), there is no need to define the second irqchip. You should redirect only one IRQ via the first irqchip: the IRQ of your UART device. Have a look at /proc/interrupts of your root cell to find the corresponding irq number. Ralf > -- 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]. For more options, visit https://groups.google.com/d/optout.
