Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
65 user(s) are online (50 user(s) are browsing Forums)

Members: 2
Guests: 63

khayoz, Raziel, more...

Support us!

Headlines

Report message:*
 

Re: DMA buffer for PCI busmaster headache

Subject: Re: DMA buffer for PCI busmaster headache
by salass00 on 2021/2/11 8:56:51

@geennaam

The address returned by IExec->AllocVecTags() is a virtual address as seen by the CPU.

To get the physical address of the memory you allocated you need to use the IMMU->GetPhysicalAddress() function from the exec.library "mmu" interface.

The function has to be called from supervisor mode so you will have to do something like:

APTR get_physical_address(APTR virtual)
{
    
APTR stackphysical;

    
stack IExec->SuperState();

    
physical IMMU->GetPhysicalAddress(virtual);

    if (
stack != NULL)
        
IExec->UserState(stack);
}


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project