aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Kis <imre.kis@arm.com>2021-01-12 22:26:06 +0100
committerGy├Ârgy Szing <gyorgy.szing@arm.com>2021-02-02 10:00:13 +0000
commite07cb6c044174981921d9701c1e26848295c7b5b (patch)
tree6f40a711be9e61e3842aafc641a2a0dda20394bf
parent0202c9f82bd2be3b3d280a4ab63a34850fa68b49 (diff)
downloadtrusted-services-e07cb6c044174981921d9701c1e26848295c7b5b.tar.gz
libsp: Move sp_memory_attr definition
Moving the definition of the union to global level for better readability and easier access. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I151f7bb705afbbf4fbff713cd981f66062009724
-rw-r--r--components/messaging/ffa/libsp/include/sp_memory_management.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/components/messaging/ffa/libsp/include/sp_memory_management.h b/components/messaging/ffa/libsp/include/sp_memory_management.h
index 82757b6..16a17ec 100644
--- a/components/messaging/ffa/libsp/include/sp_memory_management.h
+++ b/components/messaging/ffa/libsp/include/sp_memory_management.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
- * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
*/
#ifndef LIBSP_INCLUDE_SP_MEMORY_MANAGEMENT_H_
@@ -96,6 +96,24 @@ enum sp_memory_transaction_type {
};
/**
+ * @brief This union contains the memory attributes for normal and device
+ * memory areas.
+ */
+union sp_memory_attr {
+ /** Normal memory attributes */
+ struct sp_normal_memory_attributes {
+ /** Cacheability attribute */
+ enum sp_cacheability_attribute cacheability;
+
+ /** Shareability attribute */
+ enum sp_shareablity_attribute shareability;
+ } normal_memory;
+
+ /** Device memory attributes */
+ enum sp_device_memory_attributes device_memory;
+};
+
+/**
* @brief Flags are used to govern the behavior of a memory management
* transaction.
*/
@@ -165,19 +183,7 @@ struct sp_memory_descriptor {
* be used. In case of non-specified memory type the contents of the
* union is ignored.
*/
- union sp_memory_attr {
- /** Normal memory attributes */
- struct sp_normal_memory_attributes {
- /** Cacheability attribute */
- enum sp_cacheability_attribute cacheability;
-
- /** Shareability attribute */
- enum sp_shareablity_attribute shareability;
- } normal_memory;
-
- /** Device memory attributes */
- enum sp_device_memory_attributes device_memory;
- } mem_region_attr;
+ union sp_memory_attr mem_region_attr;
/**
* Flags are used to govern the behavior of a memory management