aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2016-01-12 15:19:16 +0100
committerJens Wiklander <jens.wiklander@linaro.org>2016-02-18 17:28:45 +0100
commitd5a887c8f4cd865331d97f1e083ad8c8cd821666 (patch)
tree7f37cf9093007c6d8001a6a3b59a8d79adb38be1 /core
parent422e54f57875e6b2fe3abf16b9e97cc04bb9fa71 (diff)
core: add auto generated asm-defines.h
The temporary files are all stored alongside asm-defines.h, and are named: .asm-defines.s, .asm-defines.s.d, .asm-defines.s.cmd. Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core')
-rw-r--r--core/arch/arm/kernel/asm-defines.c36
-rw-r--r--core/core.mk5
2 files changed, 39 insertions, 2 deletions
diff --git a/core/arch/arm/kernel/asm-defines.c b/core/arch/arm/kernel/asm-defines.c
new file mode 100644
index 00000000..aaae3089
--- /dev/null
+++ b/core/arch/arm/kernel/asm-defines.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#define DEFINES void __defines(void); void __defines(void)
+
+#define DEFINE(def, val) \
+ asm volatile("\n==>" #def " %0 " #val : : "i" (val))
+
+DEFINES
+{
+}
diff --git a/core/core.mk b/core/core.mk
index baefe536..c1633961 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -24,6 +24,7 @@ cppflags$(sm) += -DPLATFORM_FLAVOR=PLATFORM_FLAVOR_ID_$(PLATFORM_FLAVOR)
cppflags$(sm) += -Icore/include
cppflags$(sm) += -include $(conf-file)
+cppflags$(sm) += -I$(out-dir)/core/include/generated
cppflags$(sm) += $(core-platform-cppflags)
cflags$(sm) += $(core-platform-cflags)
aflags$(sm) += $(core-platform-aflags)
@@ -85,7 +86,7 @@ $(out-dir)/core/ta_pub_key.c: $(TA_SIGN_KEY)
@$(q)mkdir -p $(out-dir)/core
@$(q)scripts/pem_to_pub_c.py --prefix ta_pub_key --key $< --out $@
+asm-defines-file := core/arch/$(ARCH)/kernel/asm-defines.c
include mk/compile.mk
-include $(platform-dir)/link.mk
-
+include $(platform-dir)/link.mk