drivers/acpi/acpica/rsmemory.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/rsmemory.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/rsmemory.c- Extension
.c- Size
- 5563 bytes
- Lines
- 199
- 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
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/*******************************************************************************
*
* Module Name: rsmem24 - Memory resource descriptors
*
******************************************************************************/
#include <acpi/acpi.h>
#include "accommon.h"
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME("rsmemory")
/*******************************************************************************
*
* acpi_rs_convert_memory24
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_memory24[4] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY24,
ACPI_RS_SIZE(struct acpi_resource_memory24),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_memory24)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY24,
sizeof(struct aml_resource_memory24),
0},
/* Read/Write bit */
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.memory24.write_protect),
AML_OFFSET(memory24.flags),
0},
/*
* These fields are contiguous in both the source and destination:
* Minimum Base Address
* Maximum Base Address
* Address Base Alignment
* Range Length
*/
{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.memory24.minimum),
AML_OFFSET(memory24.minimum),
4}
};
/*******************************************************************************
*
* acpi_rs_convert_memory32
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_memory32[4] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY32,
ACPI_RS_SIZE(struct acpi_resource_memory32),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_memory32)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY32,
sizeof(struct aml_resource_memory32),
0},
/* Read/Write bit */
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.memory32.write_protect),
AML_OFFSET(memory32.flags),
0},
/*
* These fields are contiguous in both the source and destination:
* Minimum Base Address
* Maximum Base Address
* Address Base Alignment
* Range Length
*/
{ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.memory32.minimum),
AML_OFFSET(memory32.minimum),
4}
};
/*******************************************************************************
*
* acpi_rs_convert_fixed_memory32
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[4] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_MEMORY32,
ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_memory32)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_MEMORY32,
sizeof(struct aml_resource_fixed_memory32),
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acresrc.h`.
- 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.