feat(rmm): move attestation data to REC auxiliary granule
This patch moves attestation data from REC to
'rec_attest_data' structure in auxiliary granule.
In 'handle_rsi_attest_token_init' function
initialisation of variables which depend on 'rec'
parameter is moved after
assert(rec != NULL);
to prevent accessing 'rec' in case of NULL pointer.
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: Ia182d66bfb19a2baea5a9d2039dbbf6523e72bdd
diff --git a/lib/allocator/include/memory_alloc.h b/lib/allocator/include/memory_alloc.h
index 852b648..b4a9665 100644
--- a/lib/allocator/include/memory_alloc.h
+++ b/lib/allocator/include/memory_alloc.h
@@ -29,9 +29,17 @@
* Total size is ~3 Pages (rounded up to page size).
*/
#define REC_SIMD_PAGES 3
+#define REC_SIMD_SIZE (REC_SIMD_PAGES * SZ_4K)
-/* Number of aux granules pages per REC to be used */
-#define REC_NUM_PAGES (REC_HEAP_PAGES + REC_PMU_PAGES + REC_SIMD_PAGES)
+/* Number of pages per REC for 'rec_attest_data' structure */
+#define REC_ATTEST_PAGES 1
+#define REC_ATTEST_SIZE (REC_ATTEST_PAGES * SZ_4K)
+
+/* Number of pages per REC to be allocated */
+#define REC_NUM_PAGES (REC_HEAP_PAGES + \
+ REC_PMU_PAGES + \
+ REC_SIMD_PAGES + \
+ REC_ATTEST_PAGES)
struct buffer_alloc_ctx {
unsigned char *buf;