Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 1 | /* |
Soby Mathew | 2ffb473 | 2017-11-07 16:50:31 +0000 | [diff] [blame] | 2 | * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __FIRMWARE_IMAGE_PACKAGE_H__ |
| 8 | #define __FIRMWARE_IMAGE_PACKAGE_H__ |
| 9 | |
| 10 | #include <stdint.h> |
| 11 | #include <uuid.h> |
| 12 | |
| 13 | /* This is used as a signature to validate the blob header */ |
| 14 | #define TOC_HEADER_NAME 0xAA640001 |
| 15 | |
| 16 | |
| 17 | /* ToC Entry UUIDs */ |
Yatharth Kochar | 4dd39b8 | 2015-08-10 11:57:41 +0100 | [diff] [blame] | 18 | #define UUID_TRUSTED_UPDATE_FIRMWARE_SCP_BL2U \ |
| 19 | {0x03279265, 0x742f, 0x44e6, 0x8d, 0xff, {0x57, 0x9a, 0xc1, 0xff, 0x06, 0x10} } |
| 20 | #define UUID_TRUSTED_UPDATE_FIRMWARE_BL2U \ |
| 21 | {0x37ebb360, 0xe5c1, 0x41ea, 0x9d, 0xf3, {0x19, 0xed, 0xa1, 0x1f, 0x68, 0x01} } |
| 22 | #define UUID_TRUSTED_UPDATE_FIRMWARE_NS_BL2U \ |
| 23 | {0x111d514f, 0xe52b, 0x494e, 0xb4, 0xc5, {0x83, 0xc2, 0xf7, 0x15, 0x84, 0x0a} } |
| 24 | #define UUID_TRUSTED_FWU_CERT \ |
| 25 | {0xb28a4071, 0xd618, 0x4c87, 0x8b, 0x2e, {0xc6, 0xdc, 0xcd, 0x50, 0xf0, 0x96} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 26 | #define UUID_TRUSTED_BOOT_FIRMWARE_BL2 \ |
| 27 | {0x0becf95f, 0x224d, 0x4d3e, 0xa5, 0x44, {0xc3, 0x9d, 0x81, 0xc7, 0x3f, 0x0a} } |
Juan Castillo | a72b647 | 2015-12-10 15:49:17 +0000 | [diff] [blame] | 28 | #define UUID_SCP_FIRMWARE_SCP_BL2 \ |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 29 | {0x3dfd6697, 0xbe89, 0x49e8, 0xae, 0x5d, {0x78, 0xa1, 0x40, 0x60, 0x82, 0x13} } |
| 30 | #define UUID_EL3_RUNTIME_FIRMWARE_BL31 \ |
| 31 | {0x6d08d447, 0xfe4c, 0x4698, 0x9b, 0x95, {0x29, 0x50, 0xcb, 0xbd, 0x5a, 0x00} } |
| 32 | #define UUID_SECURE_PAYLOAD_BL32 \ |
| 33 | {0x89e1d005, 0xdc53, 0x4713, 0x8d, 0x2b, {0x50, 0x0a, 0x4b, 0x7a, 0x3e, 0x38} } |
Summer Qin | 8072678 | 2017-04-20 16:28:39 +0100 | [diff] [blame] | 34 | #define UUID_SECURE_PAYLOAD_BL32_EXTRA1 \ |
| 35 | {0x9bc2700b, 0x5a2a, 0x4078, 0x9f, 0x65, {0x0a, 0x56, 0x82, 0x73, 0x82, 0x88} } |
| 36 | #define UUID_SECURE_PAYLOAD_BL32_EXTRA2 \ |
| 37 | {0xb17ba88e, 0xa2cf, 0x4d3f, 0x85, 0xfd, {0xe7, 0xbb, 0xa5, 0x02, 0x20, 0xd9} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 38 | #define UUID_NON_TRUSTED_FIRMWARE_BL33 \ |
| 39 | {0xa7eed0d6, 0xeafc, 0x4bd5, 0x97, 0x82, {0x99, 0x34, 0xf2, 0x34, 0xb6, 0xe4} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 40 | /* Key certificates */ |
| 41 | #define UUID_ROT_KEY_CERT \ |
| 42 | {0x721d2d86, 0x60f8, 0x11e4, 0x92, 0x0b, {0x8b, 0xe7, 0x62, 0x16, 0x0f, 0x24} } |
| 43 | #define UUID_TRUSTED_KEY_CERT \ |
| 44 | {0x90e87e82, 0x60f8, 0x11e4, 0xa1, 0xb4, {0x77, 0x7a, 0x21, 0xb4, 0xf9, 0x4c} } |
| 45 | #define UUID_NON_TRUSTED_WORLD_KEY_CERT \ |
| 46 | {0x3d87671c, 0x635f, 0x11e4, 0x97, 0x8d, {0x27, 0xc0, 0xc7, 0x14, 0x8a, 0xbd} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 47 | #define UUID_SCP_FW_KEY_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 48 | {0xa1214202, 0x60f8, 0x11e4, 0x8d, 0x9b, {0xf3, 0x3c, 0x0e, 0x15, 0xa0, 0x14} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 49 | #define UUID_SOC_FW_KEY_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 50 | {0xccbeb88a, 0x60f9, 0x11e4, 0x9a, 0xd0, {0xeb, 0x48, 0x22, 0xd8, 0xdc, 0xf8} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 51 | #define UUID_TRUSTED_OS_FW_KEY_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 52 | {0x03d67794, 0x60fb, 0x11e4, 0x85, 0xdd, {0xb7, 0x10, 0x5b, 0x8c, 0xee, 0x04} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 53 | #define UUID_NON_TRUSTED_FW_KEY_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 54 | {0x2a83d58a, 0x60fb, 0x11e4, 0x8a, 0xaf, {0xdf, 0x30, 0xbb, 0xc4, 0x98, 0x59} } |
| 55 | /* Content certificates */ |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 56 | #define UUID_TRUSTED_BOOT_FW_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 57 | {0xea69e2d6, 0x635d, 0x11e4, 0x8d, 0x8c, {0x9f, 0xba, 0xbe, 0x99, 0x56, 0xa5} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 58 | #define UUID_SCP_FW_CONTENT_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 59 | {0x046fbe44, 0x635e, 0x11e4, 0xb2, 0x8b, {0x73, 0xd8, 0xea, 0xae, 0x96, 0x56} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 60 | #define UUID_SOC_FW_CONTENT_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 61 | {0x200cb2e2, 0x635e, 0x11e4, 0x9c, 0xe8, {0xab, 0xcc, 0xf9, 0x2b, 0xb6, 0x66} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 62 | #define UUID_TRUSTED_OS_FW_CONTENT_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 63 | {0x11449fa4, 0x635e, 0x11e4, 0x87, 0x28, {0x3f, 0x05, 0x72, 0x2a, 0xf3, 0x3d} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 64 | #define UUID_NON_TRUSTED_FW_CONTENT_CERT \ |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 65 | {0xf3c1c48e, 0x635d, 0x11e4, 0xa7, 0xa9, {0x87, 0xee, 0x40, 0xb2, 0x3f, 0xa7} } |
Soby Mathew | 2ffb473 | 2017-11-07 16:50:31 +0000 | [diff] [blame] | 66 | /* Dynamic configs */ |
| 67 | #define UUID_HW_CONFIG \ |
| 68 | {0xd9f1b808, 0xcfc9, 0x4993, 0xa9, 0x62, {0x6f, 0xbc, 0x6b, 0x72, 0x65, 0xcc} } |
| 69 | #define UUID_TB_FW_CONFIG \ |
| 70 | {0xff58046c, 0x6baf, 0x4f7d, 0x82, 0xed, {0xaa, 0x27, 0xbc, 0x69, 0xbf, 0xd2} } |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 71 | #define UUID_SOC_FW_CONFIG \ |
| 72 | {0x4b817999, 0x7603, 0x46fb, 0x8c, 0x8e, {0x8d, 0x26, 0x7f, 0x78, 0x59, 0xe0} } |
| 73 | #define UUID_TOS_FW_CONFIG \ |
| 74 | {0x1a7c2526, 0xc6bd, 0x477f, 0x8d, 0x96, {0xc4, 0xc4, 0xb0, 0x24, 0x80, 0x21} } |
| 75 | #define UUID_NT_FW_CONFIG \ |
| 76 | {0x1598da28, 0xe893, 0x447e, 0xac, 0x66, {0x1a, 0xaf, 0x80, 0x15, 0x50, 0xf9} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 77 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 78 | typedef struct fip_toc_header { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 79 | uint32_t name; |
| 80 | uint32_t serial_number; |
| 81 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 82 | } fip_toc_header_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 83 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 84 | typedef struct fip_toc_entry { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 85 | uuid_t uuid; |
| 86 | uint64_t offset_address; |
| 87 | uint64_t size; |
| 88 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 89 | } fip_toc_entry_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 90 | |
| 91 | #endif /* __FIRMWARE_IMAGE_PACKAGE_H__ */ |