summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip
diff options
context:
space:
mode:
authorMartin Peschke <mpeschke@de.ibm.com>2015-11-26 18:09:41 +0100
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-02-22 11:43:11 -0600
commit596b36c29a08e786747741180016e2ca9b536339 (patch)
tree88a1c33c96c05c6dd8b2c696f2fbf008611acc1b /src/import/chips/p9/xip
parent7df3de4f594663de860a95380af93abee3e5868e (diff)
downloadtalos-hostboot-596b36c29a08e786747741180016e2ca9b536339.tar.gz
talos-hostboot-596b36c29a08e786747741180016e2ca9b536339.zip
P9-XIP image build: initial implementation
This code is supposed to be used for all P9-XIP image build flows, including the ones for the Hardware Image (former Reference Image) and for the SBE IPL Image (located in the ppe repository). It has been derived from SBE-XIP code within the ppe repo (tools/image, sbe/image). This code has been succesfully used to build the SBE IPL image in the ppe repository. This code should is capable of building images, while it does not come with support for putting default values into attributes yet. Changes include: - cut down on number of included header files (eliminating lots of dependencies related to ppe and ekb repos) - a lot of renaming (SBE to P9-XIP) - Makefile cleanup - cleanup of white space damage Todos: - Some files might need to be revisited later, i.e. anything that doesn't come with a p9_xip_ prefix. - We may want to integrate this into ekb build. - The Makefile contains a check for the required compiler version. If the checks fails, manual actions must be taken. For a fully automated build this needs improvement. - The P9-XIP image build code needs to be mirrored to the ppe repo, and the SBE IPL Image build flow should be adapted to used it. - The sbe_default_tool is not included in this port. Change-Id: Ia44474a9a6eab01f7a15b28686644714161d3833 Original-Change-Id: I6017602fc61787fbb58673bfc2bf046f19526ff4 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23004 Tested-by: Jenkins Server Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/24286 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/xip')
-rw-r--r--src/import/chips/p9/xip/fapi_sbe_common.H60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/import/chips/p9/xip/fapi_sbe_common.H b/src/import/chips/p9/xip/fapi_sbe_common.H
new file mode 100644
index 000000000..d125eeade
--- /dev/null
+++ b/src/import/chips/p9/xip/fapi_sbe_common.H
@@ -0,0 +1,60 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/xip/fapi_sbe_common.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/// \file fapi_sbe_common.H
+/// \brief provides several preprocessor macros used functions in fixed secion.
+///
+/// Several preprocessor macros are required to have different definitions in
+/// C, C++ and SBE assembly procedures. These common forms are collected here.
+
+#ifndef __FAPI_SBE_COMMON_H
+#define __FAPI_SBE_COMMON_H
+
+/// Several preprocessor macros are required to have different definitions in
+/// C, C++ and SBE assembly procedures. These common forms are collected here.
+
+#if defined __ASSEMBLER__
+
+ #define CONST_UINT8_T(name, expr) .set name, (expr)
+ #define CONST_UINT32_T(name, expr) .set name, (expr)
+ #define CONST_UINT64_T(name, expr) .set name, (expr)
+
+ #define ULL(x) x
+
+#elif defined __cplusplus
+
+ #include <stdint.h>
+
+ #define CONST_UINT8_T(name, expr) const uint8_t name = (expr);
+ #define CONST_UINT32_T(name, expr) const uint32_t name = (expr);
+ #define CONST_UINT64_T(name, expr) const uint64_t name = (expr);
+
+ #define ULL(x) x##ull
+
+#else // C code
+
+ // CONST_UINT[8,3,64]_T() can't be used in C code/headers; Use
+ //
+ // #define <symbol> <value> [ or ULL(<value>) for 64-bit constants
+
+ #define ULL(x) x##ull
+
+#endif // __ASSEMBLER__
+
+#endif // __FAPI_SBE_COMMON_H
OpenPOWER on IntegriCloud