Define Addr. Space of Task

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sat Jul 8 00:49:53 CEST 2017


On Thu Jul 06, 2017 at 16:57:54 +0200, ba_f wrote:
> So, how can I link a Task to a specific address space?

This is only half of the question really. You first need to make the
sram available to your program. To the system this looks like device
memory as it is outside of the DRAM region, i.e. you need to configure
io with a device that covers the sram region as mmio. Then you can make
this region available in your program (you can use l4io_request_iomem()
from libio-io for that).
Then you have more or less two options regarding your code that shall
run in the sram. Either build it to position independent code so that it
can run anywhere and thus also in the virtual region you happen to have
mapped the sram to. Or link it to a specific address but then you have
to ensure that the sram is visible at this address (use
l4io_request_iomem_region() then). This is probably easier.
Another issue you need to solve is loading your program. As you need a
specific setup (map the iomem, to a specific location), you also need
your own loader that handles that, including unpacking the ELF file and
copying the sections in there. Don't be afraid, an ELF loader (for
static programs) is easily doable.
For changing the standard link address, you can set "DEFAULT_RELOC" in
the Makefile to some proper value.


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
> 
> 
> 
> Thank you,
> 
> ba_f
> 
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list