Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/xen/bus/xenpv.c
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | xenpv_alloc_physmem(device_t dev, device_t child, int *res_id, size_t size) | ||||
res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, LOW_MEM_LIMIT, | res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, LOW_MEM_LIMIT, | ||||
~0, size, RF_ACTIVE); | ~0, size, RF_ACTIVE); | ||||
if (res == NULL) | if (res == NULL) | ||||
return (NULL); | return (NULL); | ||||
phys_addr = rman_get_start(res); | phys_addr = rman_get_start(res); | ||||
error = vm_phys_fictitious_reg_range(phys_addr, phys_addr + size, | error = vm_phys_fictitious_reg_range(phys_addr, phys_addr + size, | ||||
VM_MEMATTR_DEFAULT); | VM_MEMATTR_XEN); | ||||
if (error) { | if (error) { | ||||
bus_release_resource(child, SYS_RES_MEMORY, *res_id, res); | bus_release_resource(child, SYS_RES_MEMORY, *res_id, res); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
return (res); | return (res); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |