1*91f16700Schasinglulu /* 2*91f16700Schasinglulu * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. 3*91f16700Schasinglulu * 4*91f16700Schasinglulu * SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu */ 6*91f16700Schasinglulu 7*91f16700Schasinglulu #include <errno.h> 8*91f16700Schasinglulu #include <string.h> 9*91f16700Schasinglulu 10*91f16700Schasinglulu #include <plat/common/platform.h> 11*91f16700Schasinglulu 12*91f16700Schasinglulu static const uint8_t sample_delegated_key[] = { 13*91f16700Schasinglulu 0x20, 0x11, 0xC7, 0xF0, 0x3C, 0xEE, 0x43, 0x25, 0x17, 0x6E, 14*91f16700Schasinglulu 0x52, 0x4F, 0x03, 0x3C, 0x0C, 0xE1, 0xE2, 0x1A, 0x76, 0xE6, 15*91f16700Schasinglulu 0xC1, 0xA4, 0xF0, 0xB8, 0x39, 0xAA, 0x1D, 0xF6, 0x1E, 0x0E, 16*91f16700Schasinglulu 0x8A, 0x5C, 0x8A, 0x05, 0x74, 0x0F, 0x9B, 0x69, 0xEF, 0xA7, 17*91f16700Schasinglulu 0xEB, 0x1A, 0x41, 0x85, 0xBD, 0x11, 0x7F, 0x68 18*91f16700Schasinglulu }; 19*91f16700Schasinglulu 20*91f16700Schasinglulu /* 21*91f16700Schasinglulu * Get the hardcoded delegated realm attestation key as FVP 22*91f16700Schasinglulu * does not support RSS. 23*91f16700Schasinglulu */ 24*91f16700Schasinglulu int plat_rmmd_get_cca_realm_attest_key(uintptr_t buf, size_t *len, 25*91f16700Schasinglulu unsigned int type) 26*91f16700Schasinglulu { 27*91f16700Schasinglulu if (*len < sizeof(sample_delegated_key)) { 28*91f16700Schasinglulu return -EINVAL; 29*91f16700Schasinglulu } 30*91f16700Schasinglulu 31*91f16700Schasinglulu (void)memcpy((void *)buf, (const void *)sample_delegated_key, 32*91f16700Schasinglulu sizeof(sample_delegated_key)); 33*91f16700Schasinglulu *len = sizeof(sample_delegated_key); 34*91f16700Schasinglulu 35*91f16700Schasinglulu return 0; 36*91f16700Schasinglulu } 37