include/linux/platform_data/x86/simatic-ipc.h
Source file repositories/reference/linux-study-clean/include/linux/platform_data/x86/simatic-ipc.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/platform_data/x86/simatic-ipc.h- Extension
.h- Size
- 2203 bytes
- Lines
- 80
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dmi.hlinux/platform_data/x86/simatic-ipc-base.h
Detected Declarations
enum simatic_ipc_station_idsfunction simatic_ipc_get_station_idfunction simatic_ipc_find_dmi_entry_helper
Annotated Snippet
#ifndef __PLATFORM_DATA_X86_SIMATIC_IPC_H
#define __PLATFORM_DATA_X86_SIMATIC_IPC_H
#include <linux/dmi.h>
#include <linux/platform_data/x86/simatic-ipc-base.h>
#define SIMATIC_IPC_DMI_ENTRY_OEM 129
/* binary type */
#define SIMATIC_IPC_DMI_TYPE 0xff
#define SIMATIC_IPC_DMI_GROUP 0x05
#define SIMATIC_IPC_DMI_ENTRY 0x02
#define SIMATIC_IPC_DMI_TID 0x02
enum simatic_ipc_station_ids {
SIMATIC_IPC_INVALID_STATION_ID = 0,
SIMATIC_IPC_IPC227D = 0x00000501,
SIMATIC_IPC_IPC427D = 0x00000701,
SIMATIC_IPC_IPC227E = 0x00000901,
SIMATIC_IPC_IPC277E = 0x00000902,
SIMATIC_IPC_IPC427E = 0x00000A01,
SIMATIC_IPC_IPC477E = 0x00000A02,
SIMATIC_IPC_IPC127E = 0x00000D01,
SIMATIC_IPC_IPC227G = 0x00000F01,
SIMATIC_IPC_IPC277G = 0x00000F02,
SIMATIC_IPC_IPCBX_39A = 0x00001001,
SIMATIC_IPC_IPCPX_39A = 0x00001002,
SIMATIC_IPC_IPCBX_21A = 0x00001101,
SIMATIC_IPC_IPCBX_56A = 0x00001201,
SIMATIC_IPC_IPCBX_59A = 0x00001202,
};
static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len)
{
struct {
u8 type; /* type (0xff = binary) */
u8 len; /* len of data entry */
u8 group;
u8 entry;
u8 tid;
__le32 station_id; /* station id (LE) */
} __packed * data_entry = (void *)data + sizeof(struct dmi_header);
while ((u8 *)data_entry < data + max_len) {
if (data_entry->type == SIMATIC_IPC_DMI_TYPE &&
data_entry->len == sizeof(*data_entry) &&
data_entry->group == SIMATIC_IPC_DMI_GROUP &&
data_entry->entry == SIMATIC_IPC_DMI_ENTRY &&
data_entry->tid == SIMATIC_IPC_DMI_TID) {
return le32_to_cpu(data_entry->station_id);
}
data_entry = (void *)((u8 *)(data_entry) + data_entry->len);
}
return SIMATIC_IPC_INVALID_STATION_ID;
}
static inline void
simatic_ipc_find_dmi_entry_helper(const struct dmi_header *dh, void *_data)
{
u32 *id = _data;
if (dh->type != SIMATIC_IPC_DMI_ENTRY_OEM)
return;
*id = simatic_ipc_get_station_id((u8 *)dh, dh->length);
}
#endif /* __PLATFORM_DATA_X86_SIMATIC_IPC_H */
Annotation
- Immediate include surface: `linux/dmi.h`, `linux/platform_data/x86/simatic-ipc-base.h`.
- Detected declarations: `enum simatic_ipc_station_ids`, `function simatic_ipc_get_station_id`, `function simatic_ipc_find_dmi_entry_helper`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.