1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2023 Intel Corporation
6 #ifndef _INTEL_GSC_BINARY_HEADERS_H_
7 #define _INTEL_GSC_BINARY_HEADERS_H_
9 #include <linux/types.h>
11 /* Code partition directory (CPD) structures */
12 struct intel_gsc_cpd_header_v2 {
14 #define INTEL_GSC_CPD_HEADER_MARKER 0x44504324
19 u8 header_length; /* in bytes */
25 struct intel_gsc_cpd_entry {
29 * Bits 0-24: offset from the beginning of the code partition
30 * Bit 25: huffman compressed
31 * Bits 26-31: reserved
34 #define INTEL_GSC_CPD_ENTRY_OFFSET_MASK GENMASK(24, 0)
35 #define INTEL_GSC_CPD_ENTRY_HUFFMAN_COMP BIT(25)
38 * Module/Item length, in bytes. For Huffman-compressed modules, this
39 * refers to the uncompressed size. For software-compressed modules,
40 * this refers to the compressed size.
47 struct intel_gsc_version {
54 struct intel_gsc_manifest_header {
55 u32 header_type; /* 0x4 for manifest type */
56 u32 header_length; /* in dwords */
61 u32 size; /* In dwords, size of entire manifest (header + extensions) */
64 struct intel_gsc_version fw_version;
66 struct intel_gsc_version meu_kit_version;
67 u32 meu_manifest_version;
70 u32 modulus_size; /* in dwords */
71 u32 exponent_size; /* in dwords */