TF-RMM Release v0.1.0
This is the first external release of TF-RMM and provides a reference
implementation of Realm Management Monitor (RMM) as specified by the
RMM Beta0 specification[1].
The `docs/readme.rst` has more details about the project and
`docs/getting_started/getting-started.rst` has details on how to get
started with TF-RMM.
[1] https://developer.arm.com/documentation/den0137/1-0bet0/?lang=en
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I205ef14c015e4a37ae9ae1a64e4cd22eb8da746e
diff --git a/lib/common/include/platform_api.h b/lib/common/include/platform_api.h
new file mode 100644
index 0000000..6b26ac1
--- /dev/null
+++ b/lib/common/include/platform_api.h
@@ -0,0 +1,29 @@
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
+ */
+#ifndef PLATFORM_API_H
+#define PLATFORM_API_H
+
+#include <stdint.h>
+
+void plat_warmboot_setup(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3);
+void plat_setup(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3);
+
+/*
+ * Takes an aligned granule address, validates it and if valid returns the
+ * index in the struct granules array or UINT64_MAX in case of an error.
+ *
+ * This function also validates that the granule address is a valid
+ * page address.
+ */
+unsigned long plat_granule_addr_to_idx(unsigned long addr);
+
+/*
+ * Takes an index in the struct granules array and returns the aligned granule
+ * address. The index must be within the number of granules expected by the
+ * platform.
+ */
+unsigned long plat_granule_idx_to_addr(unsigned long idx);
+
+#endif /* PLATFORM_API_H */