Lines Matching full:region
4 * Module Name: evregion - Operation Region support
40 * an installed default region handler.
81 * PARAMETERS: region_obj - Internal region object
84 * region_offset - Where in the region to read or write
91 * DESCRIPTION: Dispatch an address space or operation region access to
94 * NOTE: During early initialization, we always install the default region
96 * region address spaces are always available as per the ACPI specification.
126 /* Ensure that there is a handler associated with this region */ in acpi_ev_address_space_dispatch()
128 handler_desc = region_obj->region.handler; in acpi_ev_address_space_dispatch()
131 "No handler for Region [%4.4s] (%p) [%s]", in acpi_ev_address_space_dispatch()
132 acpi_ut_get_node_name(region_obj->region.node), in acpi_ev_address_space_dispatch()
134 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
145 * It may be the case that the region has never been initialized. in acpi_ev_address_space_dispatch()
148 if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { in acpi_ev_address_space_dispatch()
150 /* This region has not been initialized yet, do it */ in acpi_ev_address_space_dispatch()
158 "No init routine for region(%p) [%s]", in acpi_ev_address_space_dispatch()
160 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
165 if (region_obj->region.space_id == ACPI_ADR_SPACE_PLATFORM_COMM) { in acpi_ev_address_space_dispatch()
171 ctx->length = (u16)region_obj->region.length; in acpi_ev_address_space_dispatch()
172 ctx->subspace_id = (u8)region_obj->region.address; in acpi_ev_address_space_dispatch()
175 if (region_obj->region.space_id == in acpi_ev_address_space_dispatch()
180 ctx->length = region_obj->region.length; in acpi_ev_address_space_dispatch()
181 ctx->offset = region_obj->region.address; in acpi_ev_address_space_dispatch()
185 * We must exit the interpreter because the region setup will in acpi_ev_address_space_dispatch()
187 * for this region) in acpi_ev_address_space_dispatch()
198 /* Check for failure of the Region Setup */ in acpi_ev_address_space_dispatch()
202 "During region initialization: [%s]", in acpi_ev_address_space_dispatch()
204 region. in acpi_ev_address_space_dispatch()
209 /* Region initialization may have been completed by region_setup */ in acpi_ev_address_space_dispatch()
211 if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) { in acpi_ev_address_space_dispatch()
212 region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; in acpi_ev_address_space_dispatch()
216 * the handler for this particular region in acpi_ev_address_space_dispatch()
228 address = (region_obj->region.address + region_offset); in acpi_ev_address_space_dispatch()
232 ®ion_obj->region.handler->address_space, handler, in acpi_ev_address_space_dispatch()
234 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
266 if ((region_obj->region.space_id == ACPI_ADR_SPACE_GSBUS || in acpi_ev_address_space_dispatch()
267 region_obj->region.space_id == ACPI_ADR_SPACE_GPIO) && in acpi_ev_address_space_dispatch()
284 if (region_obj->region.space_id == ACPI_ADR_SPACE_GPIO) { in acpi_ev_address_space_dispatch()
301 acpi_ut_get_region_name(region_obj->region. in acpi_ev_address_space_dispatch()
308 if ((region_obj->region.space_id == ACPI_ADR_SPACE_EC) && in acpi_ev_address_space_dispatch()
332 * PARAMETERS: region_obj - Region Object
333 * acpi_ns_is_locked - Namespace Region Already Locked?
337 * DESCRIPTION: Break the association between the handler and the region
363 /* Get the address handler from the region object */ in acpi_ev_detach_region()
365 handler_obj = region_obj->region.handler; in acpi_ev_detach_region()
368 /* This region has no handler, all done */ in acpi_ev_detach_region()
373 /* Find this region in the handler's list */ in acpi_ev_detach_region()
381 /* Is this the correct Region? */ in acpi_ev_detach_region()
385 "Removing Region %p from address handler %p\n", in acpi_ev_detach_region()
390 *last_obj_ptr = obj_desc->region.next; in acpi_ev_detach_region()
391 obj_desc->region.next = NULL; /* Must clear field */ in acpi_ev_detach_region()
401 /* Now stop region accesses by executing the _REG method */ in acpi_ev_detach_region()
408 "from region _REG, [%s]", in acpi_ev_detach_region()
410 (region_obj->region.space_id))); in acpi_ev_detach_region()
422 * If the region has been activated, call the setup handler with in acpi_ev_detach_region()
425 if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) { in acpi_ev_detach_region()
445 "from region handler - deactivate, [%s]", in acpi_ev_detach_region()
447 (region_obj->region. in acpi_ev_detach_region()
451 region_obj->region.flags &= in acpi_ev_detach_region()
456 * Remove handler reference in the region in acpi_ev_detach_region()
458 * NOTE: this doesn't mean that the region goes away, the region in acpi_ev_detach_region()
461 * If the region is on the handler's list, this must be the in acpi_ev_detach_region()
462 * region's handler in acpi_ev_detach_region()
464 region_obj->region.handler = NULL; in acpi_ev_detach_region()
472 last_obj_ptr = &obj_desc->region.next; in acpi_ev_detach_region()
473 obj_desc = obj_desc->region.next; in acpi_ev_detach_region()
479 "Circular handler list in region object %p", in acpi_ev_detach_region()
485 /* If we get here, the region was not in the handler's region list */ in acpi_ev_detach_region()
488 "Cannot remove region %p from address handler %p\n", in acpi_ev_detach_region()
499 * region_obj - Region Object
500 * acpi_ns_is_locked - Namespace Region Already Locked?
504 * DESCRIPTION: Create the association between the handler and the region
517 /* Install the region's handler */ in acpi_ev_attach_region()
519 if (region_obj->region.handler) { in acpi_ev_attach_region()
524 "Adding Region [%4.4s] %p to address handler %p [%s]\n", in acpi_ev_attach_region()
525 acpi_ut_get_node_name(region_obj->region.node), in acpi_ev_attach_region()
527 acpi_ut_get_region_name(region_obj->region. in acpi_ev_attach_region()
530 /* Link this region to the front of the handler's list */ in acpi_ev_attach_region()
532 region_obj->region.next = handler_obj->address_space.region_list; in acpi_ev_attach_region()
534 region_obj->region.handler = handler_obj; in acpi_ev_attach_region()
544 * PARAMETERS: region_obj - Region object
549 * DESCRIPTION: Execute _REG method for a region
568 region_obj->region.handler == NULL) { in acpi_ev_execute_reg_method()
578 * Find any "_REG" method associated with this region definition. in acpi_ev_execute_reg_method()
582 node = region_obj->region.node->parent; in acpi_ev_execute_reg_method()
589 * region definition. This will be executed when the handler is in acpi_ev_execute_reg_method()
623 * Operation region space ID Same value as region_obj->Region.space_id in acpi_ev_execute_reg_method()
630 acpi_ut_create_integer_object((u64)region_obj->region.space_id); in acpi_ev_execute_reg_method()
726 * no region. in acpi_ev_execute_reg_methods()
746 * DESCRIPTION: Run _REG method for region objects of the requested spaceID
786 /* Object is a Region */ in acpi_ev_reg_run()
788 if (obj_desc->region.space_id != info->space_id) { in acpi_ev_reg_run()
790 /* This region is for a different address space, just ignore it */ in acpi_ev_reg_run()
810 * device. This is a _REG method that has no corresponding region
815 * an actual Operation Region with the correct address space ID.
849 * Execute the _REG method only if there is no Operation Region in in acpi_ev_execute_orphan_reg_method()
859 (next_node->object->region.space_id == space_id)) { in acpi_ev_execute_orphan_reg_method()