MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nexus_activate_resource

Function nexus_activate_resource

freebsd/x86/x86/nexus.c:435–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435static int
436nexus_activate_resource(device_t bus, device_t child, int type, int rid,
437 struct resource *r)
438{
439 struct resource_map map;
440 int error;
441
442 error = rman_activate_resource(r);
443 if (error != 0)
444 return (error);
445
446 if (!(rman_get_flags(r) & RF_UNMAPPED) &&
447 (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) {
448 error = nexus_map_resource(bus, child, type, r, NULL, &map);
449 if (error) {
450 rman_deactivate_resource(r);
451 return (error);
452 }
453
454 rman_set_mapping(r,&map);
455 }
456 return (0);
457}
458
459static int
460nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,

Callers

nothing calls this directly

Calls 5

rman_activate_resourceFunction · 0.85
rman_get_flagsFunction · 0.85
nexus_map_resourceFunction · 0.85
rman_deactivate_resourceFunction · 0.85
rman_set_mappingFunction · 0.85

Tested by

no test coverage detected