tools/arch/x86/intel_sdsi/intel_sdsi.c
Source file repositories/reference/linux-study-clean/tools/arch/x86/intel_sdsi/intel_sdsi.c
File Facts
- System
- Linux kernel
- Corpus path
tools/arch/x86/intel_sdsi/intel_sdsi.c- Extension
.c- Size
- 22221 bytes
- Lines
- 871
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dirent.herrno.hfcntl.hgetopt.hstdbool.hstdio.hstdint.hstdlib.hstring.hunistd.hsys/types.h
Detected Declarations
struct nvram_content_auth_err_stsstruct enabled_featuresstruct key_provision_statusstruct auth_fail_countstruct availabilitystruct nvram_update_limitstruct sdsi_regsstruct state_certificatestruct license_key_infostruct license_blob_contentstruct bundle_encodingstruct meter_certificatestruct bundle_encoding_counterstruct sdsi_devenum commandfunction sdsi_list_devicesfunction sdsi_update_registersfunction sdsi_read_regfunction get_featurefunction sdsi_meter_cert_showfunction sdsi_state_cert_showfunction sdsi_provisionfunction sdsi_provision_akcfunction sdsi_provision_capfunction read_sysfs_datafunction sdsi_free_devfunction usagefunction show_helpfunction main
Annotated Snippet
struct nvram_content_auth_err_sts {
uint64_t reserved:3;
uint64_t sdsi_content_auth_err:1;
uint64_t reserved1:1;
uint64_t sdsi_metering_auth_err:1;
uint64_t reserved2:58;
};
struct enabled_features {
uint64_t reserved:3;
uint64_t sdsi:1;
uint64_t reserved1:8;
uint64_t attestation:1;
uint64_t reserved2:13;
uint64_t metering:1;
uint64_t reserved3:37;
};
struct key_provision_status {
uint64_t reserved:1;
uint64_t license_key_provisioned:1;
uint64_t reserved2:62;
};
struct auth_fail_count {
uint64_t key_failure_count:3;
uint64_t key_failure_threshold:3;
uint64_t auth_failure_count:3;
uint64_t auth_failure_threshold:3;
uint64_t reserved:52;
};
struct availability {
uint64_t reserved:48;
uint64_t available:3;
uint64_t threshold:3;
uint64_t reserved2:10;
};
struct nvram_update_limit {
uint64_t reserved:12;
uint64_t sdsi_50_pct:1;
uint64_t sdsi_75_pct:1;
uint64_t sdsi_90_pct:1;
uint64_t reserved2:49;
};
struct sdsi_regs {
uint64_t ppin;
struct nvram_content_auth_err_sts auth_err_sts;
struct enabled_features en_features;
struct key_provision_status key_prov_sts;
struct auth_fail_count auth_fail_count;
struct availability prov_avail;
struct nvram_update_limit limits;
uint64_t pcu_cr3_capid_cfg;
union {
struct {
uint64_t socket_id;
} v1;
struct {
uint64_t reserved;
uint64_t socket_id;
uint64_t reserved2;
} v2;
} extra;
};
#define CONTENT_TYPE_LK_ENC 0xD
#define CONTENT_TYPE_LK_BLOB_ENC 0xE
struct state_certificate {
uint32_t content_type;
uint32_t region_rev_id;
uint32_t header_size;
uint32_t total_size;
uint32_t key_size;
uint32_t num_licenses;
};
struct license_key_info {
uint32_t key_rev_id;
uint64_t key_image_content[6];
} __packed;
#define LICENSE_BLOB_SIZE(l) (((l) & 0x7fffffff) * 4)
#define LICENSE_VALID(l) (!!((l) & 0x80000000))
// License Group Types
#define LBT_ONE_TIME_UPGRADE 1
#define LBT_METERED_UPGRADE 2
Annotation
- Immediate include surface: `dirent.h`, `errno.h`, `fcntl.h`, `getopt.h`, `stdbool.h`, `stdio.h`, `stdint.h`, `stdlib.h`.
- Detected declarations: `struct nvram_content_auth_err_sts`, `struct enabled_features`, `struct key_provision_status`, `struct auth_fail_count`, `struct availability`, `struct nvram_update_limit`, `struct sdsi_regs`, `struct state_certificate`, `struct license_key_info`, `struct license_blob_content`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.