Platform: Add linker script for LVL1 and LVL2

Instead of generating from template. Also, update the macros used to
place symbols into a particular sections to match the new linker scripts.

Change-Id: I7b0f14687ba0bb4e6d2f1ffdfe70030738bfbec3
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/platform/include/tfm_plat_defs.h b/platform/include/tfm_plat_defs.h
index 487bba5..808a6d3 100644
--- a/platform/include/tfm_plat_defs.h
+++ b/platform/include/tfm_plat_defs.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -36,9 +36,12 @@
  *
  * \param[in] TFM_PARTITION_NAME  TF-M partition name assigned in the manifest
  *                                file "name" field.
+ * \param[in] TFM_PARTITION_TYPE  TF-M partition type assigned in the manifest
+ *                                file "type" field.
  */
-#define TFM_LINK_SET_RO_IN_PARTITION_SECTION(TFM_PARTITION_NAME) \
-                __attribute__((section(TFM_PARTITION_NAME"_ATTR_FN")))
+#define TFM_LINK_SET_RO_IN_PARTITION_SECTION(TFM_PARTITION_NAME, \
+                                             TFM_PARTITION_TYPE) \
+    __attribute__((section(TFM_PARTITION_NAME "_" TFM_PARTITION_TYPE "_ATTR_FN")))
 
 /*!
  * \def TFM_LINK_SET_RW_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
@@ -48,9 +51,12 @@
  *
  * \param[in] TFM_PARTITION_NAME  TF-M partition name assigned in the manifest
  *                                file "name" field.
+ * \param[in] TFM_PARTITION_TYPE  TF-M partition type assigned in the manifest
+ *                                file "type" field.
  */
-#define TFM_LINK_SET_RW_IN_PARTITION_SECTION(TFM_PARTITION_NAME) \
-                __attribute__((section(TFM_PARTITION_NAME"_ATTR_RW")))
+#define TFM_LINK_SET_RW_IN_PARTITION_SECTION(TFM_PARTITION_NAME, \
+                                             TFM_PARTITION_TYPE) \
+    __attribute__((section(TFM_PARTITION_NAME "_" TFM_PARTITION_TYPE "_ATTR_RW")))
 
 /*!
  * \def TFM_LINK_SET_ZI_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
@@ -60,12 +66,15 @@
  *
  * \param[in] TFM_PARTITION_NAME  TF-M partition name assigned in the manifest
  *                                file "name" field.
+ * \param[in] TFM_PARTITION_TYPE  TF-M partition type assigned in the manifest
+ *                                file "type" field.
  */
-#define TFM_LINK_SET_ZI_IN_PARTITION_SECTION(TFM_PARTITION_NAME) \
-                __attribute__((section(TFM_PARTITION_NAME"_ATTR_ZI")))
+#define TFM_LINK_SET_ZI_IN_PARTITION_SECTION(TFM_PARTITION_NAME, \
+                                             TFM_PARTITION_TYPE) \
+    __attribute__((section(TFM_PARTITION_NAME "_" TFM_PARTITION_TYPE "_ATTR_ZI")))
 #else
-#define TFM_LINK_SET_RO_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
-#define TFM_LINK_SET_RW_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
-#define TFM_LINK_SET_ZI_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
+#define TFM_LINK_SET_RO_IN_PARTITION_SECTION(TFM_PARTITION_NAME, TFM_PARTITION_TYPE)
+#define TFM_LINK_SET_RW_IN_PARTITION_SECTION(TFM_PARTITION_NAME, TFM_PARTITION_TYPE)
+#define TFM_LINK_SET_ZI_IN_PARTITION_SECTION(TFM_PARTITION_NAME, TFM_PARTITION_TYPE)
 #endif
 #endif /* __TFM_PLAT_DEFS_H__ */