drivers/acpi/acpica/psobject.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/psobject.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/psobject.c- Extension
.c- Size
- 19572 bytes
- Lines
- 707
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacparser.hamlcode.hacconvert.hacnamesp.h
Detected Declarations
function acpi_ps_get_aml_opcodefunction acpi_ps_build_named_opfunction namefunction acpi_ps_create_opfunction Incrementfunction acpi_ps_complete_opfunction acpi_ps_complete_final_op
Annotated Snippet
if (walk_state->pass_number == 2) {
ACPI_ERROR_ONLY(aml_offset =
(u32)ACPI_PTR_DIFF(walk_state->aml,
walk_state->
parser_state.
aml_start));
ACPI_ERROR((AE_INFO,
"Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
walk_state->opcode,
(u32)(aml_offset +
sizeof(struct acpi_table_header))));
ACPI_DUMP_BUFFER((walk_state->parser_state.aml - 16),
48);
#ifdef ACPI_ASL_COMPILER
/*
* This is executed for the disassembler only. Output goes
* to the disassembled ASL output file.
*/
acpi_os_printf
("/*\nError: Unknown opcode 0x%.2X at table offset 0x%.4X, context:\n",
walk_state->opcode,
(u32)(aml_offset +
sizeof(struct acpi_table_header)));
ACPI_ERROR((AE_INFO,
"Aborting disassembly, AML byte code is corrupt"));
/* Dump the context surrounding the invalid opcode */
acpi_ut_dump_buffer(((u8 *)walk_state->parser_state.
aml - 16), 48, DB_BYTE_DISPLAY,
(aml_offset +
sizeof(struct acpi_table_header) -
16));
acpi_os_printf(" */\n");
/*
* Just abort the disassembly, cannot continue because the
* parser is essentially lost. The disassembler can then
* randomly fail because an ill-constructed parse tree
* can result.
*/
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
#endif
}
/* Increment past one-byte or two-byte opcode */
walk_state->parser_state.aml++;
if (walk_state->opcode > 0xFF) { /* Can only happen if first byte is 0x5B */
walk_state->parser_state.aml++;
}
return_ACPI_STATUS(AE_CTRL_PARSE_CONTINUE);
default:
/* Found opcode info, this is a normal opcode */
walk_state->parser_state.aml +=
acpi_ps_get_opcode_size(walk_state->opcode);
walk_state->arg_types = walk_state->op_info->parse_args;
break;
}
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ps_build_named_op
*
* PARAMETERS: walk_state - Current state
* aml_op_start - Begin of named Op in AML
* unnamed_op - Early Op (not a named Op)
* op - Returned Op
*
* RETURN: Status
*
* DESCRIPTION: Parse a named Op
*
******************************************************************************/
acpi_status
acpi_ps_build_named_op(struct acpi_walk_state *walk_state,
u8 *aml_op_start,
union acpi_parse_object *unnamed_op,
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acparser.h`, `amlcode.h`, `acconvert.h`, `acnamesp.h`.
- Detected declarations: `function acpi_ps_get_aml_opcode`, `function acpi_ps_build_named_op`, `function name`, `function acpi_ps_create_op`, `function Increment`, `function acpi_ps_complete_op`, `function acpi_ps_complete_final_op`.
- 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.