[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 0/8] xen/arm: very initial cubieboard2 support.



2013/9/10 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
> The following patches are a very early set of cubieboard patches, based
> on latest staging, eb786f709249666e1f7364706f94be1a6c4e04da
>
> Several are not to be applied because they can be done better using
> infrastructure from Julien's "Allow Xen to boot with a raw Device Tree"
> patch. They are included for completeness.
>
> With this I can boot up until dom0 panics due to lack of a root
> filesystem. This is because upstream Linux currently lacks any useful
> storage drivers (SATA, USB host, MMC). Hopefully this will resolve
> itself soon

>
> The bulk of this is the hacking around of the ns16550 driver to support
> ARM platforms and DTB.
>
> It's currently a bit of a faff to get going. Hopefully the following is
> helpful:
>
> u-boot
> ======
>
> https://github.com/linux-sunxi/u-boot-sunxi.git linux-sunxi/sunxi
> commit e94cff93c273b0825bea135e0f559f5580156fa6
>
> Plus git://git.linaro.org/people/aprzywara/u-boot.git hypmode_v4
> commit 5068b337518617586f2e51b6d616c54dbec4fa62
>
> Plus patches for hypmode on sunxi and to initialise CNTFRQ.
>
> All of which can be found in
>      git://xenbits.xen.org/people/ianc/u-boot.git devel/cubieboard2
>
> Built with:
>      make Cubieboard2_FEL CROSS_COMPILE=arm-linux-gnueabihf-
>
> Linux
> =====
>
> Linux tree:
> https://github.com/mripard/linux.git sunxi/dt-for-3.12
> commit 82abe5294aeadc42508c7944f3a9aec0eece214c
>
> Using in tree DTS arch/arm/boot/dts/sun7i-a20-cubieboard2.dts with the
> following patch.
>
> Build Image and dtbs in the usual way
>
> Xen
> ===
>
> Build in the usual way.
>
> Xen can use CONFIG_EARLY_PRINTK=sun7i.
>
> Booting
> =======
>
> I am using FEL boot per http://linux-sunxi.org/FEL/USBBoot and
> http://linux-sunxi.org/FEL using the fel-sdboot.sunxi on MMC
> mechanism.
>
> linux-sunxi tools from git://github.com/linux-sunxi/sunxi-tools.git
> commit b398456630b310dbf31c7515e8d6af37903c4975 and:
>
> ./usb-boot ~/devel/u-boot.git/spl/u-boot-spl.bin 
> ~/devel/u-boot.git/u-boot.bin \
>            bootxen.scr ~/devel/xen.git/xen/xen \
>            ~/devel/linux.git/arch/arm/boot/dts/sun7i-a20-cubieboard2.dtb
>            ~/devel/linux.git/arch/arm/boot/zImage
>
> bootxen.scr is:
> $ cat bootxen
> setenv bootargs dtuart=serial0 earlyprint loglvl=all conswitch=x
> bootz 0x44000000 - 0x43000000
> $ mkimage -T script -A arm -d bootxen bootxen.scr
>
> DTS patch
> =========
>
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts 
> b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
>  31b76f0..6c0c387 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> @@ -18,6 +18,21 @@
>         model = "Cubietech Cubieboard2";
>         compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
>
> +       chosen {
> +               #address-cells = <1>;
> +               #size-cells = <1>;
> +
> +               module@0 {
> +                       compatible = "xen,linux-zimage", 
> "xen,multiboot-module";
> +                       bootargs = "console=hvc0 earlyprintk ";
> +                       reg = <0x50000000 0x800000>;
> +               };
> +       };
> +
> +       aliases {
> +               serial0 = &uart0;
> +       };
> +
>         soc@01c00000 {
>                 pinctrl@01c20800 {
>                         led_pins_cubieboard2: led_pins@0 {
> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi 
> b/arch/arm/boot/dts/sun7i-a20.dtsi
> index f4e4524..bfc5dc2 100644
> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> @@ -26,11 +26,6 @@
>                         reg = <0>;
>                 };
>
> -               cpu@1 {
> -                       compatible = "arm,cortex-a7";
> -                       device_type = "cpu";
> -                       reg = <1>;
> -               };
>         };
>
>         memory {
> @@ -55,6 +55,14 @@
>                 };
>         };
>
> +        timer {
> +                compatible = "arm,armv7-timer";
> +                interrupts = <1 13 0xf08>,
> +                             <1 14 0xf08>,
> +                             <1 11 0xf08>,
> +                             <1 10 0xf08>;
> +        };
> +
>         soc@01c00000 {
>                 compatible = "simple-bus";
>                 #address-cells = <1>;
> @@ -94,17 +102,6 @@
>                         };
>                 };
>
> -               timer@01c20c00 {
> -                       compatible = "allwinner,sun4i-timer";
> -                       reg = <0x01c20c00 0x90>;
> -                       interrupts = <0 22 1>,
> -                                    <0 23 1>,
> -                                    <0 24 1>,
> -                                    <0 25 1>,
> -                                    <0 67 1>,
> -                                    <0 68 1>;
> -                       clocks = <&osc24M>;
> -               };
>
>                 wdt: watchdog@01c20c90 {
>                         compatible = "allwinner,sun4i-wdt";
>
>


Thanks Ian. I can boot dom0 until rootfs panic as yours. So I tried
booting dom0 with built-in initramfs, but it's failed.  I am not sure
whether the problem is the initramfs or not.



Starting kernel ...

- UART enabled -
- CPU 00000000 booting -
- Machine ID 000010bb -
- Started in Hyp mode -
- Zero BSS -
- Setting up control registers -
- Turning on paging -
- Ready -
-DTB R8 402d7700 -
- PADDR R9 40200000 -
- phys-offset R10 40000000 -
RAM: 0000000040000000 - 00000000bfffffff

MODULE[1]: 0000000060000000 - 0000000060800000
Placing Xen at 0x00000000bfe00000-0x00000000c0000000
Xen heap: 65536 pages  Dom heap: 458752 pages
Looking for UART console serial0
ns16550_uart_dt_init
ns16550 at 1c28000-1c28400
console done?
UART mapped at 10007000
divisor 0
 __  __            _  _   _  _                      _        _     _
 \ \/ /___ _ __   | || | | || |     _   _ _ __  ___| |_ __ _| |__ | | ___
  \  // _ \ '_ \  | || |_| || |_ __| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
  /  \  __/ | | | |__   _|__   _|__| |_| | | | \__ \ || (_| | |_) | |  __/
 /_/\_\___|_| |_|    |_|(_) |_|     \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

(XEN) Xen version 4.4-unstable (joshzhao@)
(arm-unknown-linux-gnueabi-gcc (GCC) 4.6.3) debug=y Wed Sep 11
09:40:18 CST 2013
(XEN) Latest ChangeSet: Mon Aug 26 12:40:44 2013 +0200 git:8a7769b-dirty
(XEN) Console output is synchronous.
(XEN) Processor: "ARM Limited", variant: 0x0, part 0xc07, rev 0x4
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00001131:00011011
(XEN)     Instruction Sets: AArch32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10101105 40000000 01240000 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 11112131 10011142 00000000
(XEN) Platform: ALLWINNER SUN7I-A20
(XEN) Generic Timer IRQ: phys=55 hyp=57 virt=56
(XEN) clock-frequency res:0
(XEN) Using generic timer at 24000 KHz boot_count:0000000027b08aa2
(XEN) GIC initialization:
(XEN)         gic_dist_addr=0000000001c81000
(XEN)         gic_cpu_addr=0000000001c82000
(XEN)         gic_hyp_addr=0000000001c84000
(XEN)         gic_vcpu_addr=0000000001c86000
(XEN)         gic_maintenance_irq=25
(XEN) GIC: 160 lines, 1 cpu, secure (IID 0100143b).
(XEN) Waiting for 0 other CPUs to be ready
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) VFP implementer 0x41 architecture 2 part 0x30 variant 0x7 rev 0x4
(XEN) Brought up 1 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Populate P2M 0x90000000->0xa0000000 (1:1 mapping for dom0)
(XEN) Device-tree contains "xen,xen" node. Ignoring.
(XEN) Loading kernel from boot module 1
(XEN) Loading zImage from 0000000060000000 to 0000000090008000-0000000090534900
(XEN) Loading dom0 DTB to 0x000000009fe00000-0x000000009fe0105f
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) **********************************************
(XEN) ******* WARNING: CONSOLE OUTPUT IS SYNCHRONOUS
(XEN) ******* This option is intended to aid debugging of Xen by ensuring
(XEN) ******* that all output is synchronously delivered on the serial line.
(XEN) ******* However it can introduce SIGNIFICANT latencies and affect
(XEN) ******* timekeeping. It is NOT recommended for production use!
(XEN) **********************************************
(XEN) 3... 2... 1...
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch
input to Xen)
(XEN) Freed 216kB init memory.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.11.0-rc4-01080-gad22d2d-dirty
(joshzhao@joshzhao-ThinkCentre-M58p) (gcc version 4.6.3 (GCC) ) #2 SMP
Tue Sep 10 16:00:01 CST 2013
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] Machine: Allwinner A1X (Device Tree), model: Cubietech
Cubieboard2
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c0915300,
node_mem_map c0960000
[    0.000000]   DMA zone: 512 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 65536 pages, LIFO batch:15
[    0.000000] PERCPU: Embedded 5 pages/cpu @c0b65000 s7808 r0 d12672 u32768
[    0.000000] pcpu-alloc: s7808 r0 d12672 u32768 alloc=8*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 65024
[    0.000000] Kernel command line: console=hvc0,115200n8 init=/init
debug  ignore_loglevel rw  earlyprintk=xen
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 250240K/262144K available (5052K kernel code,
602K rwdata, 1444K rodata, 2171K init, 290K bss, 11904K reserved, 0K
highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]       .text : 0xc0008000 - 0xc06602e4   (6497 kB)
[    0.000000]       .init : 0xc0661000 - 0xc087fe80   (2172 kB)
[    0.000000]       .data : 0xc0880000 - 0xc0916a40   ( 603 kB)
[    0.000000]        .bss : 0xc0916a40 - 0xc095f3dc   ( 291 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected local timer running at 24.00MHz (virt).
[    0.000000] arch_timer: can't register interrupt 56 (-22)
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: ARM arch timer >56 bits at 24000kHz, resolution 41ns
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns,
wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    3.699313] Calibrating delay loop (skipped), value calculated
using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    3.699327] pid_max: default: 32768 minimum: 301
[    3.699497] Mount-cache hash table entries: 512
[    3.700917] CPU: Testing write buffer coherency: ok
[    3.701214] /cpus/cpu@0 missing clock-frequency property
[    3.701236] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    3.701271] Setting up static identity map for 0xc04c7830 - 0xc04c78c8
[    3.701330] unable to find compatible sirf rstc node in dtb
[    3.701896] Brought up 1 CPUs
[    3.701909] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    3.701916] CPU: All CPU(s) started in SVC mode.
[    3.702576] devtmpfs: initialized
[    3.706351] Xen 4.4 support found, events_irq=31 gnttab_frame_pfn=b0000
[    3.706437] xen:grant_table: Grant tables using version 1 layout
[    3.706501] Grant table initialized
[    3.706737] pinctrl core: initialized pinctrl subsystem
[    3.707125] regulator-dummy: no parameters
[    3.707449] NET: Registered protocol family 16
[    3.707786] Xen: initializing cpu0
[    3.708099] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    3.708234] unable to find compatible sirf pwrc node in dtb
[    3.710859] Serial: AMBA PL011 UART driver
[    3.715594] bio: create slab <bio-0> at 0
[    3.716527] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM
dummy slot
[    3.716554] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[    3.716661] xen:balloon: Initialising balloon driver
[    3.717367] vgaarb: loaded
[    3.717675] SCSI subsystem initialized
[    3.717852] libata version 3.00 loaded.
[    3.718081] usbcore: registered new interface driver usbfs
[    3.718130] usbcore: registered new interface driver hub
[    3.718233] usbcore: registered new device driver usb
[    3.718602] pps_core: LinuxPPS API ver. 1 registered
[    3.718611] pps_core: Software ver. 5.3.6 - Copyright 2005-2007
Rodolfo Giometti <giometti@xxxxxxxx>
[    3.718632] PTP clock support registered
[    3.718664] EDAC MC: Ver: 3.0.0
[    3.719670] Switched to clocksource arch_sys_counter
[    3.727609] NET: Registered protocol family 2
[    3.728177] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    3.728223] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    3.728259] TCP: Hash tables configured (established 2048 bind 2048)
[    3.728327] TCP: reno registered
[    3.728342] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    3.728375] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    3.728599] NET: Registered protocol family 1
[    3.729001] RPC: Registered named UNIX socket transport module.
[    3.729014] RPC: Registered udp transport module.
[    3.729019] RPC: Registered tcp transport module.
[    3.729025] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.729039] PCI: CLS 0 bytes, default 64
[    3.852329] NFS: Registering the id_resolver key type
[    3.852405] Key type id_resolver registered
[    3.852412] Key type id_legacy registered
[    3.852660] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 251)
[    3.852670] io scheduler noop registered
[    3.852677] io scheduler deadline registered
[    3.852830] io scheduler cfq registered (default)
[    3.854795] sunxi-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    3.856031] xen:xen_evtchn: Event-channel device installed
[    4.458268] console [hvc0] enabled
[    4.461714] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.489650] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33) is a U6_16550A
[    4.496908] Serial: IMX driver
[    4.500283] serial: Freescale lpuart driver
[    4.504513] [drm] Initialized drm 1.1.0 20060810
[    4.510010] xen_netfront: Initialising Xen virtual ethernet driver
[    4.516291] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.522633] ehci-pci: EHCI PCI platform driver
[    4.527115] ehci-platform: EHCI generic platform driver
[    4.532331] ehci-omap: OMAP-EHCI Host Controller driver
[    4.537513] ehci-orion: EHCI orion driver
[    4.541518] SPEAr-ehci: EHCI SPEAr driver
[    4.545525] tegra-ehci: Tegra EHCI driver
[    4.549747] usbcore: registered new interface driver usb-storage
[    4.556422] mousedev: PS/2 mouse device common for all mice
[    4.562533] sdhci: Secure Digital Host Controller Interface driver
[    4.568534] sdhci: Copyright(c) Pierre Ossman
[    4.573052] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.579004] usbcore: registered new interface driver usbhid
[    4.584398] usbhid: USB HID core driver
[    4.588488] TCP: cubic registered
[    4.592223] NET: Registered protocol family 10
[    4.597186] sit: IPv6 over IPv4 tunneling driver
[    4.602338] Key type dns_resolver registered
[    4.606577] VFP support v0.3: implementor 41 architecture 2 part 30
variant 7 rev 4
[    4.614075] Registering SWP/SWPB emulation handler
[    4.619663] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    4.628188] Freeing unused kernel memory: 2168K (c0661000 - c087f000)
[    4.636010] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x00007f00
[    4.636010]
[    4.645015] CPU: 0 PID: 1 Comm: init Not tainted
3.11.0-rc4-01080-gad22d2d-dirty #2
[    4.652633] [<c001598c>] (unwind_backtrace+0x0/0xf8) from
[<c0011900>] (show_stack+0x10/0x14)
[    4.661054] [<c0011900>] (show_stack+0x10/0x14) from [<c04c33d4>]
(dump_stack+0x6c/0x88)
[    4.669067] [<c04c33d4>] (dump_stack+0x6c/0x88) from [<c04c0e74>]
(panic+0x8c/0x1e4)
[    4.676741] [<c04c0e74>] (panic+0x8c/0x1e4) from [<c00411fc>]
(do_exit+0x7bc/0x8c8)
[    4.684329] [<c00411fc>] (do_exit+0x7bc/0x8c8) from [<c0041370>]
(do_group_exit+0x3c/0xc4)
[    4.692516] [<c0041370>] (do_group_exit+0x3c/0xc4) from
[<c0041408>] (__wake_up_parent+0x0/0x18)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.