Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:45:39+00:00 2026-06-10T05:45:39+00:00

Is the DMA address returned from this call the same as the physical address?

  • 0
  1. Is the DMA address returned from this call the same as the physical address? LDD3 says the DMA address should be treated as opaque by the driver. I want to mmap this DMA buffer so user-space can read/write directly to it. Question is what PFN should I specify for the remap_pfn_range (which to my pleasant surprise now (kernel 3.4+) works for conventional memory same as for I/O memory). Can I just cast the DMA address to unsigned long and convert that to PFN? Isn’t this a violation of what LDD3 said about opaqueness?

  2. Does dma_alloc_coherent always use __get_free_pages internally? Does this mean the region is potentially always over-allocated (since first function takes bytes but second function allocates in units of pages)?

  3. Is there a way to setup a single streaming mapping for multiple consecutive pages obtained from call to __get_free_pages? dma_map_page applies to only single pages.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:45:41+00:00Added an answer on June 10, 2026 at 5:45 am
    1. No, the address returned is a virtual address, otherwise you wouldn’t be able to access it from kernel space. It’s dma_handle which represents the physical address, but it’s opaque. You need to use virt_to_phys on the address it returns and then pass this to remap_pfn_range.

    2. I don’t believe it does (it’s likely to be platform dependent though), but it does allocate pages. If you want smaller amounts of memory for DMA you should use dma_pool_create and then allocate regions from there.

    3. You can use dma_map_single instead of dma_map_page.

    I’d recommend consulting DMA-API.txt for more details on some of this stuff.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get data from a DMA enabled, PCIe hardware device into user-space
I want to transfer 8 bit parallel data from IO to memory ,the data
I want to create some memory to use for DMA transfers. (Using Linux 2.6.18-128.el5
I am porting a app/PCI driver from vxWorks to Linux and I would like
I need some memory allocated during boot time. and I need its physical address,
I read this in a book: If the DMA controller in a system functions
Is it possible to create a function from struct? Like this: #include <stdio.h> struct
I try VBO by DMA. but it doesn't work. Svertex = new GLdouble**[nSlice+1]; Snormal
The problem here is pretty self-evident from the resulting JSON array at the bottom.
Who can help me with this: I am working on Win7 x64, with VS.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.