Add network device to L4Linux

Yiyang Su suyiyang at hotmail.com
Fri Oct 27 11:08:31 CEST 2017


Hi,


> This typically indicates that the io configuration does not list that
> device because the largest interrupt number listed there is smaller than
> 0x75 (= 85 + 32). Might that be the case?


Yes, it is. I change the Res.irq(85) to Res.irq(117), then the error is gone.

Would you mind explain a little, why the irq nummber from device tree

file (.dts) should be added 32 in .devs file?


Ehternet access is ongoing.


Regards,

Yang

________________________________
From: l4-hackers <l4-hackers-bounces at os.inf.tu-dresden.de> on behalf of Adam Lackorzynski <adam at os.inf.tu-dresden.de>
Sent: 05 October 2017 00:34
To: l4-hackers at os.inf.tu-dresden.de
Subject: Re: Add network device to L4Linux

Hi,

On Wed Sep 27, 2017 at 17:13:10 +0000, Yiyang Su wrote:
> I created a new device tree based on the simple.dts file and the L4Linux could be booted.
>
> But there is no progress with adding network device.
>
>
> One problem is hwirq is too large for L4-icu such as:
>
>     WARNING: CPU: 0 PID: 6 at /home/yiyang/Workplace/Microkernel/l4re/src/l4linux/kernel/irq/irqdomain.c:342 irq_domain_associate+0x13c/0x1c8
>     error: hwirq 0x75 is too large for L4-icu

This typically indicates that the io configuration does not list that
device because the largest interrupt number listed there is smaller than
0x75 (= 85 + 32). Might that be the case?


>     Modules linked in:
>     CPU: 0 PID: 6 Comm: kworker/u2:0 Tainted: G        W       4.7.0-l4 #9
>     Hardware name: L4Linux (DT)
>
> Another problem is: sun7i-dwmac 1c50000.ethernet: could not get tx clock
> This problem may be explained by the comment in l4linux/arch/arm/boot/dts/sun7i-a20.dtsi line 611 such as:
> """
>   The following two are dummy clocks, placeholders used in the gmac_tx clock. The gmac driver will choose one parent
>   depending on the PHY interface mode, using clk_set_rate auto-reparenting. The actual TX clock rate is not controlled
>   by the gmac_tx clock.
> """
> Any suggestion is very appreciated.

Same as indicated in the other mail. By any chance does the way via
u-boot work?

Adam

