Lines Matching refs:region

122 	memory_region *region = new(std::nothrow) memory_region {
134 if (region == NULL) {
140 //region->dprint("Allocated");
142 allocated_regions = region;
143 *_address = (void *)region->paddr;
160 memory_region *region = new(std::nothrow) memory_region {
167 if (region == NULL) {
172 allocated_regions = region;
173 *_address = (void *)region->paddr;
217 memory_region *region = new(std::nothrow) memory_region {
224 if (!region)
225 panic("Couldn't add allocated region");
227 allocated_regions = region;
248 for (memory_region *region = allocated_regions; region;
249 region = region->next) {
250 if (region->paddr <= addr && addr < region->paddr + region->size) {
252 if (region->vaddr == 0) {
253 region->vaddr = get_next_virtual_address(region->size);
255 *_result = region->vaddr + (addr - region->paddr);
256 //dprintf("Converted bootloader address %p in region %#lx-%#lx to %#lx\n",
257 // address, region->paddr, region->paddr + region->size, *_result);
271 for (memory_region *region = allocated_regions; region;
272 region = region->next) {
273 if (region->vaddr != 0 && region->vaddr <= address
274 && address < region->vaddr + region->size) {
275 *_result = (void *)(region->paddr + (address - region->vaddr));
276 //dprintf("Converted kernel address %#lx in region %#lx-%#lx to %p\n",
277 // address, region->vaddr, region->vaddr + region->size, *_result);
289 TRACE("%s: called to release region %p (%" B_PRIuSIZE ")\n", __func__,
310 panic("platform_free_region: Unknown region to free??");
323 memory_region* region = (memory_region*)*cookie;
324 if (region == NULL)
327 if (region->vaddr == 0)
328 region->vaddr = get_next_virtual_address(region->size);
330 *vaddr = region->vaddr;
331 *paddr = region->paddr;
332 *size = region->size;