Hi all,
I have an Avnet Ultra96v2 and a Petalinux Xen Hypervisor build made with the Xilinx 2018.3 SDK and this 2018.3 BSP: http://downloads.element14.com/downloads/zedboard/ultra96/ultra96v2_oob_2018_3.zip
Instructions followed to make the Xen build: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/76677121/Building+Xen+Hypervisor+with+Petalinux+2018.3
After petalinux-build and preparing the SD card I power-up the board and stop the autoboot, then follow the steps in the Xilinx document at SD Booting Xen and Dom0 | RootFS mounted on RAM (initrd):
ZynqMP> mmc dev 0 &&&& mmcinfo
switch to partitions #0, OK
mmc0 is current device
Device: mmc@ff160000
Manufacturer ID: 3
OEM: 5344
Name: SU32G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
ZynqMP> load mmc 0 1000000 system.dtb &&&& load mmc 0 0x80000 Image
reading system.dtb
54761 bytes read in 21 ms (2.5 MiB/s)
reading Image
15034880 bytes read in 1082 ms (13.3 MiB/s)
ZynqMP> fdt addr 1000000
ZynqMP> load mmc 0 1030000 xen.ub
reading xen.ub
786832 bytes read in 72 ms (10.4 MiB/s)
ZynqMP> load mmc 0 2000000 rootfs.cpio.gz.u-boot
reading rootfs.cpio.gz.u-boot
455152849 bytes read in 32454 ms (13.4 MiB/s)
I then do bootm 1030000 2000000 1000000, but it doesn't go well:
## Booting kernel from Legacy Image at 01030000 ...
Image Name:
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 786768 Bytes = 768.3 KiB
Load Address: 06000000
Entry Point: 06000000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
Image Name: petalinux-user-image-ultra96-zyn
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 455152785 Bytes = 434.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
Booting using the fdt blob at 0x1000000
Loading Kernel Image ... OK
Loading Ramdisk to ffffffffecdee000, end 07fff491 ... "Synchronous Abort" handler, esr 0x96000144
ELR: 8001738
LR: 801bd80
x0 : ffffffffecdee000 x1 : 0000000007fff4c0
x2 : 0000000000000040 x3 : 000000000000003f
x4 : 000000002320f491 x5 : 0000000000000000
x6 : 000000007fe6e558 x7 : 000000002320f491
x8 : 000000007dd928f0 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 000000007ff00000
x12: 000000007fe9ebc8 x13: 000000007dd91a70
x14: ffffffffecdee000 x15: 0000000000000008
x16: 0000000000000002 x17: 0000000007fff491
x18: 000000007dd92de8 x19: 000000001b211491
x20: 0000000008000000 x21: 0000000002000040
x22: 000000007fe9eb28 x23: 000000007fe9eb00
x24: 000000007fe9eaf8 x25: 0000000001030040
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000006000000 x29: 000000007dd92a30
Resetting CPU ...
resetting ...
Xilinx Zynq MP First Stage Boot Loader
Release 2018.3 Oct 4 2019 - 11:41:21
The ramdisk load address looks bad.
If so, how and where is it defined?
How to fix it?
For the record, if I follow the instructions at SD Booting Xen and Dom0 | RootFS in Kernel (initramfs), not loading rootfs.cpio.gz.u-boot, boot-up gets further but ends with a kernel panic because the RootFS is indeed missing:
...
Loading Kernel Image ... OK
Loading Device Tree to 0000000007fef000, end 0000000007fff5e8 ... OK
Starting kernel ...
Xen 4.11.1-pre
(XEN) Xen version 4.11.1-pre (@) (aarch64-xilinx-linux-gcc (GCC) 7.3.0) debug=n Mon Dec 3 21:50:14 UTC 2018
(XEN) Latest ChangeSet: Thu Nov 8 15:40:11 2018 -0800 git:b2edf52-dirty
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN) Processor Features: 0000000000002222 0000000000000000
(XEN) Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN) Extensions: FloatingPoint AdvancedSIMD
(XEN) Debug Features: 0000000010305106 0000000000000000
(XEN) Auxiliary Features: 0000000000000000 0000000000000000
(XEN) Memory Model Features: 0000000000001122 0000000000000000
(XEN) ISA Features: 0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN) Processor Features: 00000131:00011011
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN) Extensions: GenericTimer Security
(XEN) Debug Features: 03010066
(XEN) Auxiliary Features: 00000000
(XEN) Memory Model Features: 10201105 40000000 01260000 02102211
(XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 100000 KHz
(XEN) GICv2 initialization:
(XEN) gic_dist_addr=00000000f9010000
(XEN) gic_cpu_addr=00000000f9020000
(XEN) gic_hyp_addr=00000000f9040000
(XEN) gic_vcpu_addr=00000000f9060000
(XEN) gic_maintenance_irq=25
(XEN) GICv2: Adjusting CPU interface base to 0xf902f000
(XEN) GICv2: 192 lines, 4 cpus, secure (IID 0200143b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) Bringing up CPU1
(XEN) Bringing up CPU2
(XEN) Bringing up CPU3
(XEN) Brought up 4 CPUs
(XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) I/O virtualisation enabled
(XEN) - Dom0 mode: Relaxed
(XEN) Interrupt remapping enabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 0000000000080000
(XEN) Allocating 1:1 mappings totalling 768MB for dom0:
(XEN) BANK[0] 0x00000020000000-0x00000040000000 (512MB)
(XEN) BANK[1] 0x00000060000000-0x00000070000000 (256MB)
(XEN) Grant table range: 0x0000007fc00000-0x0000007fc40000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000000080000 to 0000000020080000-0000000023180000
(XEN) Loading dom0 DTB to 0x0000000028000000-0x000000002800be15
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 280kB init memory.
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER4
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER8
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER12
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER16
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER20
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER0
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Fri Oct 4 11:17:48 UTC 2019
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: Avnet Ultra96 Rev1
...
[ 4.595713] b301 1048576 mmcblk0p1 3cd596cb-01
[ 4.595715]
[ 4.602629] b302 30116864 mmcblk0p2 3cd596cb-02
[ 4.602631]
[ 4.609555] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 4.617858] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.3 #1
[ 4.625116] Hardware name: Avnet Ultra96 Rev1 (DT)
[ 4.629961] Call trace:
[ 4.632483] [<ffffff8008088c58>] dump_backtrace+0x0/0x368
[ 4.637925] [<ffffff8008088fd4>] show_stack+0x14/0x20
[ 4.643027] [<ffffff8008a4d9f8>] dump_stack+0x9c/0xbc
[ 4.648133] [<ffffff800809bdc0>] panic+0x11c/0x274
[ 4.652975] [<ffffff8008db1124>] mount_block_root+0x1a8/0x27c
[ 4.658767] [<ffffff8008db1430>] mount_root+0x11c/0x134
[ 4.664043] [<ffffff8008db15b4>] prepare_namespace+0x16c/0x1b4
[ 4.669925] [<ffffff8008db0d44>] kernel_init_freeable+0x1b8/0x1d8
[ 4.676069] [<ffffff8008a5fd48>] kernel_init+0x10/0x100
[ 4.681344] [<ffffff8008084a90>] ret_from_fork+0x10/0x18
[ 4.686709] Kernel Offset: disabled
[ 4.690255] CPU features: 0x002004
[ 4.693711] Memory Limit: none
[ 4.696829] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Thanks in advance for any help.