Antonio Nino Diaz | 7e1e5e8 | 2018-12-05 14:38:15 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef CACTUS_DEF_H |
| 8 | #define CACTUS_DEF_H |
| 9 | |
| 10 | #include <utils_def.h> |
| 11 | |
| 12 | /* |
| 13 | * Layout of the Secure Partition image. |
| 14 | */ |
| 15 | |
| 16 | /* Up to 2 MiB at an arbitrary address that doesn't overlap the devices. */ |
| 17 | #define CACTUS_IMAGE_BASE ULL(0x80000000) |
| 18 | #define CACTUS_IMAGE_SIZE ULL(0x200000) |
| 19 | |
| 20 | /* Memory shared between EL3 and S-EL0 (64 KiB). */ |
| 21 | #define CACTUS_SPM_BUF_BASE (CACTUS_IMAGE_BASE + CACTUS_IMAGE_SIZE) |
| 22 | #define CACTUS_SPM_BUF_SIZE ULL(0x10000) |
| 23 | |
| 24 | /* Memory shared between Normal world and S-EL0 (64 KiB). */ |
| 25 | #define CACTUS_NS_BUF_BASE (CACTUS_SPM_BUF_BASE + CACTUS_SPM_BUF_SIZE) |
| 26 | #define CACTUS_NS_BUF_SIZE ULL(0x10000) |
| 27 | |
| 28 | /* Memory area used by tests (128 KiB). */ |
| 29 | #define CACTUS_TEST_MEM_BASE (CACTUS_NS_BUF_BASE + CACTUS_NS_BUF_SIZE) |
| 30 | #define CACTUS_TEST_MEM_SIZE ULL(0x20000) |
| 31 | |
| 32 | /* |
| 33 | * UUIDs of Secure Services provided by Cactus |
| 34 | */ |
| 35 | |
| 36 | #define CACTUS_SERVICE1_UUID U(0x01234567), U(0x89ABCDEF), U(0x76543210), U(0xFEDCBA98) |
| 37 | #define CACTUS_SERVICE2_UUID U(0x0A1B2C3D), U(0x4E5F6789), U(0x55AA00FF), U(0x0F1E2D3C) |
| 38 | #define CACTUS_INVALID_UUID U(0x1), U(0x2), U(0x3), U(0x4) |
| 39 | |
| 40 | #define CACTUS_SERVICE1_UUID_RD U(0x01234567) U(0x89ABCDEF) U(0x76543210) U(0xFEDCBA98) |
| 41 | #define CACTUS_SERVICE2_UUID_RD U(0x0A1B2C3D) U(0x4E5F6789) U(0x55AA00FF) U(0x0F1E2D3C) |
| 42 | #define CACTUS_INVALID_UUID_RD U(0x1) U(0x2) U(0x3) U(0x4) |
| 43 | |
| 44 | /* |
| 45 | * Service IDs |
| 46 | */ |
| 47 | |
| 48 | /* Print a magic number unique to Cactus and return */ |
| 49 | #define CACTUS_PRINT_MAGIC U(1) |
| 50 | /* Return a magic number unique to Cactus */ |
| 51 | #define CACTUS_GET_MAGIC U(2) |
| 52 | |
| 53 | #define CACTUS_MAGIC_NUMBER U(0x12481369) |
| 54 | |
| 55 | #endif /* CACTUS_DEF_H */ |