drivers/acpi/acpica/rsaddr.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/rsaddr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/rsaddr.c- Extension
.c- Size
- 10678 bytes
- Lines
- 348
- 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.hacresrc.h
Detected Declarations
function acpi_rs_get_address_commonfunction acpi_rs_set_address_common
Annotated Snippet
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/*******************************************************************************
*
* Module Name: rsaddr - Address resource descriptors (16/32/64)
*
******************************************************************************/
#include <acpi/acpi.h>
#include "accommon.h"
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME("rsaddr")
/*******************************************************************************
*
* acpi_rs_convert_address16 - All WORD (16-bit) address resources
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_address16[5] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_ADDRESS16,
ACPI_RS_SIZE(struct acpi_resource_address16),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_address16)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_ADDRESS16,
sizeof(struct aml_resource_address16),
0},
/* Resource Type, General Flags, and Type-Specific Flags */
{ACPI_RSC_ADDRESS, 0, 0, 0},
/*
* These fields are contiguous in both the source and destination:
* Address Granularity
* Address Range Minimum
* Address Range Maximum
* Address Translation Offset
* Address Length
*/
{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.address16.address.granularity),
AML_OFFSET(address16.granularity),
5},
/* Optional resource_source (Index and String) */
{ACPI_RSC_SOURCE, ACPI_RS_OFFSET(data.address16.resource_source),
0,
sizeof(struct aml_resource_address16)}
};
/*******************************************************************************
*
* acpi_rs_convert_address32 - All DWORD (32-bit) address resources
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_address32[5] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_ADDRESS32,
ACPI_RS_SIZE(struct acpi_resource_address32),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_address32)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_ADDRESS32,
sizeof(struct aml_resource_address32),
0},
/* Resource Type, General Flags, and Type-Specific Flags */
{ACPI_RSC_ADDRESS, 0, 0, 0},
/*
* These fields are contiguous in both the source and destination:
* Address Granularity
* Address Range Minimum
* Address Range Maximum
* Address Translation Offset
* Address Length
*/
{ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.address32.address.granularity),
AML_OFFSET(address32.granularity),
5},
/* Optional resource_source (Index and String) */
{ACPI_RSC_SOURCE, ACPI_RS_OFFSET(data.address32.resource_source),
0,
sizeof(struct aml_resource_address32)}
};
/*******************************************************************************
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acresrc.h`.
- Detected declarations: `function acpi_rs_get_address_common`, `function acpi_rs_set_address_common`.
- 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.