All of lore.kernel.org
 help / color / mirror / Atom feed
* Running XEN on imx8mq
@ 2019-03-18  7:39 Amit Tomer
  2019-03-18 10:33 ` Julien Grall
  0 siblings, 1 reply; 15+ messages in thread
From: Amit Tomer @ 2019-03-18  7:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Andre Przywara, Julien Grall, Stefano Stabellini, peng.fan

[-- Attachment #1: Type: text/plain, Size: 6284 bytes --]

Hi,

Trying to run XEN on imx8mq which is different from imx8qm in term of
UART controller IP(attached is the debug code).

DTS used for host is :
https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_4.9.x_2.0.0_ga/arch/arm64/boot/dts/freescale/fsl-imx8mq.dtsi

But , I see following issue:

=> setenv xen_addr_r 0x42000000 ;setenv fdt_addr_r 0x43000000;setenv
kernel_addr_r 0x40480000
=> setenv fdt_high 0xffffffff;fdt addr $fdt_addr_r;fdt resize
=> setenv xen_bootargs console=dtuart dom0_mem=1024M
=> setenv dom0_bootargs console=hvc0,115200n8 earlycon=xenboot debug
clk_ignore_unused root=/dev/mmcblk1p1 rw rootwait
=> fdt set /chosen xen,xen-bootargs \"$xen_bootargs\";
=> fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\";fdt mknode
/chosen modules
=> fdt set /chosen/modules '#address-cells' <1>;fdt set
/chosen/modules '#size-cells' <1>;fdt mknode /chosen/modules module@0
=> fdt set /chosen/modules/module@0 compatible "xen,linux-zimage"
"xen,multiboot-module"
=> fdt set /chosen/modules/module@0 reg < $kernel_addr_r 0x1800000 >
=>
=> booti ${xen_addr_r} - ${fdt_addr_r}
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   reserving fdt memory region: addr=43000000 size=d000
   Loading Device Tree to 00000000be510000, end 00000000be51ffff ... OK

Starting kernel ...

- UART enabled -
- CPU 00000000 booting -
- Current EL 00000008 -
- Xen starting at EL2 -
- Zero BSS -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) Checking for initrd in /chosen
(XEN) RAM: 0000000040000000 - 00000000bfffffff
(XEN)
(XEN) MODULE[0]: 00000000be510000 - 00000000be51d000 Device Tree
(XEN) MODULE[1]: 0000000040480000 - 0000000041c80000 Kernel
(XEN)  RESVD[0]: 0000000043000000 - 000000004300d000
(XEN)  RESVD[1]: 00000000be510000 - 00000000be51d000
(XEN)
(XEN)
(XEN) Command line: console=dtuart dom0_mem=1024M
(XEN) Domain heap initialised
(XEN) Booting using Device Tree
(XEN) Platform: Generic System
(XEN) Taking dtuart configuration from /chosen/stdout-path
(XEN) Looking for dtuart at "/serial@30860000", options ""
(XEN) Unable to initialize dtuart: -9
(XEN) Bad console= option 'dtuart'
 Xen 4.12.0-rc
(XEN) Xen version 4.12.0-rc (amit@) (aarch64-linux-gnu-gcc (Linaro GCC
7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision
d29120a424ecfbc167ef90065c0eeb7f91977701]) debug=y  Mon Mar 18
12:30:38 I9
(XEN) Latest ChangeSet: Tue Mar 5 12:48:52 2019 +0000 git:4deeaf2-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) Using SMC Calling Convention v1.0
(XEN) Using PSCI v1.0
(XEN) SMP: Allowing 4 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 8333 KHz
(XEN) GICv3 initialization:
(XEN)       gic_dist_addr=0x00000038800000
(XEN)       gic_maintenance_irq=25
(XEN)       gic_rdist_stride=0
(XEN)       gic_rdist_regions=1
(XEN)       redistributor regions:
(XEN)         - region 0: 0x00000038880000 - 0x00000038940000
(XEN) GICv3: 160 lines, (IID 0001143b).
(XEN) GICv3: CPU0: Found redistributor in region 0 @000000004001a000
(XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2)
(XEN) Initializing Credit2 scheduler
(XEN)  load_precision_shift: 18
(XEN)  load_window_shift: 30
(XEN)  underload_balance_tolerance: 0
(XEN)  overload_balance_tolerance: -3
(XEN)  runqueues arrangement: socket
(XEN)  cap enforcement granularity: 10ms
(XEN) load tracking window length 1073741824 ns
(XEN) Adding cpu 0 to runqueue 0
(XEN)  First cpu on runqueue, activating
(XEN) Allocated console ring of 32 KiB.
(XEN) Bringing up CPU1
- CPU 00000001 booting -
- Current EL 00000008 -
- Xen starting at EL2 -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) GICv3: CPU1: Found redistributor in region 0 @000000004003a000
(XEN) Adding cpu 1 to runqueue 0
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
- CPU 00000002 booting -
- Current EL 00000008 -
- Xen starting at EL2 -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) GICv3: CPU2: Found redistributor in region 0 @000000004005a000
(XEN) Adding cpu 2 to runqueue 0
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
- CPU 00000003 booting -
- Current EL 00000008 -
- Xen starting at EL2 -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) GICv3: CPU3: Found redistributor in region 0 @000000004007a000
(XEN) Adding cpu 3 to runqueue 0
(XEN) CPU 3 booted.
(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 disabled
(XEN) build-id: d884da2ad279978f5b120cd02aca4034d898f133
(XEN) alternatives: Patching with alt table 00000000002abbf8 -> 00000000002ac240
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading Domd0 kernel from boot module @ 0000000040480000
(XEN) Allocating 1:1 mappings totalling 1024MB for dom0:
(XEN) BANK[0] 0x00000060000000-0x000000a0000000 (1024MB)
(XEN) Grant table range: 0x00000042000000-0x00000042040000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000040480000 to 0000000060080000-0000000061880000
(XEN) dom0 IPA 0x0000000060080000
(XEN) P2M @ 0000000801bff4a0 mfn:0xbffcc
(XEN) Using concatenated root table 0
(XEN) 1ST[0x1] = 0x02c00000400006fd
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Unable to copy the kernel in the hwdom memory
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

[-- Attachment #2: debug-imx8mq.inc --]
[-- Type: application/octet-stream, Size: 1521 bytes --]

/*
 * xen/arch/arm/arm64/debug-imx8mq.inc
 *
 * IMX8MQ specific debug code.
 *
 * Copyright (c) 2019, Amit Singh Tomar <amittomer25@gmail.com>.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms and conditions of the GNU General Public
 * License, version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; If not, see <http://www.gnu.org/licenses/>.
 */

#define IMX_UART_UTS_REG        0xb4
#define IMX_UART_UTXD_REG       0x40
#define IMX_UART_UTS_TXFULL     4
#define IMX_UART_UTS_TXEMPTY    6

/*
 * IMX8MQ UART wait UART to be ready to transmit
 * xb: register which contains the UART base address
 * c: scratch register
 */
.macro early_uart_ready xb c
1:
        ldr     w\c, [\xb, #IMX_UART_UTS_REG]        /* UART Test Register */
        tbz    w\c, #IMX_UART_UTS_TXEMPTY, 1b        /* Check TXEMPTY bit */
.endm

/*
 * IMX8MQ UART transmit character
 * xb: register which contains the UART base address
 * wt: register which contains the character to transmit
 */
.macro early_uart_transmit xb wt
	str    \wt, [\xb, #IMX_UART_UTXD_REG]
.endm

/*
 * Local variables:
 * mode: ASM
 * indent-tabs-mode: nil
 * End:
 */

[-- Attachment #3: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-04-17  9:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18  7:39 Running XEN on imx8mq Amit Tomer
2019-03-18 10:33 ` Julien Grall
2019-03-18 10:41   ` Amit Tomer
2019-03-18 11:21     ` Julien Grall
2019-03-18 12:45       ` Amit Tomer
2019-03-18 15:12       ` Amit Tomer
2019-03-19 10:33         ` Arm boot regression with Xen 4.12 Julien Grall
2019-03-19 14:01           ` Amit Tomer
2019-03-19 15:05             ` Julien Grall
2019-03-22 10:48               ` Julien Grall
2019-03-22 11:35                 ` Amit Tomer
2019-04-17  8:02                   ` Amit Tomer
2019-04-17  8:02                     ` [Xen-devel] " Amit Tomer
2019-04-17  9:22                     ` Julien Grall
2019-04-17  9:22                       ` [Xen-devel] " Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.