On 05.08.19 12:00, João Reis wrote:
> Ok, so i've increased non-root cell's RAM memory region by 256MB (now it 
> starts
> from 0x50000000), and changed the reserved memory for hypervisor and non-root
> cells (on u-boot: mem=1280M, which is equal to 0x50000000 bytes).

OK, good.

> 
> It can load the cell, and when it starts it gives me an error related to 
> UART0 (?):
> 
> [   62.493128] Created Jailhouse cell "non-root"
> Cell "non-root" can be loaded
> Started cell "non-root"
> Unhandled data read at 0xff000024(4)

If you advertise UART0 to the non-root cell via the inmate device tree, you will
get such an access. Are you doing that? The device trees we ship in Jailhouse
use UART1.

Jan

> FATAL: unhandled trap (exception class 0x24)
> Cell state before exception:
>  pc: ffffff8008480448   lr: ffffff8008473a70 spsr: 80000085     EL1
>  sp: ffffff800801b9e0  esr: 24 1 1830007
>  x0: ffffff800d83c038   x1: 0000000000000000   x2: ffffff8008480440
>  x3: ffffff8008011024   x4: 0000000000000000   x5: 0000000000000064
>  x6: 0000000000000051   x7: 3030303035323620   x8: 7820612073692029
>  x9: 2030535079747420  x10: 204f494d4d207461  x11: 3030303066667830
> x12: 2071726928203030  x13: 736162202c35203d  x14: 3d20647561625f65
> x15: ffffffffffffffff  x16: 0000000000000001  x17: 0000000000000001
> x18: 0000000000000010  x19: ffffffc03a990000  x20: ffffff800d83c038
> x21: ffffff800d6104c0  x22: ffffffc03a990100  x23: ffffff800d60e000
> x24: 0000000000000000  x25: ffffffc03a99eb00  x26: ffffff8008959a38
> x27: ffffffc03a99e600  x28: 0000000000000005  x29: ffffff800801b9e0
> Parking CPU 2 (Cell: "non-root")
> 
> segunda-feira, 5 de Agosto de 2019 às 07:30:59 UTC+1, Jan Kiszka escreveu:
> 
>     On 02.08.19 21:46, João Reis wrote:
>     > I send in attachment the root cell (ultra96.c) and non root cell
>     > (ultra96-linux-demo2.c) config files, along with the .dtb i am using.
>     >
>     > The Image and rootfs.cpio files occupy 89,9MB and 79,4MB, respectively.
>     (link to
>     > download them if you want to:
>     > http://www.mediafire.com/folder/sopta5vdf01yfm8,kwk1yt5jc9zcpl3
>     <http://www.mediafire.com/folder/sopta5vdf01yfm8,kwk1yt5jc9zcpl3>)
> 
>     That's obviously too large for the remaining space in that region. I will
>     try to
>     reproduce in order to understand why the loader attempts this 
> nevertheless.
>     Meanwhile, you could try if expanding that region a bit more makes it 
> work - or
>     just moves the problem around.
> 
>     Jan
> 
>     >
>     > sexta-feira, 2 de Agosto de 2019 às 08:28:52 UTC+1, Jan Kiszka escreveu:
>     >
>     >     On 02.08.19 04:34, João Reis wrote:
>     >     > The value of arch.ramdisk_address() is 2062893056, converted to
>     >     hexadecimal is
>     >     > 0x7AF54000, which is within the newly added RAM memory region that
>     begins at
>     >     > address 0x60000000.
>     >     >
>     >
>     >     OK, and what' the size that shall be transferred here? Keep in mind
>     that there
>     >     is only 0xF9C000 (16367616) left in that region. That information is
>     part of
>     >     the
>     >     'load' structure JailhouseCell.load assembles. If that size if too
>     large, the
>     >     driver will reject it. That would explain the error, not yet the
>     reason for
>     >     jailhouse-cell-linux to make that mistake.
>     >
>     >     If you share your configs, the kernel and dtb images and the
>     information how
>     >     large the initramfs is, I can try to reproduce that.
>     >
>     >     Jan
>     >
>     >     > quarta-feira, 31 de Julho de 2019 às 07:22:32 UTC+1, Jan Kiszka
>     escreveu:
>     >     >
>     >     >     On 31.07.19 02:40, João Reis wrote:
>     >     >     > Other thing i forgot was that on Ultrascale+ the RAM 
> finishes
>     at 2GB
>     >     >     > (0x80000000), so i moved the memory region to 0x60000000, 
> with a
>     >     different
>     >     >     size
>     >     >     > to not overlap any other memory region.
>     >     >     >
>     >     >     > /* RAM */ {
>     >     >     > .phys_start = 0x60000000,
>     >     >     > .virt_start = 0x60000000,
>     >     >     > .size = 0x1bef0000, //must be page size aligned
>     >     >     > .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>     >     >     > JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE |
>     >     >     > JAILHOUSE_MEM_DMA,
>     >     >     > },
>     >     >     >
>     >     >     > But now it gives me the error on ramdisk_address:
>     >     >     >
>     >     >     > Traceback (most recent call last):
>     >     >     >   File "/usr/local/libexec/jailhouse/jailhouse-cell-linux", 
> line
>     >     831, in
>     >     >     <module>
>     >     >     >     cell.load(args.initrd.read(), arch.ramdisk_address())
>     >     >     >   File
>     "/usr/local/lib/python2.7/dist-packages/pyjailhouse/cell.py",
>     >     line
>     >     >     44, in
>     >     >     > load
>     >     >     >     fcntl.ioctl(self.dev <http://self.dev> <http://self.dev>
>     <http://self.dev>,
>     >     self.JAILHOUSE_CELL_LOAD, load)
>     >     >     > IOError: [Errno 22] Invalid argument
>     >     >     >
>     >     >
>     >     >     To make this a bit more systematic, I would recommend you to
>     >     instrument the
>     >     >     code, dump this address e.g., and match against what you 
> think you
>     >     configured.
>     >     >
>     >     >     Jan
>     >     >
>     >     >     --
>     >     >     Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>     >     >     Corporate Competence Center Embedded Linux
>     >     >
>     >     > --
>     >     > 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] <javascript:>
>     >     > <mailto:[email protected] <javascript:>
>     <javascript:>>.
>     >     > To view this discussion on the web visit
>     >     >
>     >    
>     
> https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com>
> 
>     >    
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com>>
> 
>     >
>     >     >
>     >    
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com?utm_medium=email&utm_source=footer
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com?utm_medium=email&utm_source=footer>
> 
>     >    
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com?utm_medium=email&utm_source=footer
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/1ebfd29b-3c2d-490d-bd2d-c7cbdad1507c%40googlegroups.com?utm_medium=email&utm_source=footer>>>.
> 
>     >
>     >
>     >     --
>     >     Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>     >     Corporate Competence Center Embedded Linux
>     >
>     > --
>     > 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] <javascript:>
>     > <mailto:[email protected] <javascript:>>.
>     > To view this discussion on the web visit
>     >
>     
> https://groups.google.com/d/msgid/jailhouse-dev/f1de42fc-bae2-4962-ace6-a38e99a441d4%40googlegroups.com
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/f1de42fc-bae2-4962-ace6-a38e99a441d4%40googlegroups.com>
> 
>     >
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/f1de42fc-bae2-4962-ace6-a38e99a441d4%40googlegroups.com?utm_medium=email&utm_source=footer
>     
> <https://groups.google.com/d/msgid/jailhouse-dev/f1de42fc-bae2-4962-ace6-a38e99a441d4%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> 
> 
> 
>     -- 
>     Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>     Corporate Competence Center Embedded Linux
> 
> -- 
> 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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jailhouse-dev/82a56f53-a498-4a27-8458-250d9a7e7078%40googlegroups.com
> <https://groups.google.com/d/msgid/jailhouse-dev/82a56f53-a498-4a27-8458-250d9a7e7078%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
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/211c06d2-9f92-cbd1-8215-12c577eefa62%40siemens.com.

Reply via email to