drivers/acpi/acpi_fpdt.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpi_fpdt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpi_fpdt.c- Extension
.c- Size
- 8532 bytes
- Lines
- 345
- 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
linux/acpi.hlinux/processor.h
Detected Declarations
struct fpdt_subtable_entrystruct fpdt_subtable_headerstruct fpdt_record_headerstruct resume_performance_recordstruct boot_performance_recordstruct suspend_performance_recordenum fpdt_subtable_typeenum fpdt_record_typefunction resume_count_showfunction fpdt_address_validfunction fpdt_address_validfunction fpdt_process_subtablefunction acpi_init_fpdtmodule init acpi_init_fpdt
Annotated Snippet
struct fpdt_subtable_entry {
u16 type; /* refer to enum fpdt_subtable_type */
u8 length;
u8 revision;
u32 reserved;
u64 address; /* physical address of the S3PT/FBPT table */
};
struct fpdt_subtable_header {
u32 signature;
u32 length;
};
enum fpdt_record_type {
RECORD_S3_RESUME,
RECORD_S3_SUSPEND,
RECORD_BOOT,
};
struct fpdt_record_header {
u16 type; /* refer to enum fpdt_record_type */
u8 length;
u8 revision;
};
struct resume_performance_record {
struct fpdt_record_header header;
u32 resume_count;
u64 resume_prev;
u64 resume_avg;
} __attribute__((packed));
struct boot_performance_record {
struct fpdt_record_header header;
u32 reserved;
u64 firmware_start;
u64 bootloader_load;
u64 bootloader_launch;
u64 exitbootservice_start;
u64 exitbootservice_end;
} __attribute__((packed));
struct suspend_performance_record {
struct fpdt_record_header header;
u64 suspend_start;
u64 suspend_end;
} __attribute__((packed));
static struct resume_performance_record *record_resume;
static struct suspend_performance_record *record_suspend;
static struct boot_performance_record *record_boot;
#define FPDT_ATTR(phase, name) \
static ssize_t name##_show(struct kobject *kobj, \
struct kobj_attribute *attr, char *buf) \
{ \
return sprintf(buf, "%llu\n", record_##phase->name); \
} \
static struct kobj_attribute name##_attr = \
__ATTR(name##_ns, 0444, name##_show, NULL)
FPDT_ATTR(resume, resume_prev);
FPDT_ATTR(resume, resume_avg);
FPDT_ATTR(suspend, suspend_start);
FPDT_ATTR(suspend, suspend_end);
FPDT_ATTR(boot, firmware_start);
FPDT_ATTR(boot, bootloader_load);
FPDT_ATTR(boot, bootloader_launch);
FPDT_ATTR(boot, exitbootservice_start);
FPDT_ATTR(boot, exitbootservice_end);
static ssize_t resume_count_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return sprintf(buf, "%u\n", record_resume->resume_count);
}
static struct kobj_attribute resume_count_attr =
__ATTR_RO(resume_count);
static struct attribute *resume_attrs[] = {
&resume_count_attr.attr,
&resume_prev_attr.attr,
&resume_avg_attr.attr,
NULL
};
static const struct attribute_group resume_attr_group = {
.attrs = resume_attrs,
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/processor.h`.
- Detected declarations: `struct fpdt_subtable_entry`, `struct fpdt_subtable_header`, `struct fpdt_record_header`, `struct resume_performance_record`, `struct boot_performance_record`, `struct suspend_performance_record`, `enum fpdt_subtable_type`, `enum fpdt_record_type`, `function resume_count_show`, `function fpdt_address_valid`.
- 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.