>
>
> ----------  new dts file start -----------
>
> /*
>  * Basic DT for L4Linux.
>  */
>
> /dts-v1/;
>
> / {
>     interrupt-parent = <&intc>;
>
>     model = "L4Linux (DT)";
>     compatible = "L4Linux";
>
>     #address-cells = <1>;
>     #size-cells = <1>;
>     chosen { };
>     aliases {
>         ethernet0 = &gmac;
>     };
>
>     intc: l4icu {
>         compatible = "l4,icu";
>         interrupt-controller;
>         /* type can be 'gic' or 'single' currently */
>         l4icu-type = "gic";
>         #interrupt-cells = <3>;
>         /*
>         l4icu-type = "single";
>         #interrupt-cells = <1>;
>         */
>     };
>
>     clocks {
>         #address-cells = <1>;
>         #size-cells = <1>;
>         ranges;
>
>         osc24M: clk at 01c20050 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun4i-a10-osc-clk";
>             reg = <0x01c20050 0x4>;
>             clock-frequency = <24000000>;
>             clock-output-names = "osc24M";
>         };
>
>         osc32k: clk at 0 {
>             #clock-cells = <0>;
>             compatible = "fixed-clock";
>             clock-frequency = <32768>;
>             clock-output-names = "osc32k";
>         };
>
>         pll1: clk at 01c20000 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun4i-a10-pll1-clk";
>             reg = <0x01c20000 0x4>;
>             clocks = <&osc24M>;
>             clock-output-names = "pll1";
>         };
>
>         pll6: clk at 01c20028 {
>             #clock-cells = <1>;
>             compatible = "allwinner,sun4i-a10-pll6-clk";
>             reg = <0x01c20028 0x4>;
>             clocks = <&osc24M>;
>             clock-output-names = "pll6_sata", "pll6_other", "pll6",
>                          "pll6_div_4";
>         };
>
>         cpu: cpu at 01c20054 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun4i-a10-cpu-clk";
>             reg = <0x01c20054 0x4>;
>             clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6 1>;
>             clock-output-names = "cpu";
>         };
>
>         axi: axi at 01c20054 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun4i-a10-axi-clk";
>             reg = <0x01c20054 0x4>;
>             clocks = <&cpu>;
>             clock-output-names = "axi";
>         };
>
>         ahb: ahb at 01c20054 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun5i-a13-ahb-clk";
>             reg = <0x01c20054 0x4>;
>             clocks = <&axi>, <&pll6 3>, <&pll6 1>;
>             clock-output-names = "ahb";
>             /*
>              * Use PLL6 as parent, instead of CPU/AXI
>              * which has rate changes due to cpufreq
>              */
>             assigned-clocks = <&ahb>;
>             assigned-clock-parents = <&pll6 3>;
>         };
>
>         ahb_gates: clk at 01c20060 {
>             #clock-cells = <1>;
>             compatible = "allwinner,sun7i-a20-ahb-gates-clk";
>             reg = <0x01c20060 0x8>;
>             clocks = <&ahb>;
>             clock-indices = <0>, <1>,
>                     <2>, <3>, <4>,
>                     <5>, <6>, <7>, <8>,
>                     <9>, <10>, <11>, <12>,
>                     <13>, <14>, <16>,
>                     <17>, <18>, <20>, <21>,
>                     <22>, <23>, <25>,
>                     <28>, <32>, <33>, <34>,
>                     <35>, <36>, <37>, <40>,
>                     <41>, <42>, <43>,
>                     <44>, <45>, <46>,
>                     <47>, <49>, <50>,
>                     <52>;
>             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 at 01c20054 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun4i-a10-apb0-clk";
>             reg = <0x01c20054 0x4>;
>             clocks = <&ahb>;
>             clock-output-names = "apb0";
>         };
>
>         apb0_gates: clk at 01c20068 {
>             #clock-cells = <1>;
>             compatible = "allwinner,sun7i-a20-apb0-gates-clk";
>             reg = <0x01c20068 0x4>;
>             clocks = <&apb0>;
>             clock-indices = <0>, <1>,
>                     <2>, <3>, <4>,
>                     <5>, <6>, <7>,
>                     <8>, <10>;
>             clock-output-names = "apb0_codec", "apb0_spdif",
>                 "apb0_ac97", "apb0_iis0", "apb0_iis1",
>                 "apb0_pio", "apb0_ir0", "apb0_ir1",
>                 "apb0_iis2", "apb0_keypad";
>         };
>
>         /*
>          * The following two are dummy clocks, placeholders
>          * used in the gmac_tx clock. The gmac driver will
>          * choose one parent depending on the PHY interface
>          * mode, using clk_set_rate auto-reparenting.
>          *
>          * The actual TX clock rate is not controlled by the
>          * gmac_tx clock.
>          */
>         mii_phy_tx_clk: clk at 2 {
>             #clock-cells = <0>;
>             compatible = "fixed-clock";
>             clock-frequency = <25000000>;
>             clock-output-names = "mii_phy_tx";
>         };
>
>         gmac_int_tx_clk: clk at 3 {
>             #clock-cells = <0>;
>             compatible = "fixed-clock";
>             clock-frequency = <125000000>;
>             clock-output-names = "gmac_int_tx";
>         };
>
>         gmac_tx_clk: clk at 01c20164 {
>             #clock-cells = <0>;
>             compatible = "allwinner,sun7i-a20-gmac-clk";
>             reg = <0x01c20164 0x4>;
>             clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>;
>             clock-output-names = "gmac_tx";
>         };
>     };
>
>     soc at 01c00000 {
>         compatible = "simple-bus";
>         #address-cells = <1>;
>         #size-cells = <1>;
>         ranges;
>
>         pio: pinctrl at 01c20800 {
>             compatible = "allwinner,sun7i-a20-pinctrl";
>             reg = <0x01c20800 0x400>;
>
>             /**
>              * l4linux/include/dt-bindings/interrupt-controller/arm-gic.h
>              * #define GIC_SPI 0
>              * l4linux/include/dt-bindings/interrupt-controller/irq.h
>              * #define IRQ_TYPE_LEVEL_HIGH    4
>              */
>             //interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
>             interrupts = <0 28 4>;
>
>             clocks = <&apb0_gates 5>;
>             gpio-controller;
>             interrupt-controller;
>             #interrupt-cells = <3>;
>             #gpio-cells = <3>;
>
>             gmac_pins_rgmii_a: gmac_rgmii at 0 {
>                 allwinner,pins = "PA0", "PA1", "PA2",
>                         "PA3", "PA4", "PA5", "PA6",
>                         "PA7", "PA8", "PA10",
>                         "PA11", "PA12", "PA13",
>                         "PA15", "PA16";
>                 allwinner,function = "gmac";
>                 /*
>                  * data lines in RGMII mode use DDR mode
>                  * and need a higher signal drive strength
>                  */
>
>                 /**
>                  * l4linux/include/dt-bindings/pinctrl/sun4i-a10.h
>                  * #define SUN4I_PINCTRL_40_MA 3
>                  * #define SUN4I_PINCTRL_NO_PULL 0
>                  */
>                 //allwinner,drive = <SUN4I_PINCTRL_40_MA>;
>                 //allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>                 allwinner,drive = <3>;
>                 allwinner,pull = <0>;
>             };
>         };
>
>         gmac: ethernet at 01c50000 {
>             compatible = "allwinner,sun7i-a20-gmac";
>             reg = <0x01c50000 0x10000>;
>
>             /**
>              * l4linux/include/dt-bindings/interrupt-controller/arm-gic.h
>              * #define GIC_SPI 0
>              * l4linux/include/dt-bindings/interrupt-controller/irq.h
>              * #define IRQ_TYPE_LEVEL_HIGH    4
>              */
>             //interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
>             interrupts = <0 85 4>;
>             interrupt-names = "macirq";
>             clocks = <&ahb_gates 49>, <&gmac_tx_clk>;
>             clock-names = "stmmaceth", "allwinner_gmac_tx";
>             snps,pbl = <2>;
>             snps,fixed-burst;
>             snps,force_sf_dma_mode;
>             #address-cells = <1>;
>             #size-cells = <0>;
>
>             /**
>              * following refer to sun7i-a20-cubietruck.dts at &gmac
>              */
>             pinctrl-names = "default";
>             pinctrl-0 = <&gmac_pins_rgmii_a>;
>             phy = <&phy1>;
>             phy-mode = "rgmii";
>             status = "okay";
>
>             phy1: ethernet-phy at 1 {
>                 reg = <1>;
>             };
>         };
>     };
> };
>
>
> ----------  new dts file end  -----------
>
>
> ----------  boot log start  ----------
>
> L4 Bootstrapper
>   Build: #23 Mi 27. Sep 18:01:17 CEST 2017, 5.4.1 20170404
>   Scanning up to 1024 MB RAM, starting at offset 32MB
>   Memory size is 1024MB (40000000 - 7fffffff)
>   RAM: 0000000040000000 - 000000007fffffff: 1048576kB
>   Total RAM: 1024MB
>   Scanning fiasco
>   Scanning sigma0
>   Scanning moe
>   Moving up to 12 modules behind 41100000
>   moving module 02 { 41a1b000-41a4c4ab } -> { 41b0b000-41b3c4ab } [201900]
>   moving module 01 { 41a09000-41a1a33f } -> { 41af9000-41b0a33f } [70464]
>   moving module 00 { 41986000-41a08b9b } -> { 41a76000-41af8b9b } [535452]
>   moving module 11 { 41686000-41985fff } -> { 41776000-41a75fff } [3145728]
>   moving module 10 { 41244000-41685487 } -> { 41334000-41775487 } [4461704]
>   moving module 09 { 41243000-412430fa } -> { 41333000-413330fa } [251]
>   moving module 08 { 41242000-41242363 } -> { 41332000-41332363 } [868]
>   moving module 07 { 41241000-4124139d } -> { 41331000-4133139d } [926]
>   moving module 06 { 4123f000-4124023d } -> { 4132f000-4133023d } [4670]
>   moving module 05 { 41094000-4123e8e7 } -> { 41184000-4132e8e7 } [1747176]
>   moving module 04 { 41032000-410936b3 } -> { 41122000-411836b3 } [399028]
>   moving module 03 { 41010000-4103146f } -> { 41100000-4112146f } [136304]
>   Loading fiasco
>   Loading sigma0
>   Loading moe
>   find kernel info page...
>   found kernel info page (via ELF) at 40002000
> Regions of list 'regions'
>     [ 40000000,  400001c3] {      1c4} Root   mbi_rt
>     [ 40001000,  40001a7f] {      a80} Kern   fiasco
>     [ 40002000,  40092fff] {    91000} Kern   fiasco
>     [ 400c0000,  400ca3e7] {     a3e8} Sigma0 sigma0
>     [ 400d0000,  400d6177] {     6178} Sigma0 sigma0
>     [ 40140000,  4016eb7b] {    2eb7c} Root   moe
>     [ 40170000,  4017661b] {     661c} Root   moe
>     [ 41000000,  4100f5cb] {     f5cc} Boot   bootstrap
>     [ 41100000,  41a75fff] {   976000} Root   Module
>   found kernel options (via ELF) at 40003000
>   API Version: (87) experimental
>   Sigma0 config    ip:400c0100 sp:00000000
>   Roottask config  ip:40140210 sp:00000000
>   Starting kernel fiasco at 400011bc
>   Non-HYP kernel detected but running in HYP mode, switching back.
> Hello from Startup::stage2
> Number of IRQs available at this GIC: 160
> FPU: Initialize
> FPU0: Subarch: 2, Part: 30, Rev: 4, Var: 7, Impl: 41
> ARM generic timer: freq=24000000 interval=24000 cnt=213224466
> SERIAL ESC: allocated IRQ 33 for serial uart
> Not using serial hack in slow timer handler.
> Welcome to L4/Fiasco.OC!
> L4/Fiasco.OC microkernel on arm
> Rev: unknown compiled with gcc 5.4.1 20170404 for Allwinner A20    []
> Build: #5 Thu Sep 21 16:27:20 CEST 2017
>
> Calibrating timer loop... done.
> MDB: use page size: 20
> MDB: use page size: 12
> SIGMA0: Hello!
>   KIP @ 40002000
>   allocated 4KB for maintenance structures
> SIGMA0: Dump of all resource maps
> RAM:------------------------
> [4:40000000;40000fff]
> [0:40093000;400bffff]
> [0:400cb000;400cffff]
> [0:400d7000;4013ffff]
> [4:40140000;4016efff]
> [0:4016f000;4016ffff]
> [4:40170000;40176fff]
> [0:40177000;410fffff]
> [4:41100000;41a75fff]
> [0:41a76000;7effffff]
> IOMEM:----------------------
> [0:0;3fffffff]
> [0:80000000;ffffffff]
> mmap() called: unimplemented!
> MOE: Hello world
> MOE: found 1021628 KByte free memory
> MOE: found RAM from 40000000 to 7f000000
> MOE: allocated 1008 KByte for the page array @0x40177000
> MOE: virtual user address space [0-bfffffff]
> MOE: rom name space cap -> [C:103000]
>   BOOTFS: [41100000-41121470] [C:105000] l4re
>   BOOTFS: [41122000-411836b4] [C:107000] ned
>   BOOTFS: [41184000-4132e8e8] [C:109000] io
>   BOOTFS: [4132f000-4133023e] [C:10b000] cubietruck.dtb
>   BOOTFS: [41331000-4133139e] [C:10d000] l4lx-net-cubi.cfg
>   BOOTFS: [41332000-41332364] [C:10f000] l4lx-net-cubi.devs
>   BOOTFS: [41333000-413330fb] [C:111000] l4lx-net-cubi.io
>   BOOTFS: [41334000-41775488] [C:113000] vmlinuz
>   BOOTFS: [41776000-41a76000] [C:115000] ramdisk-arm.rd
> MOE: cmdline: moe rom/l4lx-net-cubi.cfg
> MOE: Starting: rom/ned rom/l4lx-net-cubi.cfg
> MOE: loading 'rom/ned'
> Ned says: Hi World!
> Ned: loading file: 'rom/l4lx-net-cubi.cfg'
> IO      | Io service
> IO      | Verboseness level: 4
> IO      | unused physical memory space:
> IO      |   [00000000000000-0000003fffffff]
> IO      |   [00000080000000-000000ffffffff]
> IO      | no 'iommu' capability found use CPU-phys for DMA
> IO      | Loading: config 'rom/l4lx-net-cubi.devs'
> IO      | warning: inconsistent fixed resource @ device: /System Bus/
> IO      |   : hid=sun7ia20gmac
> IO      |   DMADOM  [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
> IO      | Loading: config 'rom/l4lx-net-cubi.io'
> IO      | Real Hardware -----------------------------------
> IO      | System Bus: hid=
> IO      |   Resources: ==== start ====
> IO      |   DMADOM  [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
> IO      |   Resources: ===== end =====
> IO      |   NIC: hid=sun7ia20gmac
> IO      |     Clients: ===== start ====
> IO      |       NIC: [N2Vi9Proxy_devE]
> IO      |     Clients: ===== end ====
> IO      |     Resources: ==== start ====
> IO      |     IOMEM   [00000001c50000-00000001c5ffff 10000] non-pref (32bit) (align=ffff flags=2)
> IO      |     IRQ     [00000000000000-00000000000000 1] none (32bit) (align=0 flags=1)
> IO      |     IRQ     [00000000000055-00000000000055 1] none (32bit) (align=0 flags=1)
> IO      |     IRQ     [00000000000004-00000000000004 1] none (32bit) (align=0 flags=1)
> IO      |     DMADOM  [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
> IO      |     Resources: ===== end =====
> IO      | warning: could not register control interface at cap 'platform_ctl'
> IO      | Ready. Waiting for request.
> PH  0 offs=00010000 flags=rwx PH-type=0x1
>       virt=02000000 evirt=0249973c
>       phys=02000000 ephys=0249973c
>       f_sz=00410653 memsz=0049973c
> PH  1 offs=003cec78 flags=r-x PH-type=0x4
>       virt=023bec78 evirt=023bec9c
>       phys=023bec78 ephys=023bec9c
>       f_sz=00000024 memsz=00000024
> PH  2 offs=00000000 flags=rwx PH-type=0x6474e551
>       virt=00000000 evirt=00000000
>       phys=00000000 ephys=00000000
>       f_sz=00000000 memsz=00000000
> Starting binary at 0x2000330, argc=10 argv=0xafff4f7c *argv=0xb1007ff4 argv0=rom/vmlinuz
> External resolver is at 0xa80007f0
> ======> L4Linux starting... <========
> Linux version 4.7.0-l4 (yiyang at i85217) (gcc version 5.4.1 20170404 (Linaro GCC 5.4-2017.05) ) #9 Thu Sep 21 16:20:48 CEST 2017
> Binary name: rom/vmlinuz
>    This is an AEABI build.
> Linux kernel command line (9 args): mem=64M console=ttyLv0 earlyprintk=1 l4x_rd=rom/ramdisk-arm.rd root=1:0 rw ramdisk_size=4000 l4x_dtb=rom/cubietruck.dtb ip=192.168.0.16::192.168.0.1:255.255.255.0:l4box:eth0:on
> CPU mapping (l:p)[1]: 0:0
> Image: 02000000 - 02600000 [6144 KiB].
> Areas: Text:     02000000 - 023bec9c [3835kB]
>        RO-Data:  022ce000 - 023a9000 [876kB]
>        Data:     023e8000 - 0240bd80 [143kB]
>        Init:     023bf000 - 023e8000 [164kB]
>        BSS:      02410653 - 0249973c [548kB]
> Device scan:
>   Device: L4ICU
>   Device: NIC
>     MEM: 01c50000 - 01c5ffff
>     IRQ: 00000000 - 00000000
>     IRQ: 00000055 - 00000055
>     IRQ: 00000004 - 00000004
>     DMAD: 00000000 - 00000000
> Device scan done.
> l4lx_thread_create: Created thread 41e (cpu0) (u:b3000e00, v:b3000c00, sp:023e9fa4)
> main thread will be 41e
> L4x: section-with-init(-data): Virt: 0x2000000 to 0x2499fff [4712 KiB]
> section-with-init(-data): Phys: 0x40273000 to 0x4070cfff, [4712 KiB]
> L4x: section-with-init-text: Virt: 0x2000000 to 0x2499fff [4712 KiB]
> error: failed to get physical address for 2000000.
> L4x: Main thread running, waiting...
> L4x: Memory size: 64MB
> L4x: Setting superpages for main memory
> L4x: Adjusted memory start: 02000000
> L4x:     Main memory: Virt: 0x2600000 to 0x65fffff [65536 KiB]
>     Main memory: Phys: 0x41c00000 to 0x45bfffff, [65536 KiB]
> l4x: vmalloc area: 06600000 - 0e600000
> L4x:            text: Virt: 0x2000000 to 0x2499fff [4712 KiB]
> error: failed to get physical address for 2000000.
> Booting Linux on physical CPU 0x0
> Linux version 4.7.0-l4 (yiyang at i85217) (gcc version 5.4.1 20170404 (Linaro GCC 5.4-2017.05) ) #9 Thu Sep 21 16:20:48 CEST 2017
> DTB: virt=02600100 phys=41c00100
> CPU: Fiasco [410fc074] revision 4 (ARMv7), cr=00400000
> CPU: div instructions available: patching division code
> CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> Machine model: L4Linux (DT)
> bootconsole [earlykdb0] enabled
> Memory policy: Data cache writealloc
> CPU: All CPU(s) started in SVC mode.
> Loading: rom/ramdisk-arm.rd
> INITRD: Size of RAMdisk is 3072KiB
> INITRD: 00002000 - 00302000
> RAMdisk from 00002000 to 00302000 [3072KiB]
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 17717
> Kernel command line: mem=64M console=ttyLv0 earlyprintk=1 l4x_rd=rom/ramdisk-arm.rd root=1:0 rw ramdisk_size=4000 l4x_dtb=rom/cubietruck.dtb ip=192.168.0.16::192.168.0.1:255.255.255.0:l4box:eth0:on
> PID hash table entries: 512 (order: -1, 2048 bytes)
> Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
> Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
> Memory: 64752K/71684K available (2959K kernel code, 143K rwdata, 876K rodata, 164K init, 548K bss, 6932K reserved, 0K cma-reserved)
> Virtual kernel memory layout:
>     vector  : 0xbffff000 - 0xc0000000   (   4 kB)
>     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
>     vmalloc : 0x06600000 - 0x0e600000   ( 128 MB)
>     lowmem  : 0x00000000 - 0x06600000   ( 102 MB)
>     modules : 0x01010000 - 0x02000000   (  15 MB)
>       .text : 0x02000000 - 0x023bec9c   (3836 kB)
>       .init : 0x023bf000 - 0x023e8000   ( 164 kB)
>       .data : 0x023e8000 - 0x0240bd80   ( 144 kB)
>        .bss : 0x02410653 - 0x0249973c   ( 549 kB)
> NR_IRQS:282
> clocksource: l4kipclk: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
> l4timer: Using IRQ210
> l4lx_thread_create: Created thread 423 (timer0) (u:b3000a00, v:00000000, sp:02431fa0)
> sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
> Console: colour dummy device 80x30
> console [ttyLv0] enabled
> console [ttyLv0] enabled
> bootconsole [earlykdb0] disabled
> bootconsole [earlykdb0] disabled
> Calibrating delay loop... 1810.43 BogoMIPS (lpj=9052160)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
> CPU: Testing write buffer coherency: ok
> Setting up static identity map for 0x2000000 - 0x2000000
> VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
> clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> NET: Registered protocol family 16
> DMA: preallocated 256 KiB pool for atomic coherent allocations
> L4IRQ: set irq type of 60 to 4
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at /home/yiyang/Workplace/Microkernel/l4re/src/l4linux/kernel/irq/irqdomain.c:342 irq_domain_associate+0x13c/0x1c8
> error: hwirq 0x75 is too large for L4-icu
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-l4 #9
> Hardware name: L4Linux (DT)
> [<0200d5bc>] (unwind_backtrace) from [<02005a54>] (show_stack+0x10/0x14)
> [<02005a54>] (show_stack) from [<0201f8f4>] (__warn+0xe4/0xfc)
> [<0201f8f4>] (__warn) from [<0201f944>] (warn_slowpath_fmt+0x38/0x48)
> [<0201f944>] (warn_slowpath_fmt) from [<0204eca8>] (irq_domain_associate+0x13c/0x1c8)
> [<0204eca8>] (irq_domain_associate) from [<0204f260>] (irq_create_mapping+0x60/0xc4)
> [<0204f260>] (irq_create_mapping) from [<0204f3a0>] (irq_create_fwspec_mapping+0xdc/0x17c)
> [<0204f3a0>] (irq_create_fwspec_mapping) from [<0204f494>] (irq_create_of_mapping+0x54/0x5c)
> [<0204f494>] (irq_create_of_mapping) from [<0221b320>] (irq_of_parse_and_map+0x24/0x2c)
> [<0221b320>] (irq_of_parse_and_map) from [<0221b340>] (of_irq_to_resource+0x18/0xbc)
> [<0221b340>] (of_irq_to_resource) from [<0221b420>] (of_irq_to_resource_table+0x3c/0x54)
> [<0221b420>] (of_irq_to_resource_table) from [<02219104>] (of_device_alloc+0xf8/0x168)
> [<02219104>] (of_device_alloc) from [<022191cc>] (of_platform_device_create_pdata+0x58/0xdc)
> [<022191cc>] (of_platform_device_create_pdata) from [<02219348>] (of_platform_bus_create+0xec/0x378)
> [<02219348>] (of_platform_bus_create) from [<022193a4>] (of_platform_bus_create+0x148/0x378)
> [<022193a4>] (of_platform_bus_create) from [<02219704>] (of_platform_populate+0x5c/0xc0)
> [<02219704>] (of_platform_populate) from [<023c340c>] (customize_machine+0x20/0x40)
> [<023c340c>] (customize_machine) from [<02000494>] (do_one_initcall+0x44/0x174)
> [<02000494>] (do_one_initcall) from [<023bf9f8>] (kernel_init_freeable+0x130/0x1c0)
> [<023bf9f8>] (kernel_init_freeable) from [<022c6684>] (kernel_init+0xc/0xec)
> [<022c6684>] (kernel_init) from [<020080c0>] (ret_from_fork+0x14/0x20)
> [<020080c0>] (ret_from_fork) from [<00000000>] (  (null))
> ---[ end trace 3e08f811161fcc2c ]---
> Failed to create "l4x" debugfs directory: 1
> pps_core: LinuxPPS API ver. 1 registered
> pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti at linux.it>
> PTP clock support registered
> l4vbus: is running
> L4IRQ: set irq type of 212 to 1
> l4vbus-root :l4vbus-root:0: added vbus root driver
> clocksource: Switched to clocksource l4kipclk
> NET: Registered protocol family 2
> TCP established hash table entries: 1024 (order: 0, 4096 bytes)
> TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> TCP: Hash tables configured (established 1024 bind 1024)
> UDP hash table entries: 256 (order: 0, 4096 bytes)
> UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
> NET: Registered protocol family 1
> Trying to unpack rootfs image as initramfs...
> rootfs image is not initramfs (junk in compressed archive); looks like an initrd
> INITRD: Freeing memory.
> l4x: Checks passed.
> NetWinder Floating Point Emulator V0.97 (double precision)
> futex hash table entries: 256 (order: -1, 3072 bytes)
> workingset: timestamp_bits=29 max_order=14 bucket_order=0
> io scheduler noop registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> l4fb.0: looking for capability 'fb' as goos session
> l4fb.0: init failed err=-2
> could not allocate fb device: fb
> L4 serial driver
> serial-ttyLv.0: ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4-vcon
> l4ser_shm: L4 shared mem serial driver
> l4cdds: No name given, not starting.
> brd: module loaded
> l4bdds: No name given, not starting.
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at /home/yiyang/Workplace/Microkernel/l4re/src/l4linux/kernel/irq/irqdomain.c:342 irq_domain_associate+0x13c/0x1c8
> error: hwirq 0x75 is too large for L4-icu
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.7.0-l4 #9
> Hardware name: L4Linux (DT)
> [<0200d5bc>] (unwind_backtrace) from [<02005a54>] (show_stack+0x10/0x14)
> [<02005a54>] (show_stack) from [<0201f8f4>] (__warn+0xe4/0xfc)
> [<0201f8f4>] (__warn) from [<0201f944>] (warn_slowpath_fmt+0x38/0x48)
> [<0201f944>] (warn_slowpath_fmt) from [<0204eca8>] (irq_domain_associate+0x13c/0x1c8)
> [<0204eca8>] (irq_domain_associate) from [<0204f260>] (irq_create_mapping+0x60/0xc4)
> [<0204f260>] (irq_create_mapping) from [<0204f3a0>] (irq_create_fwspec_mapping+0xdc/0x17c)
> [<0204f3a0>] (irq_create_fwspec_mapping) from [<0204f494>] (irq_create_of_mapping+0x54/0x5c)
> [<0204f494>] (irq_create_of_mapping) from [<0221b490>] (of_irq_get+0x58/0x68)
> [<0221b490>] (of_irq_get) from [<021ddc98>] (platform_get_irq_byname+0x1c/0x58)
> [<021ddc98>] (platform_get_irq_byname) from [<022007b4>] (stmmac_get_platform_resources+0x28/0xdc)
> [<022007b4>] (stmmac_get_platform_resources) from [<022009ec>] (sun7i_gmac_probe+0x14/0x138)
> [<022009ec>] (sun7i_gmac_probe) from [<021dd884>] (platform_drv_probe+0x4c/0xb0)
> [<021dd884>] (platform_drv_probe) from [<021dc0ac>] (driver_probe_device+0x224/0x2b4)
> [<021dc0ac>] (driver_probe_device) from [<021dc1f4>] (__driver_attach+0xb8/0xbc)
> [<021dc1f4>] (__driver_attach) from [<021da3f0>] (bus_for_each_dev+0x68/0x9c)
> [<021da3f0>] (bus_for_each_dev) from [<021db534>] (bus_add_driver+0x1a0/0x218)
> [<021db534>] (bus_add_driver) from [<021dc8e8>] (driver_register+0x78/0xf8)
> [<021dc8e8>] (driver_register) from [<02000494>] (do_one_initcall+0x44/0x174)
> [<02000494>] (do_one_initcall) from [<023bf9f8>] (kernel_init_freeable+0x130/0x1c0)
> [<023bf9f8>] (kernel_init_freeable) from [<022c6684>] (kernel_init+0xc/0xec)
> [<022c6684>] (kernel_init) from [<020080c0>] (ret_from_fork+0x14/0x20)
> [<020080c0>] (ret_from_fork) from [<00000000>] (  (null))
> ---[ end trace 3e08f811161fcc2d ]---
> IO      | new iomem region: p=1c00000 v=400000 s=400000 (bmb=0x27628)
> __l4x_ioremap: Mapping physaddr 01c50000 [0x10000 Bytes, 01c50000+010000] to 00002000+000000
> sun7i-dwmac 1c50000.ethernet: could not get tx clock
> mousedev: PS/2 mouse device common for all mice
> NET: Registered protocol family 17
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 6 at /home/yiyang/Workplace/Microkernel/l4re/src/l4linux/kernel/irq/irqdomain.c:342 irq_domain_associate+0x13c/0x1c8
> error: hwirq 0x75 is too large for L4-icu
> Modules linked in:
> CPU: 0 PID: 6 Comm: kworker/u2:0 Tainted: G        W       4.7.0-l4 #9
> Hardware name: L4Linux (DT)
> Workqueue: deferwq deferred_probe_work_func
> [<0200d5bc>] (unwind_backtrace) from [<02005a54>] (show_stack+0x10/0x14)
> [<02005a54>] (show_stack) from [<0201f8f4>] (__warn+0xe4/0xfc)
> [<0201f8f4>] (__warn) from [<0201f944>] (warn_slowpath_fmt+0x38/0x48)
> [<0201f944>] (warn_slowpath_fmt) from [<0204eca8>] (irq_domain_associate+0x13c/0x1c8)
> [<0204eca8>] (irq_domain_associate) from [<0204f260>] (irq_create_mapping+0x60/0xc4)
> [<0204f260>] (irq_create_mapping) from [<0204f3a0>] (irq_create_fwspec_mapping+0xdc/0x17c)
> [<0204f3a0>] (irq_create_fwspec_mapping) from [<0204f494>] (irq_create_of_mapping+0x54/0x5c)
> [<0204f494>] (irq_create_of_mapping) from [<0221b490>] (of_irq_get+0x58/0x68)
> [<0221b490>] (of_irq_get) from [<021ddc98>] (platform_get_irq_byname+0x1c/0x58)
> [<021ddc98>] (platform_get_irq_byname) from [<022007b4>] (stmmac_get_platform_resources+0x28/0xdc)
> [<022007b4>] (stmmac_get_platform_resources) from [<022009ec>] (sun7i_gmac_probe+0x14/0x138)
> [<022009ec>] (sun7i_gmac_probe) from [<021dd884>] (platform_drv_probe+0x4c/0xb0)
> [<021dd884>] (platform_drv_probe) from [<021dc0ac>] (driver_probe_device+0x224/0x2b4)
> [<021dc0ac>] (driver_probe_device) from [<021da498>] (bus_for_each_drv+0x60/0x94)
> [<021da498>] (bus_for_each_drv) from [<021dbda8>] (__device_attach+0xb0/0x114)
> [<021dbda8>] (__device_attach) from [<021db288>] (bus_probe_device+0x84/0x8c)
> [<021db288>] (bus_probe_device) from [<021db718>] (deferred_probe_work_func+0x68/0x94)
> [<021db718>] (deferred_probe_work_func) from [<02031a64>] (process_one_work+0x11c/0x3dc)
> [<02031a64>] (process_one_work) from [<02031d5c>] (worker_thread+0x38/0x548)
> [<02031d5c>] (worker_thread) from [<02036934>] (kthread+0xd4/0xec)
> [<02036934>] (kthread) from [<020080c0>] (ret_from_fork+0x14/0x20)
> [<020080c0>] (ret_from_fork) from [<00000000>] (  (null))
> ---[ end trace 3e08f811161fcc2f ]---
> __l4x_ioremap: Mapping physaddr 01c50000 [0x10000 Bytes, 01c50000+010000] to 00002000+000000
> sun7i-dwmac 1c50000.ethernet: could not get tx clock
> L4IRQ: set irq type of 211 to 1
> RAMDISK: ext2 filesystem found at block 0
> RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
> EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
> EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
> EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
> VFS: Mounted root (ext2 filesystem) on device 1:0.
> Freeing unused kernel memory: 164K (023bf000 - 023e8000)
> This architecture does not have kernel memory protection.
>
> Please press Enter to activate this console.
>
>
> ----------  boot log end  ----------
>
> ________________________________
> From: Manolis Ragkousis <manolis837 at gmail.com>
> Sent: 23 September 2017 10:12
> To: l4-hackers at os.inf.tu-dresden.de
> Cc: Yiyang Su
> Subject: Re: Add network device to L4Linux
>
> Hello everyone,
>
> Yesterday with Yang we found why adding the device tree caused the
> L4linux boot to fail on Cubietruck with "failed to get physical address
> for 2000000". I am sharing this here for future references in case
> anyone needs it.
>
> Yang was using the sun7i-a20-cubietruck.dts [1] device tree which is
> normally supposed to be used by Linux running on bare-metal arm. In
> L4Linux's case it's running on top of L4 which controls what L4linux can
> see. As a result of using sun7i-a20-cubietruck.dts it tries to map a
> physical address which it's not allowed to.
>
> Using what Matthias described in [2], one needs to create a new device
> tree based on the simple.dts inside l4linux-source/arch/l4/boot/dts/ and
> add the information about the ethernet device and its dependencies
> there. Also don't forget to write the io configuration for those devices.
>
> Another mail from Matthias which serves as a really nice explanation of
> the process is [3].
>
> Thank you,
> Manolis
>
> [1]
> http://elixir.free-electrons.com/u-boot/latest/source/arch/arm/dts/sun7i-a20-cubietruck.dts
u-boot/arch/arm/dts/sun7i-a20-cubietruck.dts - Elixir - Free Electrons<http://elixir.free-electrons.com/u-boot/latest/source/arch/arm/dts/sun7i-a20-cubietruck.dts>
elixir.free-electrons.com
Elixir Cross Referencer


> u-boot/arch/arm/dts/sun7i-a20-cubietruck.dts - Elixir - Free Electrons<http://elixir.free-electrons.com/u-boot/latest/source/arch/arm/dts/sun7i-a20-cubietruck.dts>
u-boot/arch/arm/dts/sun7i-a20-cubietruck.dts - Elixir - Free Electrons<http://elixir.free-electrons.com/u-boot/latest/source/arch/arm/dts/sun7i-a20-cubietruck.dts>
elixir.free-electrons.com
Elixir Cross Referencer


> elixir.free-electrons.com
> Elixir Cross Referencer
>
>
> [2] https://os.inf.tu-dresden.de/pipermail/l4-hackers/2016/007747.html
> [3] https://os.inf.tu-dresden.de/pipermail/l4-hackers/2017/008069.html

> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
l4-hackers Info Page - TU Dresden<http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers>
os.inf.tu-dresden.de
This list is intended for discussions about the L4 microkernel family and software running on top of L4. This is a public list, all content, including sender names ...



_______________________________________________
l4-hackers mailing list
l4-hackers at os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
l4-hackers Info Page - TU Dresden<http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers>
os.inf.tu-dresden.de
This list is intended for discussions about the L4 microkernel family and software running on top of L4. This is a public list, all content, including sender names ...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20171027/3150b30a/attachment.html>


More information about the l4-hackers mailing list