Changeset 481 for soft/giet_vm/giet_drivers/dma_driver.c
- Timestamp:
- Jan 1, 2015, 8:23:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/dma_driver.c
r456 r481 278 278 } 279 279 280 unsigned int ko;281 280 unsigned int ppn; 282 281 unsigned int flags; … … 313 312 314 313 // get src_paddr buffer physical addresse 315 ko = _v2p_translate( (page_table_t*)pt, // page table pointer 316 src_vaddr>>12, // vpn 317 &ppn, // ppn 318 &flags ); // flags 319 if ( ko ) 320 { 321 _puts("\n[DMA ERROR] in _dma_copy() : source buffer unmapped\n"); 322 _exit(); 323 } 314 _v2p_translate( (page_table_t*)pt, // page table pointer 315 src_vaddr>>12, // vpn 316 &ppn, // ppn 317 &flags ); // flags 324 318 unsigned long long src_paddr = (((unsigned long long)ppn) << 12) | 325 319 (unsigned long long)(src_vaddr & 0x00000FFF); 326 320 327 321 // get dst_paddr buffer physical addresse 328 ko = _v2p_translate( (page_table_t*)pt, // page table pointer 329 dst_vaddr>>12, // vpn 330 &ppn, // ppn 331 &flags ); // flags 332 if ( ko ) 333 { 334 _puts("\n[DMA ERROR] in _dma_copy() : dest buffer unmapped\n"); 335 _exit(); 336 } 322 _v2p_translate( (page_table_t*)pt, // page table pointer 323 dst_vaddr>>12, // vpn 324 &ppn, // ppn 325 &flags ); // flags 337 326 unsigned long long dst_paddr = (((unsigned long long)ppn) << 12) | 338 327 (unsigned long long)(dst_vaddr & 0x00000FFF);
Note: See TracChangeset
for help on using the changeset viewer.