Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
74 user(s) are online (64 user(s) are browsing Forums)

Members: 1
Guests: 73

cobale, 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 9:12:03

@geennaam

In addition for the ring buffer you might want to allocate a certain number of memory pages (aligned set to page size, with size a multiple of page size) and use IMMU->GetMemoryAttrs()/IMMU->SetMemoryAttrs() to set the memory as MEMATTRF_CACHEINHIBIT.

You can get the mmu page size using IExec->GetCPUInfoTags().

ULONG get_page_size(void)
{
    
ULONG page_size_bits 0i;
    
ULONG page_size 0;

    
IExec->GetCPUInfoTags(GCIT_ExecPageSize, &page_size_bitsTAG_END);
    for (
032i++)
    {
        if (
page_size_bits & (1UL << i))
        {
            
page_size = (1UL << i);
            break;
        }
    }

    return 
page_size;
}


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project