Changes in kernel/generic/src/ddi/ddi.c [46e886f:6f7071b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/ddi.c
r46e886f r6f7071b 46 46 #include <mm/frame.h> 47 47 #include <mm/as.h> 48 #include <mm/km.h>49 48 #include <mm/page.h> 50 49 #include <synch/mutex.h> … … 57 56 #include <trace.h> 58 57 #include <bitops.h> 59 #include <arch/asm.h>60 58 61 59 /** This lock protects the @c pareas ordered dictionary. */ … … 123 121 * 124 122 */ 125 _NO_TRACE static errno_t physmem_map(uintptr_t phys, size_t pages,123 NO_TRACE static errno_t physmem_map(uintptr_t phys, size_t pages, 126 124 unsigned int flags, uintptr_t *virt, uintptr_t bound) 127 125 { … … 229 227 } 230 228 231 _NO_TRACE static errno_t physmem_unmap(uintptr_t virt)229 NO_TRACE static errno_t physmem_unmap(uintptr_t virt) 232 230 { 233 231 assert(TASK); … … 314 312 * 315 313 */ 316 _NO_TRACE static errno_t iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size)314 NO_TRACE static errno_t iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size) 317 315 { 318 316 /* … … 355 353 * 356 354 */ 357 _NO_TRACE static errno_t iospace_disable(task_id_t id, uintptr_t ioaddr, size_t size)355 NO_TRACE static errno_t iospace_disable(task_id_t id, uintptr_t ioaddr, size_t size) 358 356 { 359 357 /* … … 415 413 } 416 414 417 _NO_TRACE static errno_t dmamem_map(uintptr_t virt, size_t size, unsigned int map_flags,415 NO_TRACE static errno_t dmamem_map(uintptr_t virt, size_t size, unsigned int map_flags, 418 416 unsigned int flags, uintptr_t *phys) 419 417 { … … 424 422 } 425 423 426 _NO_TRACE static errno_t dmamem_map_anonymous(size_t size, uintptr_t constraint,424 NO_TRACE static errno_t dmamem_map_anonymous(size_t size, uintptr_t constraint, 427 425 unsigned int map_flags, unsigned int flags, uintptr_t *phys, 428 426 uintptr_t *virt, uintptr_t bound) … … 453 451 } 454 452 455 _NO_TRACE static errno_t dmamem_unmap(uintptr_t virt, size_t size)453 NO_TRACE static errno_t dmamem_unmap(uintptr_t virt, size_t size) 456 454 { 457 455 // TODO: implement unlocking & unmap … … 459 457 } 460 458 461 _NO_TRACE static errno_t dmamem_unmap_anonymous(uintptr_t virt)459 NO_TRACE static errno_t dmamem_unmap_anonymous(uintptr_t virt) 462 460 { 463 461 return as_area_destroy(TASK->as, virt); … … 529 527 return dmamem_unmap_anonymous(virt); 530 528 } 531 void *pio_map(void *phys, size_t size)532 {533 #ifdef IO_SPACE_BOUNDARY534 if (phys < IO_SPACE_BOUNDARY)535 return phys;536 #endif537 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_BOUNDARY544 if (phys < IO_SPACE_BOUNDARY)545 return;546 #endif547 km_unmap((uintptr_t) virt, size);548 }549 529 550 530 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.