RTEMS virtual address to physical address on i386
Yan Luo
yan_luo at uml.edu
Wed Jun 21 17:10:46 UTC 2006
Hello,
I am trying to initiate DMA transfer on i386. I use bus master IDE
controller to transfer a block of data from hard disk to memory. To do that,
I need to set up the Physical Region Descriptor(PRD) table, in which the
memory region physical base address and byte count are specified. I wonder
how to translate the virtual address of a buffer to "physical address".
Specifically, if I have "buffer =3D (uint8_t *)malloc(some_size)", is
"buffer" a virtual address? If it is, how do I translate it to physical
address that
can be used for DMA? I know Linux has something like virt_to_phy() or
pci_allocate_consistent(), does RTEMS have similar APIs?
Please advise. Thank you.
Yan
More information about the users
mailing list