Lines Matching full:region
4 * Module Name: evregion - Operation Region support
39 * an installed default region handler.
80 * PARAMETERS: region_obj - Internal region object
83 * region_offset - Where in the region to read or write
90 * DESCRIPTION: Dispatch an address space or operation region access to
93 * NOTE: During early initialization, we always install the default region
95 * region address spaces are always available as per the ACPI specification.
125 /* Ensure that there is a handler associated with this region */ in acpi_ev_address_space_dispatch()
127 handler_desc = region_obj->region.handler; in acpi_ev_address_space_dispatch()
130 "No handler for Region [%4.4s] (%p) [%s]", in acpi_ev_address_space_dispatch()
131 acpi_ut_get_node_name(region_obj->region.node), in acpi_ev_address_space_dispatch()
133 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
144 * It may be the case that the region has never been initialized. in acpi_ev_address_space_dispatch()
147 if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { in acpi_ev_address_space_dispatch()
149 /* This region has not been initialized yet, do it */ in acpi_ev_address_space_dispatch()
157 "No init routine for region(%p) [%s]", in acpi_ev_address_space_dispatch()
159 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
165 * We must exit the interpreter because the region setup will in acpi_ev_address_space_dispatch()
167 * for this region) in acpi_ev_address_space_dispatch()
178 /* Check for failure of the Region Setup */ in acpi_ev_address_space_dispatch()
182 "During region initialization: [%s]", in acpi_ev_address_space_dispatch()
184 region. in acpi_ev_address_space_dispatch()
189 /* Region initialization may have been completed by region_setup */ in acpi_ev_address_space_dispatch()
191 if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { in acpi_ev_address_space_dispatch()
192 region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; in acpi_ev_address_space_dispatch()
196 * the handler for this particular region in acpi_ev_address_space_dispatch()
208 address = (region_obj->region.address + region_offset); in acpi_ev_address_space_dispatch()
212 ®ion_obj->region.handler->address_space, handler, in acpi_ev_address_space_dispatch()
214 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
246 if ((region_obj->region.space_id == ACPI_ADR_SPACE_GSBUS) && in acpi_ev_address_space_dispatch()
263 if ((region_obj->region.space_id == ACPI_ADR_SPACE_GPIO) && in acpi_ev_address_space_dispatch()
294 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
301 if ((region_obj->region.space_id == ACPI_ADR_SPACE_EC) && in acpi_ev_address_space_dispatch()
325 * PARAMETERS: region_obj - Region Object
326 * acpi_ns_is_locked - Namespace Region Already Locked?
330 * DESCRIPTION: Break the association between the handler and the region
356 /* Get the address handler from the region object */ in acpi_ev_detach_region()
358 handler_obj = region_obj->region.handler; in acpi_ev_detach_region()
361 /* This region has no handler, all done */ in acpi_ev_detach_region()
366 /* Find this region in the handler's list */ in acpi_ev_detach_region()
374 /* Is this the correct Region? */ in acpi_ev_detach_region()
378 "Removing Region %p from address handler %p\n", in acpi_ev_detach_region()
383 *last_obj_ptr = obj_desc->region.next; in acpi_ev_detach_region()
384 obj_desc->region.next = NULL; /* Must clear field */ in acpi_ev_detach_region()
394 /* Now stop region accesses by executing the _REG method */ in acpi_ev_detach_region()
401 "from region _REG, [%s]", in acpi_ev_detach_region()
403 (region_obj->region.space_id))); in acpi_ev_detach_region()
415 * If the region has been activated, call the setup handler with in acpi_ev_detach_region()
418 if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) { in acpi_ev_detach_region()
438 "from region handler - deactivate, [%s]", in acpi_ev_detach_region()
440 (region_obj->region. in acpi_ev_detach_region()
444 region_obj->region.flags &= in acpi_ev_detach_region()
449 * Remove handler reference in the region in acpi_ev_detach_region()
451 * NOTE: this doesn't mean that the region goes away, the region in acpi_ev_detach_region()
454 * If the region is on the handler's list, this must be the in acpi_ev_detach_region()
455 * region's handler in acpi_ev_detach_region()
457 region_obj->region.handler = NULL; in acpi_ev_detach_region()
465 last_obj_ptr = &obj_desc->region.next; in acpi_ev_detach_region()
466 obj_desc = obj_desc->region.next; in acpi_ev_detach_region()
472 "Circular handler list in region object %p", in acpi_ev_detach_region()
478 /* If we get here, the region was not in the handler's region list */ in acpi_ev_detach_region()
481 "Cannot remove region %p from address handler %p\n", in acpi_ev_detach_region()
492 * region_obj - Region Object
493 * acpi_ns_is_locked - Namespace Region Already Locked?
497 * DESCRIPTION: Create the association between the handler and the region
510 /* Install the region's handler */ in acpi_ev_attach_region()
512 if (region_obj->region.handler) { in acpi_ev_attach_region()
517 "Adding Region [%4.4s] %p to address handler %p [%s]\n", in acpi_ev_attach_region()
518 acpi_ut_get_node_name(region_obj->region.node), in acpi_ev_attach_region()
520 acpi_ut_get_region_name(region_obj->region. in acpi_ev_attach_region()
523 /* Link this region to the front of the handler's list */ in acpi_ev_attach_region()
525 region_obj->region.next = handler_obj->address_space.region_list; in acpi_ev_attach_region()
527 region_obj->region.handler = handler_obj; in acpi_ev_attach_region()
537 * PARAMETERS: region_obj - Region object
542 * DESCRIPTION: Execute _REG method for a region
561 region_obj->region.handler == NULL) { in acpi_ev_execute_reg_method()
571 * Find any "_REG" method associated with this region definition. in acpi_ev_execute_reg_method()
575 node = region_obj->region.node->parent; in acpi_ev_execute_reg_method()
582 * region definition. This will be executed when the handler is in acpi_ev_execute_reg_method()
616 * Operation region space ID Same value as region_obj->Region.space_id in acpi_ev_execute_reg_method()
623 acpi_ut_create_integer_object((u64)region_obj->region.space_id); in acpi_ev_execute_reg_method()
717 /* Special case for EC: handle "orphan" _REG methods with no region */ in acpi_ev_execute_reg_methods()
737 * DESCRIPTION: Run _REG method for region objects of the requested spaceID
777 /* Object is a Region */ in acpi_ev_reg_run()
779 if (obj_desc->region.space_id != info->space_id) { in acpi_ev_reg_run()
781 /* This region is for a different address space, just ignore it */ in acpi_ev_reg_run()
800 * device. This is a _REG method that has no corresponding region
803 * specification: "The availability of the region space can be
843 * Execute the _REG method only if there is no Operation Region in in acpi_ev_orphan_ec_reg_method()
853 (next_node->object->region.space_id == ACPI_ADR_SPACE_EC)) { in acpi_ev_orphan_ec_reg_method()