Hello everybody,
Does the L4re contain some kind of simple performance benchmarks which are already prepared to use? I've tried to launch some demos from the ferret package but not succeed...
Thank you in advance for any suggestions. Sincerely, Maxim Baryshnikov.
Hello,
I wanna use the new RPC with a L4Re::Dataspace as parameter. Unfortunately, I get an Error=0xfffff828=8_dec.
What's my Error?
/* shared.h */ #include <l4/sys/capability> #include <l4/sys/cxx/ipc_iface> #include <l4/re/dataspace>
struct SERV : L4::Kobject_t<SERV, L4::Kobject, 0x44> { L4_INLINE_RPC(int, transmit, (int32_t size, L4::Ipc::CapL4Re::Dataspace command)); typedef L4::Typeid::Rpcs<transmit_t> Rpcs; };
/* server.cc */ class Server : public L4::Epiface_t<Server, SERV> { public: int op_transmit(SERV::Rights, int32_t size, L4::Ipc::Snd_fpage command) { return 0; } };
/* client.cc */ L4::CapL4Re::Dataspace dataspace = L4Re::Util::cap_alloc.allocL4Re::Dataspace(); if (!(dataspace).is_valid()){ return -1; } int r = L4Re::Env::env()->mem_alloc()->alloc( size, dataspace, 0); if (r < 0){ return -1; } l4_addr_t ds_startAddr = 0; r = L4Re::Env::env()->rm()->attach( &ds_startAddr, dataspace->size(), L4Re::Rm::Search_addr, L4::Ipc::make_cap_rw(dataspace)); if (r < 0){ return -1; }
r = serverCap->transmit( size, dataspace); if (r){ printf("Error=0x%x=%d_dec talking to server\n",r); return -1; }
BTW: What's that 0x44 in the struct? Where do i find valid flags for this parameter?
Thanks again,
ba_f
Hi,
On Mon May 02, 2016 at 16:39:21 +0200, ba_f wrote:
I wanna use the new RPC with a L4Re::Dataspace as parameter. Unfortunately, I get an Error=0xfffff828=8_dec.
What's my Error?
The error message says that the receive side (the server) did not provide storage space for the message.
struct SERV : L4::Kobject_t<SERV, L4::Kobject, 0x44>
Change that to struct SERV : L4::Kobject_t<SERV, L4::Kobject, 0x44, L4::Type_info::Demand_t<1> >
to specify that the server can also receive a cap.
r = serverCap->transmit( size, dataspace); if (r){ printf("Error=0x%x=%d_dec talking to server\n",r);
Please check your compiler warnings, this misses the third parameter and thus the error message is confusing/wrong.
BTW: What's that 0x44 in the struct? Where do i find valid flags for this parameter?
The protocol number of the interface, some unique number that should not clash with other interfaces used for a channel.
Adam
Hello,
due to sloppy documentation I need help from mailing-list, again.
I want to access Hardware (HW) from a L4re-App.
Actually, I already did this with the old IO-config style. I described the HW in *.devs and *.io file and then I was accessing the HW, directly with l4io_request_iomem(ADDR, 4, L4IO_MEM_NONCACHED, &baseaddr);
With the new functions() style IO-config anything is described in a single *.io, right?
Well, mine looks like this:
-- vim:ft=lua: Io.Dt.add_children(Io.system_bus(), function() RNG = Io.Hw.Device(function() compatible = {"dev-rng,mmio", "dev-rng"}; Property.hid = "dev-rng, RNG_0"; Resource.regs = Io.Res.mmio(0x43c00000, 0x43c0ffff); end); end);
Io.add_vbusses { rng_server = Io.Vi.System_bus(function () dev = wrap(Io.system_bus():match("RNG")); end); }
(Not sure if I really need 'compatible and 'Property.hid', here..?)
Anyway, all I see is output from IO but, no other L4Re-App seems to start. IO | Io service IO | Ready. Waiting for request.
Anybody already spot the fault?
May I still use l4io_request_iomem() to access the HW or, did things change here, too?
Thanks,
ba_f
Hi,
On 08/09/2016 02:35 PM, ba_f wrote:
Hello,
due to sloppy documentation I need help from mailing-list, again.
We are constantly seeking to improve our documentation. What exactly did you find sloppy or misleading?
I want to access Hardware (HW) from a L4re-App.
Actually, I already did this with the old IO-config style. I described the HW in *.devs and *.io file and then I was accessing the HW, directly with l4io_request_iomem(ADDR, 4, L4IO_MEM_NONCACHED, &baseaddr);
With the new functions() style IO-config anything is described in a single *.io, right?
That is possible but not neccessary. You can still split io's configuration into multiple files.
Well, mine looks like this:
-- vim:ft=lua: Io.Dt.add_children(Io.system_bus(), function() RNG = Io.Hw.Device(function() compatible = {"dev-rng,mmio", "dev-rng"}; Property.hid = "dev-rng, RNG_0"; Resource.regs = Io.Res.mmio(0x43c00000, 0x43c0ffff); end); end);
Io.add_vbusses { rng_server = Io.Vi.System_bus(function () dev = wrap(Io.system_bus():match("RNG"));
The match() function takes a string as an argument and compares it with the list of CIDs. As your device tree does not contain a device with a HID or CID matching "RNG", no device is added to the 'rng_server' vbus.
The solution is to supply a string from either the compatible table or the hid property of the device(s) you want to match.
Btw, by adding a few '-v' options to io's cmdline you can make io more verbose to e.g. print the whole device tree or vbus trees.
Matthias.
end); }
(Not sure if I really need 'compatible and 'Property.hid', here..?)
Anyway, all I see is output from IO but, no other L4Re-App seems to start. IO | Io service IO | Ready. Waiting for request.
Anybody already spot the fault?
May I still use l4io_request_iomem() to access the HW or, did things change here, too?
Thanks,
ba_f
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Am 2016-08-09 15:19, schrieb Matthias Lange:
Hi,
On 08/09/2016 02:35 PM, ba_f wrote:
Hello,
due to sloppy documentation I need help from mailing-list, again.
We are constantly seeking to improve our documentation. What exactly did you find sloppy or misleading?
Well, mine looks like this:
-- vim:ft=lua: Io.Dt.add_children(Io.system_bus(), function() RNG = Io.Hw.Device(function() compatible = {"dev-rng,mmio", "dev-rng"}; Property.hid = "dev-rng, RNG_0"; Resource.regs = Io.Res.mmio(0x43c00000, 0x43c0ffff); end); end);
Io.add_vbusses { rng_server = Io.Vi.System_bus(function () dev = wrap(Io.system_bus():match("RNG"));
The match() function takes a string as an argument and compares it with the list of CIDs. As your device tree does not contain a device with a HID or CID matching "RNG", no device is added to the 'rng_server' vbus.
The solution is to supply a string from either the compatible table or the hid property of the device(s) you want to match.
Btw, by adding a few '-v' options to io's cmdline you can make io more verbose to e.g. print the whole device tree or vbus trees.
Matthias.
Great, all L4Re-Apps boot now.
But, there's still something wrong. Here's my code to access HW:
printf("io_request..."); long ret = l4io_request_iomem( 0x43c00000, 4, L4IO_MEM_NONCACHED, baseaddr); printf("done!\n");
if (ret != 0){ return -1; }
l4_uint32_t rng = *baseaddr; // ERR comes here
When accessing *baseaddr, there's an Error. This code used to work with an older snapshot...
RNG | Hi, this is RNG server. RNG | io_request...done! RNG | L4Re[rm]: mapping for page fault failed with error -34 at 0x9000 pc=0x1000280 RNG | L4Re: unhandled exception: pc=0x1000280 (pfa=9000) RNG | L4Re: Global::l4re_aux->ldr_flags=0
So, is this the correct way to access a certain HW-Address?
Thanks,
ba_f
(Not sure if I really need 'compatible and 'Property.hid', here..?)
Anyway, all I see is output from IO but, no other L4Re-App seems to start. IO | Io service IO | Ready. Waiting for request.
Anybody already spot the fault?
May I still use l4io_request_iomem() to access the HW or, did things change here, too?
Thanks,
ba_f
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
On 08/09/2016 04:44 PM, ba_f wrote:
Am 2016-08-09 15:19, schrieb Matthias Lange:
Hi,
On 08/09/2016 02:35 PM, ba_f wrote:
Hello,
due to sloppy documentation I need help from mailing-list, again.
We are constantly seeking to improve our documentation. What exactly did you find sloppy or misleading?
Well, mine looks like this:
-- vim:ft=lua: Io.Dt.add_children(Io.system_bus(), function() RNG = Io.Hw.Device(function() compatible = {"dev-rng,mmio", "dev-rng"}; Property.hid = "dev-rng, RNG_0"; Resource.regs = Io.Res.mmio(0x43c00000, 0x43c0ffff); end); end);
Io.add_vbusses { rng_server = Io.Vi.System_bus(function () dev = wrap(Io.system_bus():match("RNG"));
The match() function takes a string as an argument and compares it with the list of CIDs. As your device tree does not contain a device with a HID or CID matching "RNG", no device is added to the 'rng_server' vbus.
The solution is to supply a string from either the compatible table or the hid property of the device(s) you want to match.
Btw, by adding a few '-v' options to io's cmdline you can make io more verbose to e.g. print the whole device tree or vbus trees.
Matthias.
Great, all L4Re-Apps boot now.
But, there's still something wrong. Here's my code to access HW:
printf("io_request..."); long ret = l4io_request_iomem( 0x43c00000, 4, L4IO_MEM_NONCACHED, baseaddr);
Did you initialize 'baseaddr' to NULL?
A few more recommendations. It is usually bad practice to use hard-coded device addresses. If you like the convinience of libio-io you can use l4io_lookup_device() to get a device handle which you can use to iterate the device resources with l4vbus_get_resource().
Matthias.
printf("done!\n");
if (ret != 0){ return -1; }
l4_uint32_t rng = *baseaddr; // ERR comes here
When accessing *baseaddr, there's an Error. This code used to work with an older snapshot...
RNG | Hi, this is RNG server. RNG | io_request...done! RNG | L4Re[rm]: mapping for page fault failed with error -34 at 0x9000 pc=0x1000280 RNG | L4Re: unhandled exception: pc=0x1000280 (pfa=9000) RNG | L4Re: Global::l4re_aux->ldr_flags=0
So, is this the correct way to access a certain HW-Address?
Thanks,
ba_f
(Not sure if I really need 'compatible and 'Property.hid', here..?)
Anyway, all I see is output from IO but, no other L4Re-App seems to start. IO | Io service IO | Ready. Waiting for request.
Anybody already spot the fault?
May I still use l4io_request_iomem() to access the HW or, did things change here, too?
Thanks,
ba_f
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Am 2016-08-09 17:49, schrieb Matthias Lange:
On 08/09/2016 04:44 PM, ba_f wrote:
Am 2016-08-09 15:19, schrieb Matthias Lange:
Great, all L4Re-Apps boot now.
But, there's still something wrong. Here's my code to access HW:
printf("io_request..."); long ret = l4io_request_iomem( 0x43c00000, 4, L4IO_MEM_NONCACHED, baseaddr);
Did you initialize 'baseaddr' to NULL?
A few more recommendations. It is usually bad practice to use hard-coded device addresses. If you like the convinience of libio-io you can use l4io_lookup_device() to get a device handle which you can use to iterate the device resources with l4vbus_get_resource().
Matthias.
Nice, thanks for the hint.
I took examples/misc/eb_leds/eb_leds.c as reference and now it works.
Thanks Matthias,
ba_f
Hi Adam,
Linking a program to a specific location is well possible. However, the extra memory region is not part of the normal RAM but an extra piece of memory? How is it accessed? And how big is it?
Adam
Yes, the secure ram is separate from the ordinary DRAM. But, access to it is address based via ARM AXI.
My design has a trusted L4re-App. And i want to link the trusted app alone to the secure ram. I argue that ordinary DRAM is easy to read out for an attacker that has local access to the platform. The secure ram is less easy to read-out, so the trusted app would be more secure.
Greets,
ba_f
On Thu Apr 28, 2016 at 17:31:24 +0200, Maxim Baryshnikov wrote:
Hello everybody,
Does the L4re contain some kind of simple performance benchmarks which
are already prepared to use? I've tried to launch some demos from the ferret package but not succeed...
ferrit is in archive mode, so do not expect anything. There's not really anything but what you're looking for?
Adam
I meant something like lmbench tests. More precisely, I've looked for some benchmarks that measure memory performance.
On 05/09/2016 01:01 AM, Adam Lackorzynski wrote:
On Thu Apr 28, 2016 at 17:31:24 +0200, Maxim Baryshnikov wrote:
Hello everybody,
Does the L4re contain some kind of simple performance benchmarks which
are already prepared to use? I've tried to launch some demos from the ferret package but not succeed...
ferrit is in archive mode, so do not expect anything. There's not really anything but what you're looking for?
Adam
On Mon May 09, 2016 at 18:14:43 +0200, Maxim Baryshnikov wrote:
I meant something like lmbench tests. More precisely, I've looked for some benchmarks that measure memory performance.
Ah no, I'm afraid.
Adam
On 05/09/2016 01:01 AM, Adam Lackorzynski wrote:
On Thu Apr 28, 2016 at 17:31:24 +0200, Maxim Baryshnikov wrote:
Hello everybody,
Does the L4re contain some kind of simple performance benchmarks which
are already prepared to use? I've tried to launch some demos from the ferret package but not succeed...
ferrit is in archive mode, so do not expect anything. There's not really anything but what you're looking for?
Adam
l4-hackers@os.inf.tu-dresden.de