Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef __IO_FIP_H__ |
| 8 | #define __IO_FIP_H__ |
| 9 | |
| 10 | #include <assert.h> |
| 11 | |
| 12 | struct io_dev_connector; |
| 13 | |
| 14 | int register_io_dev_fip(const struct io_dev_connector **dev_con); |
| 15 | |
| 16 | enum { |
| 17 | /* Non-Trusted Updater Firmware NS_BL1U */ |
| 18 | NS_BL1U_IMAGE_ID = 16, |
| 19 | |
| 20 | /* Trusted FWU Certificate */ |
| 21 | FWU_CERT_ID, |
| 22 | |
| 23 | /* SCP Firmware SCP_BL2U */ |
| 24 | SCP_BL2U_IMAGE_ID, |
| 25 | |
| 26 | /* Trusted Updater Firmware BL2U */ |
| 27 | BL2U_IMAGE_ID, |
| 28 | |
| 29 | /* Non-Trusted Updater Firmware NS_BL2U */ |
| 30 | NS_BL2U_IMAGE_ID, |
| 31 | |
| 32 | /* FWU Firmware Image Package */ |
| 33 | FWU_FIP_IMAGE_ID |
| 34 | }; |
| 35 | |
| 36 | static inline const char *get_image_name(unsigned int image_id) |
| 37 | { |
| 38 | static const char *image_names[] = { |
| 39 | "Non-Trusted Updater Firmware (NS_BL1U)", |
| 40 | "Trusted FWU Certificate", |
| 41 | "SCP Firmware (SCP_BL2U)", |
| 42 | "Trusted Updater Firmware (BL2U)", |
| 43 | "Non-Trusted Updater Firmware (NS_BL2U)" |
| 44 | "FWU Firmware Image Package", |
| 45 | }; |
| 46 | assert((image_id >= NS_BL1U_IMAGE_ID) && (image_id <= FWU_FIP_IMAGE_ID)); |
| 47 | return image_names[image_id - NS_BL1U_IMAGE_ID]; |
| 48 | } |
| 49 | |
| 50 | #endif /* __IO_FIP_H__ */ |