About DMA mem and IO Server
Taeung <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks Martin :-) Referencing website link which you give me , I'm trying to secure Ethernet on L4Linux. I've got eth0 and configure ip address, netmask , etc. But if I do 'ping 8.8.8.8' for test, error occur such as 'Error connecting: Network is unreachable'. I suspect that the problem is about DMA mem. As below , there is 'WARNING: phys mmio resource allocation failed' log message.. What is the problem ? May this problem be the reason why network is unreachable ? ======================== ..(omitted).. IO | Io service IO | Verboseness level: 4 IO | unused physical memory space: IO | [00000001000000-0000000fffffff] IO | [00000050000000-000000ffffffff] IO | Loading: config 'rom/imx6q.io' *IO | WARNING: phys mmio resource allocation failed** **IO | <0x1bf18>IOMEM [00000010426000-000000104a5fff 80000] non-pref (32bit) (align=7ffff flags=c002)** **IO | WARNING: phys mmio resource allocation failed** **IO | <0x1bf18>IOMEM [00000010426000-000000104a5fff 80000] non-pref (32bit) (align=7ffff flags=c002)* IO | P6Device: l4linux "" IO | P6Device: (noname) "L40009" IO | P6Device: imx6q-fec.dev0 "imx6q-fec.0" IO | <0x14678> IOMEM [00000002188000-0000000218bfff 4000] non-pref (32bit) (align=3fff flags=4002) IO | <0x1be28> IRQ [00000000000096-00000000000096 1] none (32bit) (align=0 flags=4001) IO | P6Device: dmamem "dmamem" IO | <0x1bf18> IOMEM [00000010426000-000000104a5fff 80000] non-pref (32bit) (align=7ffff flags=c002) ..(omitted).. ======================== I'd appreciate whoever give me hints. - Taeung - On 05/10/2014 06:39 PM, Martin Schröder wrote: > Hi Taeung, > this DMAMEM block is mandatory for devices writing/reading directly > into/from RAM. > > Maybe you'll have a look into another board patchset: > http://fooprotected.wordpress.com/2012/04/12/l4linux-patch-for-mv643xx-ethernet/ > > > and also here: > https://github.com/Ksys-labs/L4Reap/blob/master/files/gumstix-fb-l4l.io > > > > Best regards, > Martin > > > Am 09.05.2014 19:34, TaeWoong Song schrieb: >> Thanks for your advice ,Martin !! >> >> I understand what you mean. >> So, I'm modify source code according to imx6's single Ethernet. >> >> Up to now, FEC Ethernet Driver has been initialized and eth0 has been >> secured in L4Linux. >> But I didn't succeed it yet. >> >> Do I have to need to get DMAMEM ? >> Or, is it fine that I omit DMAMEM ? >> >> However, your patch has been being very helpful to me. >> I'll continue securing Ethernet in L4 Linux. >> >> - Taeung - >> >> On May 9, 2014, at 10:12 PM, Martin Schröder <[email protected]> wrote: >> >>> Just a short addidion: >>> I just had a short look into the freescale spec: The i.MX6 you are >>> using has only a single Ethernet, my i.MX28 has dual Ethernet. So >>> you can skip everything I wrote abot the second PHY connected to the >>> MDIO bus of the first FEC. And you can also remove all lines related >>> to the Dummy-PHY (your Question 5) and turn CONFIG_FIXED_PHY off. >>> >>> Best regards, >>> Martin >>> >>> >>> Gesendet: Mittwoch, 07. Mai 2014 um 16:57 Uhr >>> Von: "Martin Schröder" <[email protected]> >>> An: Taeung <[email protected]> >>> Betreff: Re: May I ask you questions about your path? >>> Am 07.05.2014 16:08, schrieb Taeung:> Hi, Martin :-) >>>> >>>> Sorry, I take up your time. >>> >>> no problem :-) >>> >>>> May I ask you questions about your path? >>>> >>>> Question 1. In 'imx28.io' file , what mean 'DMAMEM' and 'new-res >>>> Mmio_ram()' ? >>>> >>>> I know that 'Mmio()' need arguments which are start and end address. >>>> But, I don't know 'Mmio_ram()'. >>> >>> I already answered your question on the list :-) >>> >>> you'll find also another reference in the list-archive: >>> >>> <[email protected]> >>> Am 17.11.2011 21:41, schrieb Adam Lackorzynski:> On Thu Nov 17, 2011 >>> at 12:49:31 +0400, Sartakov A. Vasily wrote: >>>>> So.. >>>>> usb host via ehci uses dma and i have problem in >>>>> pool_alloc_page(mm/dmapool.c): >>>>> dma_alloc_coherent (arhc/l4/mm/) returns 0, cos l4x_dma_mem_alloc >>>>> returns 0 too. >>>> >>>> I guess you need to put some 'dmamem' onto your vbus: >>>> >>>> DMAMEM => new Device() >>>> { >>>> .hid = "dmamem"; >>>> new-res Mmio_ram(<size-in-bytes>, 0); >>>> } >>>> >>>> >>>> >>>> Adam >>>> >>> >>>> Question 2. What is namespace 'shmns' ? >>>> >>>> local shmns = loader:create_namespace({shmns = "shmns"}); (line 69) >>>> shmns = shmns:mode("rw"), (line 89) >>>> >>> >>> I am using the l4shmnet network driver to connect two l4linux >>> instances by a virtual network. This driver is based on shared >>> memory, which I assign to both instaces. You'll see the other >>> reference in the linux kernel command lines where this >>> l4shmnet.add=shmns.add=shmns,maxpart=0x12/0x14 is added. >>> >>> >>>> Question 3. In fec_main.c , '#define clk_get_rate(x) 151000000' (line >>>> 312, 349) >>>> How do you know '151000000' ? >>>> Do you found in imx28 data sheet or other document ? >>> >>> I calculated it backwards. In fec_main.c you'll find "Seet MII speed >>> to 2.5 Mhz (= clk_get_rate() / 2 * phy speed)". So I grabbed the >>> divisor (read out the memory in U-Boot) and multiplied it >>> accordingly to get those 2.5 Mhz. But you could also insert some >>> kdebug("%d\n",clk_get_rate()), compile for a native linux and insert >>> this value instead :-) >>> >>>> Question 4. At line 323, why every variables is NULL ? >>> I have no L4-support for the clocing distribution (not within the >>> address space of the fec chip). So clocking the fec is done in U-Boot >>> >>>> Question 5. At line 260, what mean '.link' and '.speed', .duplex ? >>> I set up a virtual "dummy" phy on the second FEC device if this is >>> in another L4 than the first FEC. So this phy should always report >>> "link up", "100 MBit/s" and "full duplex" to the ethernet driver. >>> >>> >>> Martin >>> >> > _______________________________________________ l4-hackers mailing list [email protected] http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers