Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 1 | /* |
| 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} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 52 | /* Key certificates */ |
| 53 | #define UUID_ROT_KEY_CERT \ |
| 54 | {0x721d2d86, 0x60f8, 0x11e4, 0x92, 0x0b, {0x8b, 0xe7, 0x62, 0x16, 0x0f, 0x24} } |
| 55 | #define UUID_TRUSTED_KEY_CERT \ |
| 56 | {0x90e87e82, 0x60f8, 0x11e4, 0xa1, 0xb4, {0x77, 0x7a, 0x21, 0xb4, 0xf9, 0x4c} } |
| 57 | #define UUID_NON_TRUSTED_WORLD_KEY_CERT \ |
| 58 | {0x3d87671c, 0x635f, 0x11e4, 0x97, 0x8d, {0x27, 0xc0, 0xc7, 0x14, 0x8a, 0xbd} } |
| 59 | #define UUID_SCP_FIRMWARE_BL30_KEY_CERT \ |
| 60 | {0xa1214202, 0x60f8, 0x11e4, 0x8d, 0x9b, {0xf3, 0x3c, 0x0e, 0x15, 0xa0, 0x14} } |
| 61 | #define UUID_EL3_RUNTIME_FIRMWARE_BL31_KEY_CERT \ |
| 62 | {0xccbeb88a, 0x60f9, 0x11e4, 0x9a, 0xd0, {0xeb, 0x48, 0x22, 0xd8, 0xdc, 0xf8} } |
| 63 | #define UUID_SECURE_PAYLOAD_BL32_KEY_CERT \ |
| 64 | {0x03d67794, 0x60fb, 0x11e4, 0x85, 0xdd, {0xb7, 0x10, 0x5b, 0x8c, 0xee, 0x04} } |
| 65 | #define UUID_NON_TRUSTED_FIRMWARE_BL33_KEY_CERT \ |
| 66 | {0x2a83d58a, 0x60fb, 0x11e4, 0x8a, 0xaf, {0xdf, 0x30, 0xbb, 0xc4, 0x98, 0x59} } |
| 67 | /* Content certificates */ |
| 68 | #define UUID_TRUSTED_BOOT_FIRMWARE_BL2_CERT \ |
| 69 | {0xea69e2d6, 0x635d, 0x11e4, 0x8d, 0x8c, {0x9f, 0xba, 0xbe, 0x99, 0x56, 0xa5} } |
| 70 | #define UUID_SCP_FIRMWARE_BL30_CERT \ |
| 71 | {0x046fbe44, 0x635e, 0x11e4, 0xb2, 0x8b, {0x73, 0xd8, 0xea, 0xae, 0x96, 0x56} } |
| 72 | #define UUID_EL3_RUNTIME_FIRMWARE_BL31_CERT \ |
| 73 | {0x200cb2e2, 0x635e, 0x11e4, 0x9c, 0xe8, {0xab, 0xcc, 0xf9, 0x2b, 0xb6, 0x66} } |
| 74 | #define UUID_SECURE_PAYLOAD_BL32_CERT \ |
| 75 | {0x11449fa4, 0x635e, 0x11e4, 0x87, 0x28, {0x3f, 0x05, 0x72, 0x2a, 0xf3, 0x3d} } |
| 76 | #define UUID_NON_TRUSTED_FIRMWARE_BL33_CERT \ |
| 77 | {0xf3c1c48e, 0x635d, 0x11e4, 0xa7, 0xa9, {0x87, 0xee, 0x40, 0xb2, 0x3f, 0xa7} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 78 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 79 | typedef struct fip_toc_header { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 80 | uint32_t name; |
| 81 | uint32_t serial_number; |
| 82 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 83 | } fip_toc_header_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 84 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 85 | typedef struct fip_toc_entry { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 86 | uuid_t uuid; |
| 87 | uint64_t offset_address; |
| 88 | uint64_t size; |
| 89 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 90 | } fip_toc_entry_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 91 | |
| 92 | #endif /* __FIRMWARE_IMAGE_PACKAGE_H__ */ |