Hi,
Thanks for the reply.
So as you said,
1)I've augmented the jetson-tk1-demo.c config with an ivshmem device and a
shared mem region, using to configs/jetson-tk1-linux-demo.c as reference.
2)I replicated the ivshmem-demo from x86 to inmates/demos/arm and hooked it up
in the Makefile
I tried to cross compile the same and I have encountered a few errors.
>From what I've observed, the errors are mainly regarding the pci related
>functions.
How can I proceed with this?
PFA the error log.
Thanks and regards,
Harikrishnan
--
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.
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6$ sudo $MAKE
ARCH=arm KDIR=/home/guest/user1/tegra_K1/linux-9fd0a81
CROSS_COMPILE=/home/guest/user1/tegra_K1/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
CHK
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/hypervisor/include/generated/version.h
CHK
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/hypervisor/include/generated/config.mk
CC
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.o
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:
In function ‘pci_cfg_read64’:
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:46:14:
error: implicit declaration of function ‘pci_read_config’
[-Werror=implicit-function-declaration]
bar = ((u64)pci_read_config(bdf, addr + 4, 4) << 32) |
^~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:
In function ‘pci_cfg_write64’:
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:53:2:
error: implicit declaration of function ‘pci_write_config’
[-Werror=implicit-function-declaration]
pci_write_config(bdf, addr + 4, (u32)(val >> 32), 4);
^~~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:
In function ‘get_bar_sz’:
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:62:28:
error: ‘PCI_CFG_BAR’ undeclared (first use in this function)
bar = pci_cfg_read64(bdf, PCI_CFG_BAR + (8 * barn));
^~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:62:28:
note: each undeclared identifier is reported only once for each function it
appears in
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:
In function ‘map_shmem_and_bars’:
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:73:12:
error: implicit declaration of function ‘pci_find_cap’
[-Werror=implicit-function-declaration]
int cap = pci_find_cap(d->bdf, PCI_CAP_MSIX);
^~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:73:33:
error: ‘PCI_CAP_MSIX’ undeclared (first use in this function)
int cap = pci_find_cap(d->bdf, PCI_CAP_MSIX);
^~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:81:13:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
d->shmem = (void *)pci_cfg_read64(d->bdf, IVSHMEM_CFG_SHMEM_PTR);
^
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:84:55:
error: ‘PAGE_SIZE’ undeclared (first use in this function)
d->registers = (u32 *)((u64)(d->shmem + d->shmemsz + PAGE_SIZE - 1)
^~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:85:5:
error: ‘PAGE_MASK’ undeclared (first use in this function)
& PAGE_MASK);
^~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:86:26:
error: ‘PCI_CFG_BAR’ undeclared (first use in this function)
pci_cfg_write64(d->bdf, PCI_CFG_BAR, (u64)d->registers);
^~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:86:39:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
pci_cfg_write64(d->bdf, PCI_CFG_BAR, (u64)d->registers);
^
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:89:26:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
d->msix_table = (u32 *)((u64)d->registers + PAGE_SIZE);
^
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:90:44:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
pci_cfg_write64(d->bdf, PCI_CFG_BAR + 16, (u64)d->msix_table);
^
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:93:27:
error: ‘PCI_CFG_COMMAND’ undeclared (first use in this function)
pci_write_config(d->bdf, PCI_CFG_COMMAND,
^~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:94:6:
error: ‘PCI_CMD_MEM’ undeclared (first use in this function)
(PCI_CMD_MEM | PCI_CMD_MASTER), 2);
^~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:94:20:
error: ‘PCI_CMD_MASTER’ undeclared (first use in this function)
(PCI_CMD_MEM | PCI_CMD_MASTER), 2);
^~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:95:2:
error: implicit declaration of function ‘map_range’
[-Werror=implicit-function-declaration]
map_range(d->shmem, d->shmemsz + PAGE_SIZE + d->bar2sz, MAP_UNCACHED);
^~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:95:58:
error: ‘MAP_UNCACHED’ undeclared (first use in this function)
map_range(d->shmem, d->shmemsz + PAGE_SIZE + d->bar2sz, MAP_UNCACHED);
^~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:
In function ‘inmate_main’:
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:123:2:
error: implicit declaration of function ‘int_init’
[-Werror=implicit-function-declaration]
int_init();
^~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:126:23:
error: implicit declaration of function ‘pci_find_device’
[-Werror=implicit-function-declaration]
(-1 != (bdf = pci_find_device(VENDORID, DEVICEID, bdf)))) {
^~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:128:31:
error: ‘PCI_CFG_VENDOR_ID’ undeclared (first use in this function)
pci_read_config(bdf, PCI_CFG_VENDOR_ID, 2),
^~~~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:129:31:
error: ‘PCI_CFG_DEVICE_ID’ undeclared (first use in this function)
pci_read_config(bdf, PCI_CFG_DEVICE_ID, 2),
^~~~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:132:21:
error: ‘PCI_DEV_CLASS_OTHER’ undeclared (first use in this function)
if (class_rev != (PCI_DEV_CLASS_OTHER << 24 |
^~~~~~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:148:3:
error: implicit declaration of function ‘int_set_handler’
[-Werror=implicit-function-declaration]
int_set_handler(IRQ_VECTOR + ndevices - 1, irq_handler);
^~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:149:3:
error: implicit declaration of function ‘pci_msix_set_vector’
[-Werror=implicit-function-declaration]
pci_msix_set_vector(bdf, IRQ_VECTOR + ndevices - 1, 0);
^~~~~~~~~~~~~~~~~~~
/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.c:162:4:
error: implicit declaration of function ‘delay_us’
[-Werror=implicit-function-declaration]
delay_us(1000*1000);
^~~~~~~~
cc1: all warnings being treated as errors
make[4]: ***
[/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm/ivshmem-demo.o]
Error 1
make[3]: ***
[/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates/demos/arm]
Error 2
make[2]: ***
[/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6/inmates] Error 2
make[1]: ***
[_module_/home/guest/user1/tegra_K1/jailhouse_kernel_4.11/jailhouse-0.6] Error 2
make: *** [modules] Error 2