Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 1 | /* |
laurenw-arm | cbf6154 | 2022-04-21 16:36:26 -0500 | [diff] [blame] | 2 | * Copyright (c) 2014-2022, 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 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef FIRMWARE_IMAGE_PACKAGE_H |
| 8 | #define FIRMWARE_IMAGE_PACKAGE_H |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 9 | |
| 10 | #include <stdint.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 11 | |
| 12 | #include "uuid.h" |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 13 | |
| 14 | /* This is used as a signature to validate the blob header */ |
| 15 | #define TOC_HEADER_NAME 0xAA640001 |
| 16 | |
| 17 | |
| 18 | /* ToC Entry UUIDs */ |
Yatharth Kochar | 4dd39b8 | 2015-08-10 11:57:41 +0100 | [diff] [blame] | 19 | #define UUID_TRUSTED_UPDATE_FIRMWARE_SCP_BL2U \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 20 | {{0x65, 0x92, 0x27, 0x03}, {0x2f, 0x74}, {0xe6, 0x44}, 0x8d, 0xff, {0x57, 0x9a, 0xc1, 0xff, 0x06, 0x10} } |
Yatharth Kochar | 4dd39b8 | 2015-08-10 11:57:41 +0100 | [diff] [blame] | 21 | #define UUID_TRUSTED_UPDATE_FIRMWARE_BL2U \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 22 | {{0x60, 0xb3, 0xeb, 0x37}, {0xc1, 0xe5}, {0xea, 0x41}, 0x9d, 0xf3, {0x19, 0xed, 0xa1, 0x1f, 0x68, 0x01} } |
Yatharth Kochar | 4dd39b8 | 2015-08-10 11:57:41 +0100 | [diff] [blame] | 23 | #define UUID_TRUSTED_UPDATE_FIRMWARE_NS_BL2U \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 24 | {{0x4f, 0x51, 0x1d, 0x11}, {0x2b, 0xe5}, {0x4e, 0x49}, 0xb4, 0xc5, {0x83, 0xc2, 0xf7, 0x15, 0x84, 0x0a} } |
Yatharth Kochar | 4dd39b8 | 2015-08-10 11:57:41 +0100 | [diff] [blame] | 25 | #define UUID_TRUSTED_FWU_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 26 | {{0x71, 0x40, 0x8a, 0xb2}, {0x18, 0xd6}, {0x87, 0x4c}, 0x8b, 0x2e, {0xc6, 0xdc, 0xcd, 0x50, 0xf0, 0x96} } |
laurenw-arm | cbf6154 | 2022-04-21 16:36:26 -0500 | [diff] [blame] | 27 | #define UUID_CCA_CONTENT_CERT \ |
| 28 | {{0x36, 0xd8, 0x3d, 0x85}, {0x76, 0x1d}, {0x4d, 0xaf}, 0x96, 0xf1, {0xcd, 0x99, 0xd6, 0x56, 0x9b, 0x00} } |
| 29 | #define UUID_CORE_SWD_KEY_CERT \ |
| 30 | {{0x52, 0x22, 0x2d, 0x31}, {0x82, 0x0f}, {0x49, 0x4d}, 0x8b, 0xbc, {0xea, 0x68, 0x25, 0xd3, 0xc3, 0x5a} } |
| 31 | #define UUID_PLAT_KEY_CERT \ |
| 32 | {{0xd4, 0x3c, 0xd9, 0x02}, {0x5b, 0x9f}, {0x41, 0x2e}, 0x8a, 0xc6, {0x92, 0xb6, 0xd1, 0x8b, 0xe6, 0x0d} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 33 | #define UUID_TRUSTED_BOOT_FIRMWARE_BL2 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 34 | {{0x5f, 0xf9, 0xec, 0x0b}, {0x4d, 0x22}, {0x3e, 0x4d}, 0xa5, 0x44, {0xc3, 0x9d, 0x81, 0xc7, 0x3f, 0x0a} } |
Juan Castillo | a72b647 | 2015-12-10 15:49:17 +0000 | [diff] [blame] | 35 | #define UUID_SCP_FIRMWARE_SCP_BL2 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 36 | {{0x97, 0x66, 0xfd, 0x3d}, {0x89, 0xbe}, {0xe8, 0x49}, 0xae, 0x5d, {0x78, 0xa1, 0x40, 0x60, 0x82, 0x13} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 37 | #define UUID_EL3_RUNTIME_FIRMWARE_BL31 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 38 | {{0x47, 0xd4, 0x08, 0x6d}, {0x4c, 0xfe}, {0x98, 0x46}, 0x9b, 0x95, {0x29, 0x50, 0xcb, 0xbd, 0x5a, 0x00} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 39 | #define UUID_SECURE_PAYLOAD_BL32 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 40 | {{0x05, 0xd0, 0xe1, 0x89}, {0x53, 0xdc}, {0x13, 0x47}, 0x8d, 0x2b, {0x50, 0x0a, 0x4b, 0x7a, 0x3e, 0x38} } |
Summer Qin | 8072678 | 2017-04-20 16:28:39 +0100 | [diff] [blame] | 41 | #define UUID_SECURE_PAYLOAD_BL32_EXTRA1 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 42 | {{0x0b, 0x70, 0xc2, 0x9b}, {0x2a, 0x5a}, {0x78, 0x40}, 0x9f, 0x65, {0x0a, 0x56, 0x82, 0x73, 0x82, 0x88} } |
Summer Qin | 8072678 | 2017-04-20 16:28:39 +0100 | [diff] [blame] | 43 | #define UUID_SECURE_PAYLOAD_BL32_EXTRA2 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 44 | {{0x8e, 0xa8, 0x7b, 0xb1}, {0xcf, 0xa2}, {0x3f, 0x4d}, 0x85, 0xfd, {0xe7, 0xbb, 0xa5, 0x02, 0x20, 0xd9} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 45 | #define UUID_NON_TRUSTED_FIRMWARE_BL33 \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 46 | {{0xd6, 0xd0, 0xee, 0xa7}, {0xfc, 0xea}, {0xd5, 0x4b}, 0x97, 0x82, {0x99, 0x34, 0xf2, 0x34, 0xb6, 0xe4} } |
Zelalem Aweke | 4d37db8 | 2021-07-11 18:33:20 -0500 | [diff] [blame] | 47 | #define UUID_REALM_MONITOR_MGMT_FIRMWARE \ |
| 48 | {{0x6c, 0x07, 0x62, 0xa6}, {0x12, 0xf2}, {0x4b, 0x56}, 0x92, 0xcb, {0xba, 0x8f, 0x63, 0x36, 0x06, 0xd9} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 49 | /* Key certificates */ |
| 50 | #define UUID_ROT_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 51 | {{0x86, 0x2d, 0x1d, 0x72}, {0xf8, 0x60}, {0xe4, 0x11}, 0x92, 0x0b, {0x8b, 0xe7, 0x62, 0x16, 0x0f, 0x24} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 52 | #define UUID_TRUSTED_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 53 | {{0x82, 0x7e, 0xe8, 0x90}, {0xf8, 0x60}, {0xe4, 0x11}, 0xa1, 0xb4, {0x77, 0x7a, 0x21, 0xb4, 0xf9, 0x4c} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 54 | #define UUID_NON_TRUSTED_WORLD_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 55 | {{0x1c, 0x67, 0x87, 0x3d}, {0x5f, 0x63}, {0xe4, 0x11}, 0x97, 0x8d, {0x27, 0xc0, 0xc7, 0x14, 0x8a, 0xbd} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 56 | #define UUID_SCP_FW_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 57 | {{0x02, 0x42, 0x21, 0xa1}, {0xf8, 0x60}, {0xe4, 0x11}, 0x8d, 0x9b, {0xf3, 0x3c, 0x0e, 0x15, 0xa0, 0x14} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 58 | #define UUID_SOC_FW_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 59 | {{0x8a, 0xb8, 0xbe, 0xcc}, {0xf9, 0x60}, {0xe4, 0x11}, 0x9a, 0xd0, {0xeb, 0x48, 0x22, 0xd8, 0xdc, 0xf8} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 60 | #define UUID_TRUSTED_OS_FW_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 61 | {{0x94, 0x77, 0xd6, 0x03}, {0xfb, 0x60}, {0xe4, 0x11}, 0x85, 0xdd, {0xb7, 0x10, 0x5b, 0x8c, 0xee, 0x04} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 62 | #define UUID_NON_TRUSTED_FW_KEY_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 63 | {{0x8a, 0xd5, 0x83, 0x2a}, {0xfb, 0x60}, {0xe4, 0x11}, 0x8a, 0xaf, {0xdf, 0x30, 0xbb, 0xc4, 0x98, 0x59} } |
Juan Castillo | 379954c | 2014-11-04 17:36:40 +0000 | [diff] [blame] | 64 | /* Content certificates */ |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 65 | #define UUID_TRUSTED_BOOT_FW_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 66 | {{0xd6, 0xe2, 0x69, 0xea}, {0x5d, 0x63}, {0xe4, 0x11}, 0x8d, 0x8c, {0x9f, 0xba, 0xbe, 0x99, 0x56, 0xa5} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 67 | #define UUID_SCP_FW_CONTENT_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 68 | {{0x44, 0xbe, 0x6f, 0x04}, {0x5e, 0x63}, {0xe4, 0x11}, 0xb2, 0x8b, {0x73, 0xd8, 0xea, 0xae, 0x96, 0x56} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 69 | #define UUID_SOC_FW_CONTENT_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 70 | {{0xe2, 0xb2, 0x0c, 0x20}, {0x5e, 0x63}, {0xe4, 0x11}, 0x9c, 0xe8, {0xab, 0xcc, 0xf9, 0x2b, 0xb6, 0x66} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 71 | #define UUID_TRUSTED_OS_FW_CONTENT_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 72 | {{0xa4, 0x9f, 0x44, 0x11}, {0x5e, 0x63}, {0xe4, 0x11}, 0x87, 0x28, {0x3f, 0x05, 0x72, 0x2a, 0xf3, 0x3d} } |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 73 | #define UUID_NON_TRUSTED_FW_CONTENT_CERT \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 74 | {{0x8e, 0xc4, 0xc1, 0xf3}, {0x5d, 0x63}, {0xe4, 0x11}, 0xa7, 0xa9, {0x87, 0xee, 0x40, 0xb2, 0x3f, 0xa7} } |
Manish Pandey | 0a65884 | 2020-05-22 12:27:28 +0100 | [diff] [blame] | 75 | #define UUID_SIP_SECURE_PARTITION_CONTENT_CERT \ |
| 76 | {{0x77, 0x6d, 0xfd, 0x44}, {0x86, 0x97}, {0x4c, 0x3b}, 0x91, 0xeb, {0xc1, 0x3e, 0x02, 0x5a, 0x2a, 0x6f} } |
Manish Pandey | 3f0d7af | 2020-07-24 16:43:54 +0100 | [diff] [blame] | 77 | #define UUID_PLAT_SECURE_PARTITION_CONTENT_CERT \ |
| 78 | {{0xdd, 0xcb, 0xbf, 0x4a}, {0xca, 0xd6}, {0x11, 0xea}, 0x87, 0xd0, {0x02, 0x42, 0xac, 0x13, 0x00, 0x03} } |
Soby Mathew | 2ffb473 | 2017-11-07 16:50:31 +0000 | [diff] [blame] | 79 | /* Dynamic configs */ |
| 80 | #define UUID_HW_CONFIG \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 81 | {{0x08, 0xb8, 0xf1, 0xd9}, {0xc9, 0xcf}, {0x93, 0x49}, 0xa9, 0x62, {0x6f, 0xbc, 0x6b, 0x72, 0x65, 0xcc} } |
Soby Mathew | 2ffb473 | 2017-11-07 16:50:31 +0000 | [diff] [blame] | 82 | #define UUID_TB_FW_CONFIG \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 83 | {{0x6c, 0x04, 0x58, 0xff}, {0xaf, 0x6b}, {0x7d, 0x4f}, 0x82, 0xed, {0xaa, 0x27, 0xbc, 0x69, 0xbf, 0xd2} } |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 84 | #define UUID_SOC_FW_CONFIG \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 85 | {{0x99, 0x79, 0x81, 0x4b}, {0x03, 0x76}, {0xfb, 0x46}, 0x8c, 0x8e, {0x8d, 0x26, 0x7f, 0x78, 0x59, 0xe0} } |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 86 | #define UUID_TOS_FW_CONFIG \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 87 | {{0x26, 0x25, 0x7c, 0x1a}, {0xdb, 0xc6}, {0x7f, 0x47}, 0x8d, 0x96, {0xc4, 0xc4, 0xb0, 0x24, 0x80, 0x21} } |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 88 | #define UUID_NT_FW_CONFIG \ |
Roberto Vargas | eace8f1 | 2018-04-26 13:36:53 +0100 | [diff] [blame] | 89 | {{0x28, 0xda, 0x98, 0x15}, {0x93, 0xe8}, {0x7e, 0x44}, 0xac, 0x66, {0x1a, 0xaf, 0x80, 0x15, 0x50, 0xf9} } |
Manish V Badarkhe | e9207d6 | 2020-06-11 21:02:03 +0100 | [diff] [blame] | 90 | #define UUID_FW_CONFIG \ |
| 91 | {{0x58, 0x07, 0xe1, 0x6a}, {0x84, 0x59}, {0x47, 0xbe}, 0x8e, 0xd5, {0x64, 0x8e, 0x8d, 0xdd, 0xab, 0x0e} } |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 92 | |
Pankaj Gupta | e4aa1bd | 2020-12-09 14:02:38 +0530 | [diff] [blame] | 93 | #ifdef PLAT_DEF_FIP_UUID |
| 94 | #include <plat_def_fip_uuid.h> |
| 95 | #endif |
| 96 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 97 | typedef struct fip_toc_header { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 98 | uint32_t name; |
| 99 | uint32_t serial_number; |
| 100 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 101 | } fip_toc_header_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 102 | |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 103 | typedef struct fip_toc_entry { |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 104 | uuid_t uuid; |
| 105 | uint64_t offset_address; |
| 106 | uint64_t size; |
| 107 | uint64_t flags; |
Dan Handley | e2712bc | 2014-04-10 15:37:22 +0100 | [diff] [blame] | 108 | } fip_toc_entry_t; |
Harry Liebel | f58ad36 | 2014-01-10 18:00:33 +0000 | [diff] [blame] | 109 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 110 | #endif /* FIRMWARE_IMAGE_PACKAGE_H */ |