drivers/acpi/acpica/utbuffer.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utbuffer.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utbuffer.c- Extension
.c- Size
- 7252 bytes
- Lines
- 308
- 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.
- 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
acpi/acpi.haccommon.h
Detected Declarations
function Copyrightfunction onesfunction acpi_ut_debug_dump_bufferfunction acpi_ut_dump_buffer_to_file
Annotated Snippet
if (!display_data_only) {
acpi_os_printf("%8.4X: ", (base_offset + i));
}
/* Print 16 hex chars */
for (j = 0; j < 16;) {
if (i + j >= count) {
/* Dump fill spaces */
acpi_os_printf("%*s", ((display * 2) + 1), " ");
j += display;
continue;
}
switch (display) {
case DB_BYTE_DISPLAY:
default: /* Default is BYTE display */
acpi_os_printf("%02X ",
buffer[(acpi_size)i + j]);
break;
case DB_WORD_DISPLAY:
ACPI_MOVE_16_TO_32(&temp32,
&buffer[(acpi_size)i + j]);
acpi_os_printf("%04X ", temp32);
break;
case DB_DWORD_DISPLAY:
ACPI_MOVE_32_TO_32(&temp32,
&buffer[(acpi_size)i + j]);
acpi_os_printf("%08X ", temp32);
break;
case DB_QWORD_DISPLAY:
ACPI_MOVE_32_TO_32(&temp32,
&buffer[(acpi_size)i + j]);
acpi_os_printf("%08X", temp32);
ACPI_MOVE_32_TO_32(&temp32,
&buffer[(acpi_size)i + j +
4]);
acpi_os_printf("%08X ", temp32);
break;
}
j += display;
}
/*
* Print the ASCII equivalent characters but watch out for the bad
* unprintable ones (printable chars are 0x20 through 0x7E)
*/
if (!display_data_only) {
acpi_os_printf(" ");
for (j = 0; j < 16; j++) {
if (i + j >= count) {
acpi_os_printf("\n");
return;
}
/*
* Add comment characters so rest of line is ignored when
* compiled
*/
if (j == 0) {
acpi_os_printf("// ");
}
buf_char = buffer[(acpi_size)i + j];
if (isprint(buf_char)) {
acpi_os_printf("%c", buf_char);
} else {
acpi_os_printf(".");
}
}
/* Done with that line. */
acpi_os_printf("\n");
}
i += 16;
}
return;
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`.
- Detected declarations: `function Copyright`, `function ones`, `function acpi_ut_debug_dump_buffer`, `function acpi_ut_dump_buffer_to_file`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.