relocated address
Bert van Leeuwen
bert.vanleeuwen at gmail.com
Thu Jun 30 09:05:15 CEST 2005
Thank you for the advice, it works great!
On 6/29/05, Bert van Leeuwen <bert.vanleeuwen at gmail.com> wrote:
>
> Thanks, I'll give that a try.
>
> On 6/28/05, Adam Lackorzynski <adam at os.inf.tu-dresden.de> wrote:
> >
> >
> > On Tue Jun 28, 2005 at 15:40:43 +0200, Bert van Leeuwen wrote:
> > > Is there a way to get a program's relocated address? I think I need
> > this to
> > > make my program work correctly when run from loader via tftp... I
> > access a
> > > PCI device, the code at one point calls virt_to_bus, which uses an
> > extern
> > > unsigned int offset which is 0, but there is a comment saying that the
> >
> > > offset should be set to the program's relocated address instead of
> > 0...
> > > Running my program from grub works just fine, but not from loader,
> > > presumably because of this. The program itself "works" from loader,
> > but not
> > > the PCI interfacing, so I'm sure its got something to do with
> > relocation.
> >
> > Ok, what you actually want to have is a working virt_to_phys. When
> > being run via the loader the memory for the program comes in dataspaces,
> >
> > so that you can query the data space manager for the physical addresses
> > (l4dm_mem_phys_addr). That is the way to go.
> > Any virtual address isn't going to give you much as the loader or any
> > other involved component may give you arbitrary physical memory. When
> > using memory for DMA, one should make sure that the used memory area is
> > physically contiguous, for obvious reasons.
> >
> >
> >
> >
> >
> > Adam
> > --
> > Adam adam at os.inf.tu-dresden.de
> > Lackorzynski http://os.inf.tu-dresden.de/~adam/<http://os.inf.tu-dresden.de/%7Eadam/>
> >
> > _______________________________________________
> > l4-hackers mailing list
> > l4-hackers at os.inf.tu-dresden.de
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> >
>
>
>
> --
> BvL
--
BvL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20050630/bf3d5ac9/attachment.htm>
More information about the l4-hackers
mailing list