MCPcopy Create free account
hub / github.com/coreboot/coreboot / unmap_memory

Function unmap_memory

util/cbmem/devmem_drv.c:118–129  ·  view source on GitHub ↗

Returns 0 on success, < 0 on error. mapping is cleared if successful. */

Source from the content-addressed store, hash-verified

116
117/* Returns 0 on success, < 0 on error. mapping is cleared if successful. */
118static int unmap_memory(struct mapping *mapping)
119{
120 if (mapping->virt == NULL)
121 return -1;
122
123 munmap(mapping->virt, mapping->virt_size);
124 mapping->virt = NULL;
125 mapping->offset = 0;
126 mapping->virt_size = 0;
127
128 return 0;
129}
130
131/*
132 * Some architectures map /dev/mem memory in a way that doesn't support

Callers 5

parse_cbtableFunction · 0.85
cbmem_devmem_terminateFunction · 0.85
fetch_cbmem_entryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected