Changeset 46e886f in mainline
- Timestamp:
- 2019-04-06T16:10:08Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 82dcd25
- Parents:
- 69c31abc
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/ddi.h
r69c31abc r46e886f 60 60 extern void ddi_parea_register(parea_t *); 61 61 62 extern void *pio_map(void *, size_t); 63 extern void pio_unmap(void *, void *, size_t); 64 62 65 extern sys_errno_t sys_physmem_map(uintptr_t, size_t, unsigned int, void *, 63 66 uintptr_t); -
kernel/generic/src/ddi/ddi.c
r69c31abc r46e886f 46 46 #include <mm/frame.h> 47 47 #include <mm/as.h> 48 #include <mm/km.h> 48 49 #include <mm/page.h> 49 50 #include <synch/mutex.h> … … 56 57 #include <trace.h> 57 58 #include <bitops.h> 59 #include <arch/asm.h> 58 60 59 61 /** This lock protects the @c pareas ordered dictionary. */ … … 527 529 return dmamem_unmap_anonymous(virt); 528 530 } 531 void *pio_map(void *phys, size_t size) 532 { 533 #ifdef IO_SPACE_BOUNDARY 534 if (phys < IO_SPACE_BOUNDARY) 535 return phys; 536 #endif 537 return (void *) km_map((uintptr_t) phys, size, KM_NATURAL_ALIGNMENT, 538 PAGE_READ | PAGE_WRITE | PAGE_NOT_CACHEABLE); 539 } 540 541 void pio_unmap(void *phys, void *virt, size_t size) 542 { 543 #ifdef IO_SPACE_BOUNDARY 544 if (phys < IO_SPACE_BOUNDARY) 545 return; 546 #endif 547 km_unmap((uintptr_t) virt, size); 548 } 529 549 530 550 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.