quark: Introduce Quark Secure Partition
Test partition designed to have a virtual address space as small as
possible in order to test the extension ARMv8.4-TTST. This Secure
Partition doesn't have print capabilities. The only service it provides
is one that returns a magic number to verify that it has been loaded.
Change-Id: I431f6c65f2926d486836d12ddfefe05e83b0c47f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/spm/quark/quark.ld.S b/spm/quark/quark.ld.S
new file mode 100644
index 0000000..8f51edb
--- /dev/null
+++ b/spm/quark/quark.ld.S
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <quark_def.h>
+#include <platform_def.h>
+#include <xlat_tables_defs.h>
+
+OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
+OUTPUT_ARCH(PLATFORM_LINKER_ARCH)
+ENTRY(quark_entrypoint)
+
+SECTIONS
+{
+ . = QUARK_IMAGE_BASE;
+
+ ASSERT(. == ALIGN(PAGE_SIZE),
+ "TEXT_START address is not aligned to PAGE_SIZE.")
+
+ .text : {
+ __TEXT_START__ = .;
+ *quark_entrypoint.o(.text*)
+ *(.text*)
+ *(.vectors)
+ . = NEXT(PAGE_SIZE);
+ __TEXT_END__ = .;
+ }
+
+ .rodata : {
+ . = ALIGN(PAGE_SIZE);
+ __RODATA_START__ = .;
+ *(.rodata*)
+ . = NEXT(PAGE_SIZE);
+ __RODATA_END__ = .;
+ }
+
+ .data : {
+ . = ALIGN(PAGE_SIZE);
+ __DATA_START__ = .;
+ *(.data*)
+ . = NEXT(PAGE_SIZE);
+ __DATA_END__ = .;
+ }
+
+ .bss (NOLOAD) : {
+ . = ALIGN(PAGE_SIZE);
+ __BSS_START__ = .;
+ *(SORT_BY_ALIGNMENT(.bss*))
+ *(COMMON)
+ . = NEXT(PAGE_SIZE);
+ __BSS_END__ = .;
+ }
+}