drivers/platform/x86/intel/ifs/ifs.h
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel/ifs/ifs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel/ifs/ifs.h- Extension
.h- Size
- 11669 bytes
- Lines
- 418
- Domain
- Driver Families
- Bucket
- drivers/platform
- 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/device.hlinux/miscdevice.h
Detected Declarations
struct ifs_test_capsstruct ifs_test_msrsstruct ifs_datastruct ifs_workstruct ifs_device
Annotated Snippet
struct ifs_test_caps {
int integrity_cap_bit;
int test_num;
char image_suffix[IFS_SUFFIX_SZ];
};
/**
* struct ifs_test_msrs - MSRs used in IFS tests
* @copy_hashes: Copy test hash data
* @copy_hashes_status: Status of copied test hash data
* @copy_chunks: Copy chunks of the test data
* @copy_chunks_status: Status of the copied test data chunks
* @test_ctrl: Control the test attributes
*/
struct ifs_test_msrs {
u32 copy_hashes;
u32 copy_hashes_status;
u32 copy_chunks;
u32 copy_chunks_status;
u32 test_ctrl;
};
/**
* struct ifs_data - attributes related to intel IFS driver
* @loaded_version: stores the currently loaded ifs image version.
* @loaded: If a valid test binary has been loaded into the memory
* @loading_error: Error occurred on another CPU while loading image
* @valid_chunks: number of chunks which could be validated.
* @status: it holds simple status pass/fail/untested
* @scan_details: opaque scan status code from h/w
* @cur_batch: number indicating the currently loaded test file
* @generation: IFS test generation enumerated by hardware
* @chunk_size: size of a test chunk
* @array_gen: test generation of array test
* @max_bundle: maximum bundle index
*/
struct ifs_data {
int loaded_version;
bool loaded;
bool loading_error;
int valid_chunks;
int status;
u64 scan_details;
u32 cur_batch;
u32 generation;
u32 chunk_size;
u32 array_gen;
u32 max_bundle;
};
struct ifs_work {
struct work_struct w;
struct device *dev;
};
struct ifs_device {
const struct ifs_test_caps *test_caps;
const struct ifs_test_msrs *test_msrs;
struct ifs_data rw_data;
struct miscdevice misc;
};
static inline struct ifs_data *ifs_get_data(struct device *dev)
{
struct miscdevice *m = dev_get_drvdata(dev);
struct ifs_device *d = container_of(m, struct ifs_device, misc);
return &d->rw_data;
}
static inline const struct ifs_test_caps *ifs_get_test_caps(struct device *dev)
{
struct miscdevice *m = dev_get_drvdata(dev);
struct ifs_device *d = container_of(m, struct ifs_device, misc);
return d->test_caps;
}
static inline const struct ifs_test_msrs *ifs_get_test_msrs(struct device *dev)
{
struct miscdevice *m = dev_get_drvdata(dev);
struct ifs_device *d = container_of(m, struct ifs_device, misc);
return d->test_msrs;
}
extern bool *ifs_pkg_auth;
int ifs_load_firmware(struct device *dev);
int do_core_test(int cpu, struct device *dev);
extern struct attribute *plat_ifs_attrs[];
Annotation
- Immediate include surface: `linux/device.h`, `linux/miscdevice.h`.
- Detected declarations: `struct ifs_test_caps`, `struct ifs_test_msrs`, `struct ifs_data`, `struct ifs_work`, `struct ifs_device`.
- Atlas domain: Driver Families / drivers/platform.
- 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.