Bert van Leeuwen
bert.vanleeuwen at gmail.com
Wed Jun 29 09:36:52 CEST 2005
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
> > make my program work correctly when run from loader via tftp... I access
> > PCI device, the code at one point calls virt_to_bus, which uses an
> > 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
> > the PCI interfacing, so I'm sure its got something to do with
> 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 at os.inf.tu-dresden.de
> Lackorzynski http://os.inf.tu-dresden.de/~adam/
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the l4-hackers