Return mapping of physical address requested. */
| 60 | |
| 61 | /* Return mapping of physical address requested. */ |
| 62 | static void *mapping_virt(const struct mapping *mapping) |
| 63 | { |
| 64 | char *v = mapping->virt; |
| 65 | |
| 66 | if (v == NULL) |
| 67 | return NULL; |
| 68 | |
| 69 | return v + mapping->offset; |
| 70 | } |
| 71 | |
| 72 | /* Returns virtual address on success, NULL on error. mapping is filled in. */ |
| 73 | static void *map_memory_with_prot(struct mapping *mapping, unsigned long long phys, size_t sz, |
no outgoing calls
no test coverage detected