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

Re: [Xen-devel] Xen on (RELEASE-4.4.0) crashed when booting on Cubieboard2



>WhyÂdoÂyouÂcompileÂtheÂDTBÂintoÂXen?ÂIÂguessÂyouÂhaveÂhardcodedÂtheÂ
>chosenÂnode...ÂifÂsoÂcanÂyouÂpasteÂtheÂcontentÂhere?

We are worried about our memory layout when loading xen and dom0 kernel.
For simplicity, we compiled dtb into xen. Also we compiled ramdisk into kernel 
image for the same reason.

We will test the stand alone dtb load progress soon.

Many thanks.

duqi.
Here is our dts and dtsi files:

(1)sun7i-a20-xen.dtsi:
/*
 * Copyright 2013 Maxime Ripard
 *
 * Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/include/ "skeleton.dtsi"

/ {
        interrupt-parent = <&gic>;

        aliases {
                ehci1 = &ehci0;
                ehci2 = &ehci1;
        };

        cpus {
                #address-cells = <1>;
                #size-cells = <0>;

                cpu@0 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
                        reg = <0>;
                };

        };

        memory {
                reg = <0x40000000 0x40000000>;
        };

        clocks {
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;

                osc24M: osc24M@01c20050 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-osc-clk";
                        reg = <0x01c20050 0x4>;
                        clock-frequency = <24000000>;
                };

                osc32k: osc32k {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <32768>;
                };

                pll1: pll1@01c20000 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-pll1-clk";
                        reg = <0x01c20000 0x4>;
                        clocks = <&osc24M>;
                };

                pll4: pll4@01c20018 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-pll1-clk";
                        reg = <0x01c20018 0x4>;
                        clocks = <&osc24M>;
                };

                pll5: pll5@01c20020 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun4i-pll5-clk";
                        reg = <0x01c20020 0x4>;
                        clocks = <&osc24M>;
                        clock-output-names = "pll5_ddr", "pll5_other";
                };

                pll6: pll6@01c20028 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun4i-pll6-clk";
                        reg = <0x01c20028 0x4>;
                        clocks = <&osc24M>;
                        clock-output-names = "pll6_sata", "pll6_other", "pll6";
                };

                usb:usb@0x01c200cc {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun47i-usb-gates-clk";
                        reg = <0x01c200cc 0x4>;
                        clocks = <&pll6 1>;
                        clock-output-names = "phy0_reset", "phy1_reset", 
"phy2_reset", "usb_ohci0", "usb_ohci1", "usb_phy";
                };

                cpu: cpu@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-cpu-clk";
                        reg = <0x01c20054 0x4>;
                        clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6 1>;
                };

                axi: axi@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-axi-clk";
                        reg = <0x01c20054 0x4>;
                        clocks = <&cpu>;
                };

                ahb: ahb@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-ahb-clk";
                        reg = <0x01c20054 0x4>;
                        clocks = <&axi>;
                };

                ahb_gates: ahb_gates@01c20060 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun7i-a20-ahb-gates-clk";
                        reg = <0x01c20060 0x8>;
                        clocks = <&ahb>;
                        clock-output-names = "ahb_usb0", "ahb_ehci0",
                                "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
                                "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
                                "ahb_mmc1", "ahb_mmc2", "ahb_mmc3", "ahb_ms",
                                "ahb_nand", "ahb_sdram", "ahb_ace",
                                "ahb_emac", "ahb_ts", "ahb_spi0", "ahb_spi1",
                                "ahb_spi2", "ahb_spi3", "ahb_sata",
                                "ahb_hstimer", "ahb_ve", "ahb_tvd", "ahb_tve0",
                                "ahb_tve1", "ahb_lcd0", "ahb_lcd1", "ahb_csi0",
                                "ahb_csi1", "ahb_hdmi1", "ahb_hdmi0",
                                "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
                                "ahb_de_fe1", "ahb_gmac", "ahb_mp",
                                "ahb_mali";
                };

                apb0: apb0@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-apb0-clk";
                        reg = <0x01c20054 0x4>;
                        clocks = <&ahb>;
                };

                apb0_gates: apb0_gates@01c20068 {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun7i-a20-apb0-gates-clk";
                        reg = <0x01c20068 0x4>;
                        clocks = <&apb0>;
                        clock-output-names = "apb0_codec", "apb0_spdif",
                                "apb0_ac97", "apb0_iis0", "apb0_iis1",
                                "apb0_pio", "apb0_ir0", "apb0_ir1",
                                "apb0_iis2", "apb0_keypad";
                };

                apb1_mux: apb1_mux@01c20058 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-apb1-mux-clk";
                        reg = <0x01c20058 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
                };

                apb1:apb1@01c20058{
                        #clock-cells = <0>;
                        compatible="allwinner, sun4i-apb1-clk";
                        reg = <0x01c20058 0x4>;
                        clocks = <&apb1_mux>;
                };

                apb1_gates: apb1_gates@01c2006c {
                        #clock-cells = <1>;
                        compatible = "allwinner,sun7i-a20-apb1-gates-clk";
                        reg = <0x01c2006c 0x4>;
                        clocks = <&apb1>;
                        clock-output-names = "apb1_i2c0", "apb1_i2c1",
                                "apb1_i2c2", "apb1_i2c3", "apb1_can",
                                "apb1_scr", "apb1_ps20", "apb1_ps21",
                                "apb1_i2c4", "apb1_uart0", "apb1_uart1",
                                "apb1_uart2", "apb1_uart3", "apb1_uart4",
                                "apb1_uart5", "apb1_uart6", "apb1_uart7";
                };


                mmc0_clk: clk@01c20088 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c20088 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                        clock-output-names = "mmc0";
                };

                mmc1_clk: clk@01c2008c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c2008c 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                        clock-output-names = "mmc1";
                };

                mmc2_clk: clk@01c20090 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c20090 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                        clock-output-names = "mmc2";
                };

                mmc3_clk: clk@01c20094 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c20094 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                        clock-output-names = "mmc3";
                };

                spi0: spi0@01c200a0 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c200a0 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                };

                spi1: spi1@01c200a4 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c200a4 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                };

                spi2: spi2@01c200a8 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c200a8 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                };

                spi3: spi3@01c200d4 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-mod0-clk";
                        reg = <0x01c200d4 0x4>;
                        clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
                };




        };

        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>;
                #size-cells = <1>;
                ranges;

                emac: ethernet@01c0b000 {
                        compatible = "allwinner,sun4i-emac";
                        reg = <0x01c0b000 0x1000>;
                        interrupts = <0 55 1>;
                        clocks = <&ahb_gates 17>;
                        status = "disabled";
                };

                mdio@01c0b080 {
                        compatible = "allwinner,sun4i-mdio";
                        reg = <0x01c0b080 0x14>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                };

                mmc0: mmc@01c0f000 {
                        compatible = "allwinner,sun5i-mmc";
                        reg = <0x01c0f000 0x1000>;
                        clocks = <&ahb_gates 8>, <&mmc0_clk>;
                        clock-names = "ahb", "mod";
                        interrupts = <0 32 4>;
                        bus-width = <4>;
                        status = "disabled";
                };

                mmc3: mmc@01c12000 {
                        compatible = "allwinner,sun5i-mmc";
                        reg = <0x01c12000 0x1000>;
                        clocks = <&ahb_gates 11>, <&mmc3_clk>;
                        clock-names = "ahb", "mod";
                        interrupts = <0 35 4>;
                        bus-width = <4>;
                        status = "disabled";
                };

                pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun7i-a20-pinctrl";
                        reg = <0x01c20800 0x400>;
                        interrupts = <0 28 1>;
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;

                        uart0_pins_a: uart0@0 {
                                allwinner,pins = "PB22", "PB23";
                                allwinner,function = "uart0";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        uart6_pins_a: uart6@0 {
                                allwinner,pins = "PI12", "PI13";
                                allwinner,function = "uart6";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        uart7_pins_a: uart7@0 {
                                allwinner,pins = "PI20", "PI21";
                                allwinner,function = "uart7";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        emac_pins_a: emac0@0 {
                                allwinner,pins = "PA0", "PA1", "PA2",
                                                "PA3", "PA4", "PA5", "PA6",
                                                "PA7", "PA8", "PA9", "PA10",
                                                "PA11", "PA12", "PA13", "PA14",
                                                "PA15", "PA16";
                                allwinner,function = "emac";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        mmc0_pins_a: mmc0@0 {
                                allwinner,pins = 
"PF0","PF1","PF2","PF3","PF4","PF5";
                                allwinner,function = "mmc0";
                                allwinner,drive = <3>;
                                allwinner,pull = <0>;
                        };
                        
                        mmc0_cd_pin_reference_design: mmc0_cd_pin@0{
                                allwinner,pins = "PH1";
                                allwinner,function = "gpio_in";
                                allwinner,drive = <0>;
                                allwinner,pull = <1>;
                        };

                        mmc3_pins_a: mmc3@0 {
                                allwinner,pins = 
"PI4","PI5","PI6","PI7","PI8","PI9";
                                allwinner,function = "mmc3";
                                allwinner,drive = <3>;
                                allwinner,pull = <0>;
                        };
                };

                timer@01c20c00 {
                        compatible = "allwinner,sun4i-timer";
                        reg = <0x01c20c00 0x90>;
                        interrupts = <0 22 4>,
                                     <0 23 4>,
                                     <0 24 4>,
                                     <0 25 4>,
                                     <0 67 4>,
                                     <0 68 4>;
                        clocks = <&osc24M>;
                };

                wdt: watchdog@01c20c90 {
                        compatible = "allwinner,sun4i-wdt";
                        reg = <0x01c20c90 0x10>;
                };

                rtc: rtc@01c20d00 {
                        compatible = "allwinner,sun7i-a20-rtc";
                        reg = <0x01c20d00 0x20>;
                        interrupts = <0 24 1>;
                };

                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun7i-a20-sid";
                        reg = <0x01c23800 0x200>;
                };

                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
                        interrupts = <0 1 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 16>;
                        status = "disabled";
                };

                uart1: serial@01c28400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28400 0x400>;
                        interrupts = <0 2 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 17>;
                        status = "disabled";
                };

                uart2: serial@01c28800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28800 0x400>;
                        interrupts = <0 3 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 18>;
                        status = "disabled";
                };

                uart3: serial@01c28c00 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28c00 0x400>;
                        interrupts = <0 4 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 19>;
                        status = "disabled";
                };

                uart4: serial@01c29000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29000 0x400>;
                        interrupts = <0 17 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 20>;
                        status = "disabled";
                };

                uart5: serial@01c29400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29400 0x400>;
                        interrupts = <0 18 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 21>;
                        status = "disabled";
                };

                uart6: serial@01c29800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29800 0x400>;
                        interrupts = <0 19 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 22>;
                        status = "disabled";
                };

                uart7: serial@01c29c00 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29c00 0x400>;
                        interrupts = <0 20 1>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 23>;
                        status = "disabled";
                };

                hstimer@01c60000 {
                        compatible = "allwinner,sun7i-a20-hstimer";
                        reg = <0x01c60000 0x1000>;
                        interrupts = <0 81 1>,
                                     <0 82 1>,
                                     <0 83 1>,
                                     <0 84 1>;
                        clocks = <&ahb_gates 28>;
                };


                gic: interrupt-controller@01c81000 {
                        compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
                        reg = <0x01c81000 0x1000>,
                              <0x01c82000 0x1000>,
                              <0x01c84000 0x2000>,
                              <0x01c86000 0x2000>;
                        interrupt-controller;
                        #interrupt-cells = <3>;
                        interrupts = <1 9 0xf04>;
                };

                ehci0: ehci0@0x01c14000 {
                        compatible = "allwinner,sunxi-ehci";
                        reg = <0x01c14000 0x400 0x01c14800 0x4 0x01c13404 0x4>;
                        interrupts = <0 39 1>;
                        clocks = <&usb 8>, <&usb 1>, <&ahb_gates 1>;
                        clock-names = "usb_phy", "phy_reset", "ahb_ehci";
                        status = "disabled";
                };

                ehci1: ehci1@0x01c1c000 {
                        compatible = "allwinner,sunxi-ehci";
                        reg = <0x01c1c000 0x400 0x01c1c800 0x4 0x01c13404 0x4>;
                        interrupts = <0 40 1>;
                        clocks = <&usb 8>, <&usb 2>, <&ahb_gates 3>;
                        clock-names = "usb_phy", "phy_reset", "ahb_ehci";
                        status = "disabled";
                };
        };
};

(2)sun7i-a20-cubieboard2-xen.dts:
/*
 * Copyright 2013 Maxime Ripard
 *
 * Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/dts-v1/;
/include/ "sun7i-a20-xen.dtsi"

/ {
        model = "Cubietech Cubieboard2";
        compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
        
    chosen {
        bootargs = "dom0_mem=128M sync_console console=dtuart dtuart=serial0";
        xen,dom0-bootargs = "console=hvc0,115200n8 debug ignore_loglevel rw 
earlyprintk=xen clk_ignore_unused init=/init";
        modules {
            module@0 {
                compatible = "xen,linux-zimage", "xen,multiboot-module";
                reg = <0x7f600000 0xf00000>;
            };
            module@1 {
                compatible = "xen,linux-initrd", "xen,multiboot-module";
                reg = <0x60000000 0x6000000>;
                linux,initrd-start = <0x60000000>;
                linux,initrd-end = <0x66000000>;
            };
        };
    };

        hypervisor {
                compatible = "xen,xen-4.2", "xen,xen";
                reg = <0xb0000000 0x20000>;
                interrupts = <1 15 0xf08>;
        };

        aliases {
                serial0 = "/soc@01c00000/serial@01c28000";
        };


        soc@01c00000 {
                mmc0: mmc@01c0f000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&mmc0_pins_a>;
                        pinctrl-1 = <&mmc0_cd_pin_reference_design>;
                        cd-gpios = <&pio 7 1 0>; /* PH1 */
                        cd-mode = <1>;
                        status = "okay";
                };


                pinctrl@01c20800 {
                        ahci_pwr_pin: ahci_pwr_pin@0 {
                                allwinner,pins = "PB8";
                                allwinner,function = "gpio_out";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };


                        mmc0_cd_pin_cubieboard2: mmc0_cd_pin@0 {
                                allwinner,pins = "PH1";
                                allwinner,function = "gpio_in";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        led_pins_cubieboard2: led_pins@0 {
                                allwinner,pins = "PH20", "PH21";
                                allwinner,function = "gpio_out";
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };

                        usb1_vbus_pin: usb1_vbus_pin@0 {
                                        allwinner,pins = "PH6";
                                        allwinner,function = "gpio_out";
                                        allwinner,drive = <0>;
                                        allwinner,pull = <2>;
                        };

                        usb2_vbus_pin: usb2_vbus_pin@0 {
                                        allwinner,pins = "PH3";
                                        allwinner,function = "gpio_out";
                                        allwinner,drive = <0>;
                                        allwinner,pull = <2>;
                        };
                };

                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        status = "okay";
                };


                ehci0: ehci0@0x01c14000 {
                        vbus-supply = <&reg_usb1_vbus>;
                        status = "okay";
                };

                ehci1: ehci1@0x01c1c000 {
                        vbus-supply = <&reg_usb2_vbus>;
                        status = "okay";
                };

        };

        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
                pinctrl-0 = <&led_pins_cubieboard2>;

                blue {
                        label = "cubieboard2:blue:usr";
                        gpios = <&pio 7 21 0>;
                };

                green {
                        label = "cubieboard2:green:usr";
                        gpios = <&pio 7 20 0>;
                };
        };

        regulators {
                compatible = "simple-bus";
                pinctrl-names = "default";

                reg_ahci_5v: ahci-5v {
                        compatible = "regulator-fixed";
                        regulator-name = "ahci-5v";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        pinctrl-0 = <&ahci_pwr_pin>;
                        gpio = <&pio 1 8 0>;
                        enable-active-high;
                };


                reg_usb1_vbus: usb1-vbus {
                        compatible = "regulator-fixed";
                        pinctrl-names = "default";
                        pinctrl-0 = <&usb1_vbus_pin>;
                        regulator-name = "usb1-vbus";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        gpio = <&pio 7 6 0>;
                };

                reg_usb2_vbus: usb2-vbus {
                        compatible = "regulator-fixed";
                        pinctrl-names = "default";
                        pinctrl-0 = <&usb2_vbus_pin>;
                        regulator-name = "usb2-vbus";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        gpio = <&pio 7 3 0>;
                };
        };
};

_______________________________________________
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®.