blob: 74dddc645f3cb4c7f4bf3b2ea523f55f368bf98b [file] [log] [blame]
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +03001/*
2 * Copyright (C) 2018 Marvell International Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
6 */
7
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00008#ifndef MSS_SCP_BL2_FORMAT_H
9#define MSS_SCP_BL2_FORMAT_H
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030010
Grzegorz Jaszczykf618f182019-04-04 14:38:55 +020011#define MAX_NR_OF_FILES 8
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030012#define FILE_MAGIC 0xddd01ff
13#define HEADER_VERSION 0x1
14
15#define MSS_IDRAM_SIZE 0x10000 /* 64KB */
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030016
17/* Types definitions */
18typedef struct file_header {
19 /* Magic specific for concatenated file (used for validation) */
20 uint32_t magic;
21 uint32_t nr_of_imgs; /* Number of images concatenated */
22} file_header_t;
23
24/* Types definitions */
25enum cm3_t {
26 MSS_AP,
27 MSS_CP0,
28 MSS_CP1,
29 MSS_CP2,
30 MSS_CP3,
31 MG_CP0,
32 MG_CP1,
Grzegorz Jaszczykf618f182019-04-04 14:38:55 +020033 MG_CP2,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030034};
35
36typedef struct img_header {
37 uint32_t type; /* CM3 type, can be one of cm3_t */
38 uint32_t length; /* Image length */
39 uint32_t version; /* For sanity checks and future
40 * extended functionality
41 */
42} img_header_t;
43
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000044#endif /* MSS_SCP_BL2_FORMAT_H */