diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/console.h | 6 | ||||
-rw-r--r-- | include/lib/aarch32/arch.h | 7 | ||||
-rw-r--r-- | include/lib/aarch64/arch.h | 7 | ||||
-rw-r--r-- | include/lib/aarch64/setjmp.h | 59 | ||||
-rw-r--r-- | include/lib/smccc.h | 19 | ||||
-rw-r--r-- | include/lib/utils_def.h | 26 | ||||
-rw-r--r-- | include/lib/xlat_tables/xlat_tables.h | 72 | ||||
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_v2.h | 93 | ||||
-rw-r--r-- | include/plat/arm/board/common/board_arm_def.h | 4 | ||||
-rw-r--r-- | include/plat/arm/common/arm_def.h | 2 | ||||
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 6 | ||||
-rw-r--r-- | include/services/sdei.h | 11 | ||||
-rw-r--r-- | include/services/spm_svc.h | 3 | ||||
-rw-r--r-- | include/tools_share/firmware_image_package.h | 56 | ||||
-rw-r--r-- | include/tools_share/uuid.h | 6 |
15 files changed, 257 insertions, 120 deletions
diff --git a/include/drivers/console.h b/include/drivers/console.h index a4d89fe91..6e7ebbf9c 100644 --- a/include/drivers/console.h +++ b/include/drivers/console.h @@ -16,9 +16,9 @@ #define CONSOLE_T_FLUSH (U(4) * REGSZ) #define CONSOLE_T_DRVDATA (U(5) * REGSZ) -#define CONSOLE_FLAG_BOOT BIT(0) -#define CONSOLE_FLAG_RUNTIME BIT(1) -#define CONSOLE_FLAG_CRASH BIT(2) +#define CONSOLE_FLAG_BOOT (U(1) << 0) +#define CONSOLE_FLAG_RUNTIME (U(1) << 1) +#define CONSOLE_FLAG_CRASH (U(1) << 2) /* Bits 3 to 7 reserved for additional scopes in future expansion. */ #define CONSOLE_FLAG_SCOPE_MASK ((U(1) << 8) - 1) /* Bits 8 to 31 reserved for non-scope use in future expansion. */ diff --git a/include/lib/aarch32/arch.h b/include/lib/aarch32/arch.h index 3624cc689..910341a72 100644 --- a/include/lib/aarch32/arch.h +++ b/include/lib/aarch32/arch.h @@ -379,6 +379,7 @@ * Definitions of register offsets and fields in the CNTCTLBase Frame of the * system level implementation of the Generic Timer. ******************************************************************************/ +#define CNTCTLBASE_CNTFRQ U(0x0) #define CNTNSAR 0x4 #define CNTNSAR_NS_SHIFT(x) (x) @@ -390,6 +391,12 @@ #define CNTACR_RWVT_SHIFT 0x4 #define CNTACR_RWPT_SHIFT 0x5 +/******************************************************************************* + * Definitions of register offsets in the CNTBaseN Frame of the + * system level implementation of the Generic Timer. + ******************************************************************************/ +#define CNTBASE_CNTFRQ U(0x10) + /* MAIR macros */ #define MAIR0_ATTR_SET(attr, index) ((attr) << ((index) << 3)) #define MAIR1_ATTR_SET(attr, index) ((attr) << (((index) - 3) << 3)) diff --git a/include/lib/aarch64/arch.h b/include/lib/aarch64/arch.h index 92bb97d51..7cc4b2377 100644 --- a/include/lib/aarch64/arch.h +++ b/include/lib/aarch64/arch.h @@ -554,6 +554,7 @@ * Definitions of register offsets and fields in the CNTCTLBase Frame of the * system level implementation of the Generic Timer. ******************************************************************************/ +#define CNTCTLBASE_CNTFRQ U(0x0) #define CNTNSAR U(0x4) #define CNTNSAR_NS_SHIFT(x) (x) @@ -565,6 +566,12 @@ #define CNTACR_RWVT_SHIFT U(0x4) #define CNTACR_RWPT_SHIFT U(0x5) +/******************************************************************************* + * Definitions of register offsets in the CNTBaseN Frame of the + * system level implementation of the Generic Timer. + ******************************************************************************/ +#define CNTBASE_CNTFRQ U(0x10) + /* PMCR_EL0 definitions */ #define PMCR_EL0_RESET_VAL U(0x0) #define PMCR_EL0_N_SHIFT U(11) diff --git a/include/lib/aarch64/setjmp.h b/include/lib/aarch64/setjmp.h new file mode 100644 index 000000000..c65810d82 --- /dev/null +++ b/include/lib/aarch64/setjmp.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef __JMP_H__ +#define __JMP_H__ + +#define JMP_CTX_X19 0x0 +#define JMP_CTX_X21 0x10 +#define JMP_CTX_X23 0x20 +#define JMP_CTX_X25 0x30 +#define JMP_CTX_X27 0x40 +#define JMP_CTX_X29 0x50 +#define JMP_CTX_SP 0x60 +#define JMP_CTX_END 0x70 + +#define JMP_SIZE (JMP_CTX_END >> 3) + +#ifndef __ASSEMBLY__ + +#include <stdint.h> + +/* Jump buffer hosting x18 - x30 and sp_el0 registers */ +struct jmpbuf { + uint64_t buf[JMP_SIZE]; +} __aligned(16); + + +/* + * Set a jump point, and populate the jump buffer with context information so + * that longjmp() can jump later. The caller must adhere to the following + * conditions: + * + * - After calling this function, the stack must not be shrunk. The contents of + * the stack must not be changed either. + * + * - If the caller were to 'return', the buffer must be considered invalid, and + * must not be used with longjmp(). + * + * The caller will observe this function returning at two distinct + * circumstances, each with different return values: + * + * - Zero, when the buffer is setup; + * + * - Non-zero, when a call to longjmp() is made (presumably by one of the + * callee functions) with the same jump buffer. + */ +int setjmp(struct jmpbuf *buf); + +/* + * Reset execution to a jump point, and restore context information according to + * the jump buffer populated by setjmp(). + */ +void longjmp(struct jmpbuf *buf); + +#endif /* __ASSEMBLY__ */ +#endif /* __JMP_H__ */ diff --git a/include/lib/smccc.h b/include/lib/smccc.h index 660c1dbd2..cb722b0e2 100644 --- a/include/lib/smccc.h +++ b/include/lib/smccc.h @@ -57,6 +57,7 @@ * does not equal SMC_UNK. This is to ensure that the caller won't mistake the * returned UUID in x0 for an invalid SMC error return */ +#if !ERROR_DEPRECATED #define DEFINE_SVC_UUID(_name, _tl, _tm, _th, _cl, _ch, \ _n0, _n1, _n2, _n3, _n4, _n5) \ CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\ @@ -64,6 +65,24 @@ _tl, _tm, _th, _cl, _ch, \ { _n0, _n1, _n2, _n3, _n4, _n5 } \ } +#endif + + +#define DEFINE_SVC_UUID2(_name, _tl, _tm, _th, _cl, _ch, \ + _n0, _n1, _n2, _n3, _n4, _n5) \ + CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\ + static const uuid_t _name = { \ + {(_tl >> 24) & 0xFF, \ + (_tl >> 16) & 0xFF, \ + (_tl >> 8) & 0xFF, \ + (_tl & 0xFF)}, \ + {(_tm >> 8) & 0xFF, \ + (_tm & 0xFF)}, \ + {(_th >> 8) & 0xFF, \ + (_th & 0xFF)}, \ + _cl, _ch, \ + { _n0, _n1, _n2, _n3, _n4, _n5 } \ + } #endif /*__ASSEMBLY__*/ #endif /* __SMCCC_H__ */ diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h index 31b129454..7335103b1 100644 --- a/include/lib/utils_def.h +++ b/include/lib/utils_def.h @@ -16,7 +16,31 @@ #define SIZE_FROM_LOG2_WORDS(n) (4 << (n)) -#define BIT(nr) (ULL(1) << (nr)) +#define BIT_32(nr) (U(1) << (nr)) +#define BIT_64(nr) (ULL(1) << (nr)) + +#ifdef AARCH32 +#define BIT BIT_32 +#else +#define BIT BIT_64 +#endif + +/* + * Create a contiguous bitmask starting at bit position @l and ending at + * position @h. For example + * GENMASK_64(39, 21) gives us the 64bit vector 0x000000ffffe00000. + */ +#define GENMASK_32(h, l) \ + (((~UINT32_C(0)) << (l)) & (~UINT32_C(0) >> (32 - 1 - (h)))) + +#define GENMASK_64(h, l) \ + (((~UINT64_C(0)) << (l)) & (~UINT64_C(0) >> (64 - 1 - (h)))) + +#ifdef AARCH32 +#define GENMASK GENMASK_32 +#else +#define GENMASK GENMASK_64 +#endif /* * This variant of div_round_up can be used in macro definition but should not diff --git a/include/lib/xlat_tables/xlat_tables.h b/include/lib/xlat_tables/xlat_tables.h index 91f2f055b..c017e193d 100644 --- a/include/lib/xlat_tables/xlat_tables.h +++ b/include/lib/xlat_tables/xlat_tables.h @@ -25,7 +25,7 @@ #define MAP_REGION(pa, va, sz, attr) {(pa), (va), (sz), (attr)} /* - * Shifts and masks to access fields of an mmap_attr_t + * Shifts and masks to access fields of an mmap attribute */ #define MT_TYPE_MASK U(0x7) #define MT_TYPE(_attr) ((_attr) & MT_TYPE_MASK) @@ -39,37 +39,41 @@ /* * Memory mapping attributes */ -typedef enum { - /* - * Memory types supported. - * These are organised so that, going down the list, the memory types - * are getting weaker; conversely going up the list the memory types are - * getting stronger. - */ - MT_DEVICE, - MT_NON_CACHEABLE, - MT_MEMORY, - /* Values up to 7 are reserved to add new memory types in the future */ - - MT_RO = U(0) << MT_PERM_SHIFT, - MT_RW = U(1) << MT_PERM_SHIFT, - - MT_SECURE = U(0) << MT_SEC_SHIFT, - MT_NS = U(1) << MT_SEC_SHIFT, - - /* - * Access permissions for instruction execution are only relevant for - * normal read-only memory, i.e. MT_MEMORY | MT_RO. They are ignored - * (and potentially overridden) otherwise: - * - Device memory is always marked as execute-never. - * - Read-write normal memory is always marked as execute-never. - */ - MT_EXECUTE = U(0) << MT_EXECUTE_SHIFT, - MT_EXECUTE_NEVER = U(1) << MT_EXECUTE_SHIFT, -} mmap_attr_t; - -#define MT_CODE (MT_MEMORY | MT_RO | MT_EXECUTE) -#define MT_RO_DATA (MT_MEMORY | MT_RO | MT_EXECUTE_NEVER) + +/* + * Memory types supported. + * These are organised so that, going down the list, the memory types are + * getting weaker; conversely going up the list the memory types are getting + * stronger. + */ +#define MT_DEVICE U(0) +#define MT_NON_CACHEABLE U(1) +#define MT_MEMORY U(2) +/* Values up to 7 are reserved to add new memory types in the future */ + +#define MT_RO (U(0) << MT_PERM_SHIFT) +#define MT_RW (U(1) << MT_PERM_SHIFT) + +#define MT_SECURE (U(0) << MT_SEC_SHIFT) +#define MT_NS (U(1) << MT_SEC_SHIFT) + +/* + * Access permissions for instruction execution are only relevant for normal + * read-only memory, i.e. MT_MEMORY | MT_RO. They are ignored (and potentially + * overridden) otherwise: + * - Device memory is always marked as execute-never. + * - Read-write normal memory is always marked as execute-never. + */ +#define MT_EXECUTE (U(0) << MT_EXECUTE_SHIFT) +#define MT_EXECUTE_NEVER (U(1) << MT_EXECUTE_SHIFT) + +/* Compound attributes for most common usages */ +#define MT_CODE (MT_MEMORY | MT_RO | MT_EXECUTE) +#define MT_RO_DATA (MT_MEMORY | MT_RO | MT_EXECUTE_NEVER) + +#if !ERROR_DEPRECATED +typedef unsigned int mmap_attr_t; +#endif /* * Structure for specifying a single region of memory. @@ -78,13 +82,13 @@ typedef struct mmap_region { unsigned long long base_pa; uintptr_t base_va; size_t size; - mmap_attr_t attr; + unsigned int attr; } mmap_region_t; /* Generic translation table APIs */ void init_xlat_tables(void); void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, - size_t size, mmap_attr_t attr); + size_t size, unsigned int attr); void mmap_add(const mmap_region_t *mm); #endif /*__ASSEMBLY__*/ diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h index b2379454d..98f00d715 100644 --- a/include/lib/xlat_tables/xlat_tables_v2.h +++ b/include/lib/xlat_tables/xlat_tables_v2.h @@ -47,7 +47,7 @@ _MAP_REGION_FULL_SPEC(_pa, _va, _sz, _attr, _gr) /* - * Shifts and masks to access fields of an mmap_attr_t + * Shifts and masks to access fields of an mmap attribute */ #define MT_TYPE_MASK U(0x7) #define MT_TYPE(_attr) ((_attr) & MT_TYPE_MASK) @@ -57,57 +57,56 @@ #define MT_SEC_SHIFT U(4) /* Access permissions for instruction execution (EXECUTE/EXECUTE_NEVER) */ #define MT_EXECUTE_SHIFT U(5) -/* - * In the EL1&0 translation regime, mark the region as User (EL0) or - * Privileged (EL1). In the EL3 translation regime this has no effect. - */ +/* In the EL1&0 translation regime, User (EL0) or Privileged (EL1). */ #define MT_USER_SHIFT U(6) /* All other bits are reserved */ /* * Memory mapping attributes */ -typedef enum { - /* - * Memory types supported. - * These are organised so that, going down the list, the memory types - * are getting weaker; conversely going up the list the memory types are - * getting stronger. - */ - MT_DEVICE, - MT_NON_CACHEABLE, - MT_MEMORY, - /* Values up to 7 are reserved to add new memory types in the future */ - - MT_RO = U(0) << MT_PERM_SHIFT, - MT_RW = U(1) << MT_PERM_SHIFT, - - MT_SECURE = U(0) << MT_SEC_SHIFT, - MT_NS = U(1) << MT_SEC_SHIFT, - - /* - * Access permissions for instruction execution are only relevant for - * normal read-only memory, i.e. MT_MEMORY | MT_RO. They are ignored - * (and potentially overridden) otherwise: - * - Device memory is always marked as execute-never. - * - Read-write normal memory is always marked as execute-never. - */ - MT_EXECUTE = U(0) << MT_EXECUTE_SHIFT, - MT_EXECUTE_NEVER = U(1) << MT_EXECUTE_SHIFT, - - /* - * When mapping a region at EL0 or EL1, this attribute will be used to - * determine if a User mapping (EL0) will be created or a Privileged - * mapping (EL1). - */ - MT_USER = U(1) << MT_USER_SHIFT, - MT_PRIVILEGED = U(0) << MT_USER_SHIFT, -} mmap_attr_t; + +/* + * Memory types supported. + * These are organised so that, going down the list, the memory types are + * getting weaker; conversely going up the list the memory types are getting + * stronger. + */ +#define MT_DEVICE U(0) +#define MT_NON_CACHEABLE U(1) +#define MT_MEMORY U(2) +/* Values up to 7 are reserved to add new memory types in the future */ + +#define MT_RO (U(0) << MT_PERM_SHIFT) +#define MT_RW (U(1) << MT_PERM_SHIFT) + +#define MT_SECURE (U(0) << MT_SEC_SHIFT) +#define MT_NS (U(1) << MT_SEC_SHIFT) + +/* + * Access permissions for instruction execution are only relevant for normal + * read-only memory, i.e. MT_MEMORY | MT_RO. They are ignored (and potentially + * overridden) otherwise: + * - Device memory is always marked as execute-never. + * - Read-write normal memory is always marked as execute-never. + */ +#define MT_EXECUTE (U(0) << MT_EXECUTE_SHIFT) +#define MT_EXECUTE_NEVER (U(1) << MT_EXECUTE_SHIFT) + +/* + * When mapping a region at EL0 or EL1, this attribute will be used to determine + * if a User mapping (EL0) will be created or a Privileged mapping (EL1). + */ +#define MT_USER (U(1) << MT_USER_SHIFT) +#define MT_PRIVILEGED (U(0) << MT_USER_SHIFT) /* Compound attributes for most common usages */ -#define MT_CODE (MT_MEMORY | MT_RO | MT_EXECUTE) -#define MT_RO_DATA (MT_MEMORY | MT_RO | MT_EXECUTE_NEVER) -#define MT_RW_DATA (MT_MEMORY | MT_RW | MT_EXECUTE_NEVER) +#define MT_CODE (MT_MEMORY | MT_RO | MT_EXECUTE) +#define MT_RO_DATA (MT_MEMORY | MT_RO | MT_EXECUTE_NEVER) +#define MT_RW_DATA (MT_MEMORY | MT_RW | MT_EXECUTE_NEVER) + +#if !ERROR_DEPRECATED +typedef unsigned int mmap_attr_t; +#endif /* * Structure for specifying a single region of memory. @@ -116,7 +115,7 @@ typedef struct mmap_region { unsigned long long base_pa; uintptr_t base_va; size_t size; - mmap_attr_t attr; + unsigned int attr; /* Desired granularity. See the MAP_REGION2() macro for more details. */ size_t granularity; } mmap_region_t; @@ -213,7 +212,7 @@ void init_xlat_tables_ctx(xlat_ctx_t *ctx); * removed afterwards. */ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, - size_t size, mmap_attr_t attr); + size_t size, unsigned int attr); void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm); /* @@ -238,7 +237,7 @@ void mmap_add_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm); * EPERM: It overlaps another region in an invalid way. */ int mmap_add_dynamic_region(unsigned long long base_pa, uintptr_t base_va, - size_t size, mmap_attr_t attr); + size_t size, unsigned int attr); int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm); /* diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h index 6900fe66b..5e1d680ce 100644 --- a/include/plat/arm/board/common/board_arm_def.h +++ b/include/plat/arm/board/common/board_arm_def.h @@ -87,9 +87,9 @@ * little space for growth. */ #if TRUSTED_BOARD_BOOT -# define PLAT_ARM_MAX_BL2_SIZE 0x1E000 +# define PLAT_ARM_MAX_BL2_SIZE 0x1F000 #else -# define PLAT_ARM_MAX_BL2_SIZE 0x10000 +# define PLAT_ARM_MAX_BL2_SIZE 0x11000 #endif /* diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index e07156c00..e3d0edbce 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -258,6 +258,8 @@ #define ARM_SYS_CNTCTL_BASE 0x2a430000 #define ARM_SYS_CNTREAD_BASE 0x2a800000 #define ARM_SYS_TIMCTL_BASE 0x2a810000 +#define ARM_SYS_CNT_BASE_S 0x2a820000 +#define ARM_SYS_CNT_BASE_NS 0x2a830000 #define ARM_CONSOLE_BAUDRATE 115200 diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index fc3f4ec3a..33f2c7dbe 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -155,6 +155,12 @@ struct tzc_dmc500_driver_data; void arm_tzc_dmc500_setup(struct tzc_dmc500_driver_data *plat_driver_data, const arm_tzc_regions_info_t *tzc_regions); +/* Console utility functions */ +void arm_console_boot_init(void); +void arm_console_boot_end(void); +void arm_console_runtime_init(void); +void arm_console_runtime_end(void); + /* Systimer utility function */ void arm_configure_sys_timer(void); diff --git a/include/services/sdei.h b/include/services/sdei.h index ce9a008c5..79d1d065d 100644 --- a/include/services/sdei.h +++ b/include/services/sdei.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -52,6 +52,7 @@ #define _SDEI_MAPF_SIGNALABLE_SHIFT 3 #define _SDEI_MAPF_PRIVATE_SHIFT 4 #define _SDEI_MAPF_CRITICAL_SHIFT 5 +#define _SDEI_MAPF_EXPLICIT_SHIFT 6 /* SDEI event 0 */ #define SDEI_EVENT_0 0 @@ -81,9 +82,12 @@ */ #define SDEI_MAPF_DYNAMIC BIT(_SDEI_MAPF_DYNAMIC_SHIFT) #define SDEI_MAPF_BOUND BIT(_SDEI_MAPF_BOUND_SHIFT) +#define SDEI_MAPF_EXPLICIT BIT(_SDEI_MAPF_EXPLICIT_SHIFT) #define SDEI_MAPF_SIGNALABLE BIT(_SDEI_MAPF_SIGNALABLE_SHIFT) #define SDEI_MAPF_PRIVATE BIT(_SDEI_MAPF_PRIVATE_SHIFT) + +#define SDEI_MAPF_NORMAL 0 #define SDEI_MAPF_CRITICAL BIT(_SDEI_MAPF_CRITICAL_SHIFT) /* Indices of private and shared mappings */ @@ -114,6 +118,9 @@ #define SDEI_DEFINE_EVENT_0(_intr) \ SDEI_PRIVATE_EVENT(SDEI_EVENT_0, _intr, SDEI_MAPF_SIGNALABLE) +#define SDEI_EXPLICIT_EVENT(_event, _pri) \ + SDEI_EVENT_MAP(_event, 0, _pri | SDEI_MAPF_EXPLICIT | SDEI_MAPF_PRIVATE) + /* * Declare shared and private entries for each core. Also declare a global * structure containing private and share entries. @@ -176,6 +183,6 @@ uint64_t sdei_smc_handler(uint32_t smc_fid, void sdei_init(void); /* Public API to dispatch an event to Normal world */ -int sdei_dispatch_event(int ev_num, unsigned int preempted_sec_state); +int sdei_dispatch_event(int ev_num); #endif /* __SDEI_H__ */ diff --git a/include/services/spm_svc.h b/include/services/spm_svc.h index 8f872c39e..0200992c1 100644 --- a/include/services/spm_svc.h +++ b/include/services/spm_svc.h @@ -74,6 +74,9 @@ uint64_t spm_smc_handler(uint32_t smc_fid, void *handle, uint64_t flags); +/* Helper to enter a Secure Partition */ +uint64_t spm_sp_call(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3); + #endif /* __ASSEMBLY__ */ #endif /* __SPM_SVC_H__ */ diff --git a/include/tools_share/firmware_image_package.h b/include/tools_share/firmware_image_package.h index f25855523..b1ce56af6 100644 --- a/include/tools_share/firmware_image_package.h +++ b/include/tools_share/firmware_image_package.h @@ -16,64 +16,64 @@ /* ToC Entry UUIDs */ #define UUID_TRUSTED_UPDATE_FIRMWARE_SCP_BL2U \ - {0x03279265, 0x742f, 0x44e6, 0x8d, 0xff, {0x57, 0x9a, 0xc1, 0xff, 0x06, 0x10} } + {{0x65, 0x92, 0x27, 0x03}, {0x2f, 0x74}, {0xe6, 0x44}, 0x8d, 0xff, {0x57, 0x9a, 0xc1, 0xff, 0x06, 0x10} } #define UUID_TRUSTED_UPDATE_FIRMWARE_BL2U \ - {0x37ebb360, 0xe5c1, 0x41ea, 0x9d, 0xf3, {0x19, 0xed, 0xa1, 0x1f, 0x68, 0x01} } + {{0x60, 0xb3, 0xeb, 0x37}, {0xc1, 0xe5}, {0xea, 0x41}, 0x9d, 0xf3, {0x19, 0xed, 0xa1, 0x1f, 0x68, 0x01} } #define UUID_TRUSTED_UPDATE_FIRMWARE_NS_BL2U \ - {0x111d514f, 0xe52b, 0x494e, 0xb4, 0xc5, {0x83, 0xc2, 0xf7, 0x15, 0x84, 0x0a} } + {{0x4f, 0x51, 0x1d, 0x11}, {0x2b, 0xe5}, {0x4e, 0x49}, 0xb4, 0xc5, {0x83, 0xc2, 0xf7, 0x15, 0x84, 0x0a} } #define UUID_TRUSTED_FWU_CERT \ - {0xb28a4071, 0xd618, 0x4c87, 0x8b, 0x2e, {0xc6, 0xdc, 0xcd, 0x50, 0xf0, 0x96} } + {{0x71, 0x40, 0x8a, 0xb2}, {0x18, 0xd6}, {0x87, 0x4c}, 0x8b, 0x2e, {0xc6, 0xdc, 0xcd, 0x50, 0xf0, 0x96} } #define UUID_TRUSTED_BOOT_FIRMWARE_BL2 \ - {0x0becf95f, 0x224d, 0x4d3e, 0xa5, 0x44, {0xc3, 0x9d, 0x81, 0xc7, 0x3f, 0x0a} } + {{0x5f, 0xf9, 0xec, 0x0b}, {0x4d, 0x22}, {0x3e, 0x4d}, 0xa5, 0x44, {0xc3, 0x9d, 0x81, 0xc7, 0x3f, 0x0a} } #define UUID_SCP_FIRMWARE_SCP_BL2 \ - {0x3dfd6697, 0xbe89, 0x49e8, 0xae, 0x5d, {0x78, 0xa1, 0x40, 0x60, 0x82, 0x13} } + {{0x97, 0x66, 0xfd, 0x3d}, {0x89, 0xbe}, {0xe8, 0x49}, 0xae, 0x5d, {0x78, 0xa1, 0x40, 0x60, 0x82, 0x13} } #define UUID_EL3_RUNTIME_FIRMWARE_BL31 \ - {0x6d08d447, 0xfe4c, 0x4698, 0x9b, 0x95, {0x29, 0x50, 0xcb, 0xbd, 0x5a, 0x00} } + {{0x47, 0xd4, 0x08, 0x6d}, {0x4c, 0xfe}, {0x98, 0x46}, 0x9b, 0x95, {0x29, 0x50, 0xcb, 0xbd, 0x5a, 0x00} } #define UUID_SECURE_PAYLOAD_BL32 \ - {0x89e1d005, 0xdc53, 0x4713, 0x8d, 0x2b, {0x50, 0x0a, 0x4b, 0x7a, 0x3e, 0x38} } + {{0x05, 0xd0, 0xe1, 0x89}, {0x53, 0xdc}, {0x13, 0x47}, 0x8d, 0x2b, {0x50, 0x0a, 0x4b, 0x7a, 0x3e, 0x38} } #define UUID_SECURE_PAYLOAD_BL32_EXTRA1 \ - {0x9bc2700b, 0x5a2a, 0x4078, 0x9f, 0x65, {0x0a, 0x56, 0x82, 0x73, 0x82, 0x88} } + {{0x0b, 0x70, 0xc2, 0x9b}, {0x2a, 0x5a}, {0x78, 0x40}, 0x9f, 0x65, {0x0a, 0x56, 0x82, 0x73, 0x82, 0x88} } #define UUID_SECURE_PAYLOAD_BL32_EXTRA2 \ - {0xb17ba88e, 0xa2cf, 0x4d3f, 0x85, 0xfd, {0xe7, 0xbb, 0xa5, 0x02, 0x20, 0xd9} } + {{0x8e, 0xa8, 0x7b, 0xb1}, {0xcf, 0xa2}, {0x3f, 0x4d}, 0x85, 0xfd, {0xe7, 0xbb, 0xa5, 0x02, 0x20, 0xd9} } #define UUID_NON_TRUSTED_FIRMWARE_BL33 \ - {0xa7eed0d6, 0xeafc, 0x4bd5, 0x97, 0x82, {0x99, 0x34, 0xf2, 0x34, 0xb6, 0xe4} } + {{0xd6, 0xd0, 0xee, 0xa7}, {0xfc, 0xea}, {0xd5, 0x4b}, 0x97, 0x82, {0x99, 0x34, 0xf2, 0x34, 0xb6, 0xe4} } /* Key certificates */ #define UUID_ROT_KEY_CERT \ - {0x721d2d86, 0x60f8, 0x11e4, 0x92, 0x0b, {0x8b, 0xe7, 0x62, 0x16, 0x0f, 0x24} } + {{0x86, 0x2d, 0x1d, 0x72}, {0xf8, 0x60}, {0xe4, 0x11}, 0x92, 0x0b, {0x8b, 0xe7, 0x62, 0x16, 0x0f, 0x24} } #define UUID_TRUSTED_KEY_CERT \ - {0x90e87e82, 0x60f8, 0x11e4, 0xa1, 0xb4, {0x77, 0x7a, 0x21, 0xb4, 0xf9, 0x4c} } + {{0x82, 0x7e, 0xe8, 0x90}, {0xf8, 0x60}, {0xe4, 0x11}, 0xa1, 0xb4, {0x77, 0x7a, 0x21, 0xb4, 0xf9, 0x4c} } #define UUID_NON_TRUSTED_WORLD_KEY_CERT \ - {0x3d87671c, 0x635f, 0x11e4, 0x97, 0x8d, {0x27, 0xc0, 0xc7, 0x14, 0x8a, 0xbd} } + {{0x1c, 0x67, 0x87, 0x3d}, {0x5f, 0x63}, {0xe4, 0x11}, 0x97, 0x8d, {0x27, 0xc0, 0xc7, 0x14, 0x8a, 0xbd} } #define UUID_SCP_FW_KEY_CERT \ - {0xa1214202, 0x60f8, 0x11e4, 0x8d, 0x9b, {0xf3, 0x3c, 0x0e, 0x15, 0xa0, 0x14} } + {{0x02, 0x42, 0x21, 0xa1}, {0xf8, 0x60}, {0xe4, 0x11}, 0x8d, 0x9b, {0xf3, 0x3c, 0x0e, 0x15, 0xa0, 0x14} } #define UUID_SOC_FW_KEY_CERT \ - {0xccbeb88a, 0x60f9, 0x11e4, 0x9a, 0xd0, {0xeb, 0x48, 0x22, 0xd8, 0xdc, 0xf8} } + {{0x8a, 0xb8, 0xbe, 0xcc}, {0xf9, 0x60}, {0xe4, 0x11}, 0x9a, 0xd0, {0xeb, 0x48, 0x22, 0xd8, 0xdc, 0xf8} } #define UUID_TRUSTED_OS_FW_KEY_CERT \ - {0x03d67794, 0x60fb, 0x11e4, 0x85, 0xdd, {0xb7, 0x10, 0x5b, 0x8c, 0xee, 0x04} } + {{0x94, 0x77, 0xd6, 0x03}, {0xfb, 0x60}, {0xe4, 0x11}, 0x85, 0xdd, {0xb7, 0x10, 0x5b, 0x8c, 0xee, 0x04} } #define UUID_NON_TRUSTED_FW_KEY_CERT \ - {0x2a83d58a, 0x60fb, 0x11e4, 0x8a, 0xaf, {0xdf, 0x30, 0xbb, 0xc4, 0x98, 0x59} } + {{0x8a, 0xd5, 0x83, 0x2a}, {0xfb, 0x60}, {0xe4, 0x11}, 0x8a, 0xaf, {0xdf, 0x30, 0xbb, 0xc4, 0x98, 0x59} } /* Content certificates */ #define UUID_TRUSTED_BOOT_FW_CERT \ - {0xea69e2d6, 0x635d, 0x11e4, 0x8d, 0x8c, {0x9f, 0xba, 0xbe, 0x99, 0x56, 0xa5} } + {{0xd6, 0xe2, 0x69, 0xea}, {0x5d, 0x63}, {0xe4, 0x11}, 0x8d, 0x8c, {0x9f, 0xba, 0xbe, 0x99, 0x56, 0xa5} } #define UUID_SCP_FW_CONTENT_CERT \ - {0x046fbe44, 0x635e, 0x11e4, 0xb2, 0x8b, {0x73, 0xd8, 0xea, 0xae, 0x96, 0x56} } + {{0x44, 0xbe, 0x6f, 0x04}, {0x5e, 0x63}, {0xe4, 0x11}, 0xb2, 0x8b, {0x73, 0xd8, 0xea, 0xae, 0x96, 0x56} } #define UUID_SOC_FW_CONTENT_CERT \ - {0x200cb2e2, 0x635e, 0x11e4, 0x9c, 0xe8, {0xab, 0xcc, 0xf9, 0x2b, 0xb6, 0x66} } + {{0xe2, 0xb2, 0x0c, 0x20}, {0x5e, 0x63}, {0xe4, 0x11}, 0x9c, 0xe8, {0xab, 0xcc, 0xf9, 0x2b, 0xb6, 0x66} } #define UUID_TRUSTED_OS_FW_CONTENT_CERT \ - {0x11449fa4, 0x635e, 0x11e4, 0x87, 0x28, {0x3f, 0x05, 0x72, 0x2a, 0xf3, 0x3d} } + {{0xa4, 0x9f, 0x44, 0x11}, {0x5e, 0x63}, {0xe4, 0x11}, 0x87, 0x28, {0x3f, 0x05, 0x72, 0x2a, 0xf3, 0x3d} } #define UUID_NON_TRUSTED_FW_CONTENT_CERT \ - {0xf3c1c48e, 0x635d, 0x11e4, 0xa7, 0xa9, {0x87, 0xee, 0x40, 0xb2, 0x3f, 0xa7} } + {{0x8e, 0xc4, 0xc1, 0xf3}, {0x5d, 0x63}, {0xe4, 0x11}, 0xa7, 0xa9, {0x87, 0xee, 0x40, 0xb2, 0x3f, 0xa7} } /* Dynamic configs */ #define UUID_HW_CONFIG \ - {0xd9f1b808, 0xcfc9, 0x4993, 0xa9, 0x62, {0x6f, 0xbc, 0x6b, 0x72, 0x65, 0xcc} } + {{0x08, 0xb8, 0xf1, 0xd9}, {0xc9, 0xcf}, {0x93, 0x49}, 0xa9, 0x62, {0x6f, 0xbc, 0x6b, 0x72, 0x65, 0xcc} } #define UUID_TB_FW_CONFIG \ - {0xff58046c, 0x6baf, 0x4f7d, 0x82, 0xed, {0xaa, 0x27, 0xbc, 0x69, 0xbf, 0xd2} } + {{0x6c, 0x04, 0x58, 0xff}, {0xaf, 0x6b}, {0x7d, 0x4f}, 0x82, 0xed, {0xaa, 0x27, 0xbc, 0x69, 0xbf, 0xd2} } #define UUID_SOC_FW_CONFIG \ - {0x4b817999, 0x7603, 0x46fb, 0x8c, 0x8e, {0x8d, 0x26, 0x7f, 0x78, 0x59, 0xe0} } + {{0x99, 0x79, 0x81, 0x4b}, {0x03, 0x76}, {0xfb, 0x46}, 0x8c, 0x8e, {0x8d, 0x26, 0x7f, 0x78, 0x59, 0xe0} } #define UUID_TOS_FW_CONFIG \ - {0x1a7c2526, 0xc6bd, 0x477f, 0x8d, 0x96, {0xc4, 0xc4, 0xb0, 0x24, 0x80, 0x21} } + {{0x26, 0x25, 0x7c, 0x1a}, {0xdb, 0xc6}, {0x7f, 0x47}, 0x8d, 0x96, {0xc4, 0xc4, 0xb0, 0x24, 0x80, 0x21} } #define UUID_NT_FW_CONFIG \ - {0x1598da28, 0xe893, 0x447e, 0xac, 0x66, {0x1a, 0xaf, 0x80, 0x15, 0x50, 0xf9} } + {{0x28, 0xda, 0x98, 0x15}, {0x93, 0xe8}, {0x7e, 0x44}, 0xac, 0x66, {0x1a, 0xaf, 0x80, 0x15, 0x50, 0xf9} } typedef struct fip_toc_header { uint32_t name; diff --git a/include/tools_share/uuid.h b/include/tools_share/uuid.h index 6d935bd6b..f3ac4af5f 100644 --- a/include/tools_share/uuid.h +++ b/include/tools_share/uuid.h @@ -48,9 +48,9 @@ * A DCE 1.1 compatible source representation of UUIDs. */ struct uuid { - uint32_t time_low; - uint16_t time_mid; - uint16_t time_hi_and_version; + uint8_t time_low[4]; + uint8_t time_mid[2]; + uint8_t time_hi_and_version[2]; uint8_t clock_seq_hi_and_reserved; uint8_t clock_seq_low; uint8_t node[_UUID_NODE_LEN]; |