AnsweredAssumed Answered

imx8qm  Xen Boot fails on hardware partition

Question asked by minskey guo on May 22, 2019
Latest reply on May 28, 2019 by minskey guo

I am working a customized imx8qm mek board, and run into trouble with hardware partition.   During uboot period, if "scu_rm dtb" is called,  the memory @ 0x85000000 cannot be accessed, as a result,  system reset when load Dom0 kernel to that address,   the details as follows:

 

=> fatload mmc 0:1 0x80280000 xen
819536 bytes read in 11 ms (71.1 MiB/s)
=> fatload mmc 0:1 0x83000000 fsl-imx8qm-mek-dom0.dtb
104201 bytes read in 9 ms (11 MiB/s)
=> scu_rm dtb 0x83000000
fdt addr 0000000083000000
partition_alloc: os_part, 4: parent_part, 3
=> scu_rm print
part id: 4 3
=> fatload mmc 0:1 0x85000000 Image
"Synchronous Abort" handler, esr 0x96000210
elr: 000000008004acdc lr : 000000008004accc (reloc)
elr: 00000000ffea6cdc lr : 00000000ffea6ccc
x0 : 00000000ffffffff x1 : 00000000fd66b320
x2 : 00000000fd66b308 x3 : 00000000ffea6c98
x4 : 000000000000000e x5 : 000000000000000e
x6 : 0000000000000000 x7 : 0000000000000010
x8 : 0000000000000044 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 0000000000000006
x12: 000000000001869f x13: 00000000000187ac
x14: 00000000fd66b70c x15: 00000000ffffffff
x16: 0000000000002080 x17: 0000000000000000
x18: 00000000fd679da8 x19: 000000005b010000
x20: 00000000fd684f50 x21: 00000000fd66b308
x22: 00000000fd66b320 x23: 0000000000000000
x24: 0000000000000000 x25: 00000000fd686970
x26: 00000000ffee346d x27: 0000000000000011
x28: 0000000000000001 x29: 00000000fd66b250

Resetting CPU ...

 

 

However, if I skip "scu_rm dtb 0x83000000 ",  Xen can boot but will panic later:

 

 

=> fatload mmc 0:1 0x80280000 xen
819536 bytes read in 11 ms (71.1 MiB/s)
=> fatload mmc 0:1 0x83000000 fsl-imx8qm-mek-dom0.dtb
104201 bytes read in 9 ms (11 MiB/s)
=> fatload mmc 0:1 0x85000000 Image
23175680 bytes read in 101 ms (218.8 MiB/s)
=> fdt addr 0x83000000
=> fdt resize 256
=> fdt set /chosen/module@0 reg <0x00000000 0x85000000 0x00000000 0x${filesize}>
=> fdt set /chosen/module@0 bootargs "${bootargs} ${xenlinux_bootargs}"
=> setenv bootargs ${xenhyper_bootargs};
=> booti ${loadaddr} - ${fdt_addr};
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
reserving fdt memory region: addr=84000000 size=2000000
reserving fdt memory region: addr=86000000 size=400000
reserving fdt memory region: addr=90000000 size=400000
reserving fdt memory region: addr=90400000 size=1c00000
reserving fdt memory region: addr=92000000 size=200000
reserving fdt memory region: addr=92400000 size=2000000
reserving fdt memory region: addr=83000000 size=1a000
Using Device Tree in place at 0000000083000000, end 000000008301cfff
/dma-controller@599F0000, 67608

Starting kernel ...

Xen 4.11.1-pre
(XEN) Xen version 4.11.1-pre (minskey@) (aarch64-poky-linux-gcc (GCC) 7.3.0) debug=n Wed May 22 14:49:04 UTC 2019
(XEN) Latest ChangeSet: Tue Apr 16 16:24:07 2019 +0800 git:2eb8336-dirty
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN) Processor Features: 0000000001002222 0000000000000000
(XEN) Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN) Extensions: FloatingPoint AdvancedSIMD GICv3-SysReg
(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:10011011
(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: 8000 KHz
(XEN) GICv3 initialization:
(XEN) gic_dist_addr=0x00000051a00000
(XEN) gic_maintenance_irq=25
(XEN) gic_rdist_stride=0
(XEN) gic_rdist_regions=1
(XEN) redistributor regions:
(XEN) - region 0: 0x00000051b00000 - 0x00000051bc0000
(XEN) GICv3 compatible with GICv2 cbase 0x00000052000000 vbase 0x00000052020000
(XEN) GICv3: 544 lines, (IID 0001143b).
(XEN) GICv3: CPU0: Found redistributor in region 0 @000000004002d000
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) Bringing up CPU1
(XEN) GICv3: CPU1: Found redistributor in region 0 @000000004004d000
(XEN) Bringing up CPU2
(XEN) GICv3: CPU2: Found redistributor in region 0 @000000004006d000
(XEN) Bringing up CPU3
(XEN) GICv3: CPU3: Found redistributor in region 0 @000000004008d000
(XEN) Bringing up CPU4
(XEN) GICv3: CPU4: Found redistributor in region 0 @00000000400ad000
(XEN) Bringing up CPU5
(XEN) GICv3: CPU5: Found redistributor in region 0 @00000000400cd000
(XEN) Brought up 6 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 @ 0000000085000000
(XEN) Allocating 1:1 mappings totalling 2048MB for dom0:
(XEN) BANK[0] 0x00000088000000-0x00000090000000 (128MB)
(XEN) BANK[1] 0x00000098000000-0x00000100000000 (1664MB)
(XEN) BANK[2] 0x00000960000000-0x00000970000000 (256MB)
(XEN) Grant table range: 0x0000097fe00000-0x0000097fe40000
(XEN) Ignore reserved memory reg, /reserved-memory/decoder_boot@0x84000000!
(XEN) Ignore reserved memory reg, /reserved-memory/encoder_boot@0x86000000!
(XEN) Ignore reserved memory reg, /reserved-memory/rpmsg@0x90000000!
(XEN) Ignore reserved memory reg, /reserved-memory/rpmsg_dma@0x90400000!
(XEN) Ignore reserved memory reg, /reserved-memory/decoder_rpc@0x92000000!
(XEN) Ignore reserved memory reg, /reserved-memory/encoder_rpc@0x92200000!
(XEN) Ignore reserved memory reg, /reserved-memory/dsp@0x92400000!
(XEN) Ignore reserved memory reg, /reserved-memory/encoder_reserved@0x94400000!
(XEN) Share gpio between Domains: /gpio@5d090000
(XEN) Share gpio between Domains: /gpio@5d0c0000
(XEN) HACK: skip /imx8_gpu_ss setup!
(XEN) NODE /m41_mem@0x94400000 conflicts with kernel address 0x00000088080000-0x0000008969a200
(XEN) Adjust load_offset to 0x00000008000000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000085000000 to 0000000090080000-000000009169a200
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Unable to copy the kernel in the hwdom memory
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...


U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga+g87a19df (May 17 2019 - 00:08:15 +0000)

 

Can u give me some clues about this issue ? Like,  is it caused by uboot or scu firmware ?   The code is based on 4.14.98_2.0.0_ga+g87a19df release.

 

 

Regards,

-Minskey

Outcomes