blob: f4554ecc608437cf76bb69ffba74efed6a67df09 [file] [log] [blame]
Harry Liebelf58ad362014-01-10 18:00:33 +00001/*
2 * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef __FIRMWARE_IMAGE_PACKAGE_H__
32#define __FIRMWARE_IMAGE_PACKAGE_H__
33
34#include <stdint.h>
35#include <uuid.h>
36
37/* This is used as a signature to validate the blob header */
38#define TOC_HEADER_NAME 0xAA640001
39
40
41/* ToC Entry UUIDs */
42#define UUID_TRUSTED_BOOT_FIRMWARE_BL2 \
43 {0x0becf95f, 0x224d, 0x4d3e, 0xa5, 0x44, {0xc3, 0x9d, 0x81, 0xc7, 0x3f, 0x0a} }
44#define UUID_SCP_FIRMWARE_BL30 \
45 {0x3dfd6697, 0xbe89, 0x49e8, 0xae, 0x5d, {0x78, 0xa1, 0x40, 0x60, 0x82, 0x13} }
46#define UUID_EL3_RUNTIME_FIRMWARE_BL31 \
47 {0x6d08d447, 0xfe4c, 0x4698, 0x9b, 0x95, {0x29, 0x50, 0xcb, 0xbd, 0x5a, 0x00} }
48#define UUID_SECURE_PAYLOAD_BL32 \
49 {0x89e1d005, 0xdc53, 0x4713, 0x8d, 0x2b, {0x50, 0x0a, 0x4b, 0x7a, 0x3e, 0x38} }
50#define UUID_NON_TRUSTED_FIRMWARE_BL33 \
51 {0xa7eed0d6, 0xeafc, 0x4bd5, 0x97, 0x82, {0x99, 0x34, 0xf2, 0x34, 0xb6, 0xe4} }
52
Dan Handleye2712bc2014-04-10 15:37:22 +010053typedef struct fip_toc_header {
Harry Liebelf58ad362014-01-10 18:00:33 +000054 uint32_t name;
55 uint32_t serial_number;
56 uint64_t flags;
Dan Handleye2712bc2014-04-10 15:37:22 +010057} fip_toc_header_t;
Harry Liebelf58ad362014-01-10 18:00:33 +000058
Dan Handleye2712bc2014-04-10 15:37:22 +010059typedef struct fip_toc_entry {
Harry Liebelf58ad362014-01-10 18:00:33 +000060 uuid_t uuid;
61 uint64_t offset_address;
62 uint64_t size;
63 uint64_t flags;
Dan Handleye2712bc2014-04-10 15:37:22 +010064} fip_toc_entry_t;
Harry Liebelf58ad362014-01-10 18:00:33 +000065
66#endif /* __FIRMWARE_IMAGE_PACKAGE_H__ */