drivers/acpi/acpica/dbdisply.c

Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/dbdisply.c

File Facts

System
Linux kernel
Corpus path
drivers/acpi/acpica/dbdisply.c
Extension
.c
Size
28188 bytes
Lines
1097
Domain
Driver Families
Bucket
drivers/acpi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (output_type[0] == 'W') {
			display = DB_WORD_DISPLAY;
		} else if (output_type[0] == 'D') {
			display = DB_DWORD_DISPLAY;
		} else if (output_type[0] == 'Q') {
			display = DB_QWORD_DISPLAY;
		}
	}

	ret_buf.length = sizeof(buffer);
	ret_buf.pointer = buffer;

	/* Differentiate between a number and a name */

	if ((target[0] >= 0x30) && (target[0] <= 0x39)) {
		obj_ptr = acpi_db_get_pointer(target);
		if (!acpi_os_readable(obj_ptr, 16)) {
			acpi_os_printf
			    ("Address %p is invalid in this address space\n",
			     obj_ptr);
			return;
		}

		/* Decode the object type */

		switch (ACPI_GET_DESCRIPTOR_TYPE(obj_ptr)) {
		case ACPI_DESC_TYPE_NAMED:

			/* This is a namespace Node */

			if (!acpi_os_readable
			    (obj_ptr, sizeof(struct acpi_namespace_node))) {
				acpi_os_printf
				    ("Cannot read entire Named object at address %p\n",
				     obj_ptr);
				return;
			}

			node = obj_ptr;
			goto dump_node;

		case ACPI_DESC_TYPE_OPERAND:

			/* This is a ACPI OPERAND OBJECT */

			if (!acpi_os_readable
			    (obj_ptr, sizeof(union acpi_operand_object))) {
				acpi_os_printf
				    ("Cannot read entire ACPI object at address %p\n",
				     obj_ptr);
				return;
			}

			acpi_ut_debug_dump_buffer(obj_ptr,
						  sizeof(union
							 acpi_operand_object),
						  display, ACPI_UINT32_MAX);
			acpi_ex_dump_object_descriptor(obj_ptr, 1);
			break;

		case ACPI_DESC_TYPE_PARSER:

			/* This is a Parser Op object */

			if (!acpi_os_readable
			    (obj_ptr, sizeof(union acpi_parse_object))) {
				acpi_os_printf
				    ("Cannot read entire Parser object at address %p\n",
				     obj_ptr);
				return;
			}

			acpi_ut_debug_dump_buffer(obj_ptr,
						  sizeof(union
							 acpi_parse_object),
						  display, ACPI_UINT32_MAX);
			acpi_db_dump_parser_descriptor((union acpi_parse_object
							*)obj_ptr);
			break;

		default:

			/* Is not a recognizable object */

			acpi_os_printf
			    ("Not a known ACPI internal object, descriptor type %2.2X\n",
			     ACPI_GET_DESCRIPTOR_TYPE(obj_ptr));

			size = 16;
			if (acpi_os_readable(obj_ptr, 64)) {

Annotation

Implementation Notes