fec_nic_drv runtime error in Genode 22.11

Pontus Åström ponast at gmail.com
Wed Dec 21 19:17:46 CET 2022


Hello Stefan,

I think I'm already doing as you recommend with respect to the devices ROM.

I have the following import in my runscript in case the target is evk:
if { [have_board imx8q_evk] } {
    import_from_depot                        \
        [depot_user]/src/fec_nic_drv         \
        [depot_user]/src/imx8mq_platform_drv \
        [depot_user]/src/imx8mq_usb_host_drv \
        [depot_user]/raw/imx8q_evk-devices   \
        [depot_user]/src/usb_net_drv         }

I have checked the depot devices file in raw/imx8q_evk-devices and it
is identical to the one you committed on nov 17.

My platform config looks as follows:
<start name="platform_drv" caps="300" managing_system="yes" priority="0">
    <binary name="imx8mq_platform_drv"/>
    <resource name="RAM" quantum="8M"/>
    <provides>
        <service name="Platform"/>
    </provides>
    <route>
        <any-service><parent/></any-service>
    </route>
    <config>
        <policy label="eth0_drv -> "><device name="fec"/></policy>
        <policy label="usb_drv -> " info="yes">
            <device name="usb_host_2"/>
            <device name="usb_phy_2"/>
        </policy>
    </config>
</start>

I think the policy for the eth0_drv will use the "fec" device from
your nov 17 commit. When I run my scenario I can see that a rom file
named "devices" is loaded, which I think is the correct one as I do
not have another devices file in the scenario. To me the error message
from my first mail seems to indicate that the Platform has read the
correct "devices" config but that for some reason the requested IO
resource at address 0x30be0000 (size=0x10000) is unavailable. What do
you think about that interpretation?

Best regards,
Pontus




On Wed, Dec 21, 2022 at 11:54 AM Stefan Kalkowski
<stefan.kalkowski at genode-labs.com> wrote:
>
> Hello Pontus,
>
> On Tue, Dec 20, 2022 at 08:29:28PM +0100, Pontus Åström wrote:
> > Now everything compiles successfully but I get a runtime setup error
> > where the driver complains about an unavailable IO resource:
> >
> > [init -> eth0_drv] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> > [init -> eth0_drv] clocksource: dde_counter: mask: 0xffffffffffffff
> > max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
> > [init -> eth0_drv] sched_clock: 64 bits at 1000kHz, resolution 1000ns,
> > wraps every 2199023255500ns
> > [init -> eth0_drv] clocksource: jiffies: mask: 0xffffffff max_cycles:
> > 0xffffffff, max_idle_ns: 7645041785100000 ns
> > [init -> eth0_drv] clocksource: Switched to clocksource dde_counter
> > [init -> eth0_drv] mdio_bus: Fixed MDIO Bus: probed
> > [init -> eth0_drv] Error: memory-mapped I/O resource 0x30be0000
> > (size=0x10000) unavailable
> >
> > What might be the cause of this error?
>
> Probably the problem can be found within the devices ROM delivered to
> the platform driver. Formerly, the old driver expected an I/O memory
> area of size 0x4000, but the updated FEC driver that uses the original
> device-tree information of the Linux kernel expects an I/O memory area
> of size 0x10000.
> Moreover, the new driver needs additional informations related to its
> clocks that is also incorporated into the devices information consumed
> by the platform driver. You can see the changes when looking at file
> changes of `board/imx8q_evk/devices` within the following commit:
>
>   https://github.com/genodelabs/genode-imx/commit/a7bdd5cbdce98371e22fc3ff1330d6ac6b29ef88#diff-55f6eed7689a6fc70ac3351355a89d5a894d24013b564afac05663b0c64f67d6
>
> To circumvent similar problems in the future, you can incorporate the
> mentioned devices file as boot ROM within your scenario, and provide
> it to the platform driver. Then you automatically profit from further
> updates of the devices descriptions and its interplay with our
> provided drivers.
>
> Best regards
> Stefan
>
> --
> Stefan Kalkowski
> Genode labs
>
> https://github.com/skalk | https://genode.org
>
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users



-- 
Hälsningar,

Pontus



More information about the users mailing list