Hi,

Thanks so much for your explanation.


Now the L4Linux has access to the network and SD card.


The problem was that in order to access these two device in Cubietruck, 
additional hardware devices must also be provided for L4Linux such as clock 
source, pin control (pinctrl), power management unit and direct memory access 
(dma) . To add the required drivers for all hardware devices i have modified 
some Kconfig and Makefile of L4Linux.


Furthermore at the moment Two L4Linux are running and can communicate each 
other via shmn. I would like to configure as that one L4Linux (call it L1 here) 
is only allowed to access network device and another one (L2) is only allowed 
to access SD card device. Now i am struggling how can i provide the right ".io" 
file for the vbus. First, L1 and L2 require their own devices such as

"""

Io.add_vbus("l4linux_1", Io.Vi.System_bus
{
    gmacclk = wrap(Hw.GMACTX);
    miiclk = wrap(Hw.MII);
    gmacint = wrap(Hw.GMACINT);
    ethernet = wrap(Hw.NIC);
})

Io.add_vbus("l4linux_2", Io.Vi.System_bus
{
    mmc0clk = wrap(Hw.MMC0CLK);
    regachi5v = wrap(Hw.ACHI5V);
    regv3v3 = wrap(Hw.V3V3);
    mmc0 = wrap(Hw.MMC0);
})
"""

But L1 and L2 still require other common devices such as pinctrl, dma, clk, 
etc. Here comes the problem, i cannot write the ".io" file like this

"""

Io.add_vbus("l4linux_1", Io.Vi.System_bus
{
    osc24mclk = wrap(Hw.OSC24M);
    ahbclk = wrap(Hw.AHB);
    apb0clk = wrap(Hw.APB0);
    pinctrl = wrap(Hw.PIO);
    dmac = wrap(Hw.DMA);

    gmacclk = wrap(Hw.GMACTX);
    miiclk = wrap(Hw.MII);
    gmacint = wrap(Hw.GMACINT);
    ethernet = wrap(Hw.NIC);
})

Io.add_vbus("l4linux_2", Io.Vi.System_bus
{
    osc24mclk = wrap(Hw.OSC24M);
    ahbclk = wrap(Hw.AHB);
    apb0clk = wrap(Hw.APB0);
    pinctrl = wrap(Hw.PIO);
    dmac = wrap(Hw.DMA);

    mmc0clk = wrap(Hw.MMC0CLK);
    regachi5v = wrap(Hw.ACHI5V);
    regv3v3 = wrap(Hw.V3V3);
    mmc0 = wrap(Hw.MMC0);
})
"""
and to boot two L4Linux as:
"""
loader:start(
    {
        caps = {
            icu = L4.Env.icu,
            sigma0 = L4.cast(L4.Proto.Factory, 
L4.Env.sigma0):create(L4.Proto.Sigma0),
            input = vbus_input:svr(),
            general = vbus_general:svr(),
            l4linux_1 = vbus_l4linux_1:svr(),
            l4linux_2 = vbus_l4linux_2:svr(),
        },
        log = {"IO", "y"},
        l4re_dbg = L4.Dbg.Warn,
    },
    "rom/io -vvv rom/l4lx-net-cubi-two.devs rom/l4lx-net-cubi-two.io"
);

-- start L4Linux 1
loader:start(
    {
        caps = {
            vbus = vbus_l4linux_1,
            shmns = shmns:mode("rw"),
        },
        ....
     }
);

-- start L4Linux 2
loader:start(
    {
        caps = {
            vbus = vbus_l4linux_2,
            shmns = shmns:mode("rw"),
        },
        ....
     }
);
"""
There will be conflicting virtual clients because of the two times assignments 
of the same device to the vbus and the two L4Linux won't be booted.

I am stuck here and thinking about to implement a driver server, but don't know 
if it is the right direction. Any suggestions would be greatly appreciated.

Yang



_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Reply via email to