next up previous
Next: The first SHRIMP solution Up: User-Level DMA - Early Previous: Kernel-Level Initiation of DMA

Passing Physical Addresses

Before we describe the various user-level DMA mechanisms, we will discuss the notion of shadow addressing, that is common to all user-level DMA solutions, and has been proposed (under various names) in [3, 8]. The method of shadow addressing is used to securely translate virtual to physical addresses and pass them to the DMA engine from user-level processes. For each virtual address vaddr that is mapped in the physical address paddr, there is also a shadow address shadow(vaddr), which is mapped in the shadow physical address {shadow(paddr).gif The shadow function is simple and known to the DMA engine. One simple shadow function is to concatenate each address with an extra shadow bit. When the shadow bit is set, then the address is a shadow one. For example, 0x0FFFFFFFF is a regular 33-bit address, while 0x1FFFFFFFF is its shadow address.

An access to a shadow address is always interpreted by the DMA engine as a special argument passing operation. For example, suppose that virtual address vaddr is mapped to physical address paddr, and that the virtual address shadow(vaddr) is mapped into shadow(paddr). Normally, a load (store) operation to virtual address vaddr by a user application is translated by the TLB (page-table) into a load (store) operation to physical address paddr and is performed by the appropriate memory controller. Similarly, a load (store) operation to virtual address shadow(vaddr) is translated by the TLB into a load (store) operation to physical address shadow(paddr). When, however, this operation reaches the DMA engine it will be treated as an argument passing operation, and neither a load nor a store operation will be performed to physical address shadow(paddr). Thus, when the user application wants to pass to the DMA engine the physical address paddr, it makes an access to virtual address shadow(vaddr). Eventually, the access mode along with the physical address shadow(paddr) reach the DMA engine. The DMA engine recognizes the shadow address and takes the physical address paddr by applying function shadow tex2html_wrap_inline674 to physical address shadow(paddr)gif


next up previous
Next: The first SHRIMP solution Up: User-Level DMA - Early Previous: Kernel-Level Initiation of DMA

Evangelos Markatos
Fri Nov 8 12:27:33 EET 1996