1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2019-2021 Xilinx, Inc.
4 * Copyright(c) 2016-2019 Solarflare Communications Inc.
8 * This is NOT the original source file. Do NOT edit it.
9 * To update the image layout headers, please edit the copy in
10 * the sfregistry repo and then, in that repo,
11 * "make layout_headers" or "make export" to
12 * regenerate and export all types of headers.
15 /* These structures define the layouts for the signed firmware image binary
16 * saved in NVRAM. The original image is in the Cryptographic message
17 * syntax (CMS) format which contains the bootable firmware binary plus the
18 * signatures. The entire image is written into NVRAM to enable the firmware
19 * to validate the signatures. However, the bootrom still requires the
20 * bootable-image to start at offset 0 of the NVRAM partition. Hence the image
21 * is parsed upfront by host utilities (sfupdate) and written into nvram as
22 * 'signed_image_chunks' described by a header.
24 * This file is used by the MC as well as host-utilities (sfupdate).
28 #ifndef CI_MGMT_SIGNED_IMAGE_LAYOUT_H
29 #define CI_MGMT_SIGNED_IMAGE_LAYOUT_H
31 /* Signed image chunk type identifiers */
33 SIGNED_IMAGE_CHUNK_CMS_HEADER, /* CMS header describing the signed data */
34 SIGNED_IMAGE_CHUNK_REFLASH_HEADER, /* Reflash header */
35 SIGNED_IMAGE_CHUNK_IMAGE, /* Bootable binary image */
36 SIGNED_IMAGE_CHUNK_REFLASH_TRAILER, /* Reflash trailer */
37 SIGNED_IMAGE_CHUNK_SIGNATURE, /* Remaining contents of the signed image,
38 * including the certifiates and signature */
39 NUM_SIGNED_IMAGE_CHUNKS,
43 #define SIGNED_IMAGE_CHUNK_HDR_MAGIC 0xEF105161 /* EF10 SIGned Image */
45 /* Initial version definition - version 1 */
46 #define SIGNED_IMAGE_CHUNK_HDR_VERSION 0x1
48 /* Header length is 32 bytes */
49 #define SIGNED_IMAGE_CHUNK_HDR_LEN 32
50 /* Structure describing the header of each chunk of signed image
53 typedef struct signed_image_chunk_hdr_e {
54 /* Magic field to recognise a valid entry
55 * should match SIGNED_IMAGE_CHUNK_HDR_MAGIC
58 /* Version number of this header */
60 /* Chunk type identifier */
66 /* Reserved for future expansion of this structure - always set to zeros */
68 } signed_image_chunk_hdr_t;
70 #endif /* CI_MGMT_SIGNED_IMAGE_LAYOUT_H */