feat: add build options for memory protect

In preparation to adding a platform module to implement memory
protection, add "memory_protect" field to platforms.

In following patches the referred configuration is used to link
the platform specific module.

Change-Id: I07ec4a138868429dd2777a0dc08f5548c065c055
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/build/toolchain/BUILD.gn b/build/toolchain/BUILD.gn
index e6dad46..c038d6e 100644
--- a/build/toolchain/BUILD.gn
+++ b/build/toolchain/BUILD.gn
@@ -31,5 +31,6 @@
     plat_boot_flow = "//src/arch/fake:boot_flow"
     plat_console = "//src/arch/fake:console"
     plat_iommu = "//src/iommu:absent"
+    plat_memory_protect = "//src/memory_protect:absent"
   }
 }
diff --git a/build/toolchain/embedded.gni b/build/toolchain/embedded.gni
index 53e48f1..6b6ab54 100644
--- a/build/toolchain/embedded.gni
+++ b/build/toolchain/embedded.gni
@@ -287,6 +287,7 @@
       plat_boot_flow = invoker.boot_flow
       plat_console = invoker.console
       plat_iommu = invoker.iommu
+      plat_memory_protect = invoker.memory_protect
       if (defined(invoker.stdout)) {
         stdout = invoker.stdout
       }
@@ -322,6 +323,7 @@
                              "boot_flow",
                              "console",
                              "iommu",
+                             "memory_protect",
                              "gic_version",
                              "gic_enable_espi",
                              "gicd_base_address",
@@ -359,6 +361,7 @@
     cpu = "${invoker.cpu}+fp"
     boot_flow = "//src/arch/fake:boot_flow"
     iommu = "//src/iommu:absent"
+    memory_protect = "//src/memory_protect:absent"
     stdout = "//src/arch/aarch64/hftest:stdout"
 
     # Nonsense values because they are required but shouldn't be used.
diff --git a/build/toolchain/host.gni b/build/toolchain/host.gni
index 9d9b3dd..e140109 100644
--- a/build/toolchain/host.gni
+++ b/build/toolchain/host.gni
@@ -134,6 +134,7 @@
 
         # When building for the ${target_name}, use the fake architecture to make things
         # testable.
+        plat_memory_protect = "//src/memory_protect:absent"
         plat_arch = "fake"
         plat_boot_flow = "//src/arch/fake:boot_flow"
         plat_console = "//src/arch/fake:console"
diff --git a/build/toolchain/platform.gni b/build/toolchain/platform.gni
index 4c0c7a0..6d99c1d 100644
--- a/build/toolchain/platform.gni
+++ b/build/toolchain/platform.gni
@@ -21,6 +21,10 @@
   # IOMMU driver to be used for the platform, specified as build target.
   plat_iommu = ""
 
+  # Abstract the calls to platform memory protection functions.
+  # E.g. FVP leverages RME if present to change PAS (S or NS) of given address.
+  plat_memory_protect = ""
+
   # The number of pages to allocate for the hypervisor heap.
   plat_heap_pages = 0
 
diff --git a/project/reference b/project/reference
index 4937157..57f5a66 160000
--- a/project/reference
+++ b/project/reference
@@ -1 +1 @@
-Subproject commit 4937157fa94beadc76b822cf6d202a164b450f4c
+Subproject commit 57f5a66c55694b8c8e16868629ec9574943f7216