summaryrefslogtreecommitdiffstats
path: root/hwpf
diff options
context:
space:
mode:
authorGreg Still <stillgs@us.ibm.com>2015-10-13 20:54:36 -0500
committerMartin Peschke <mpeschke@de.ibm.com>2015-10-21 07:20:47 -0500
commit82fc55596dd107514bc3dea1b8be3c23b653c76a (patch)
tree7375f72411c9ff16775d145ce7ea727fbde46806 /hwpf
parent43aaa85b59ba06dce6e0f7063234235384e31135 (diff)
downloadtalos-sbe-82fc55596dd107514bc3dea1b8be3c23b653c76a.tar.gz
talos-sbe-82fc55596dd107514bc3dea1b8be3c23b653c76a.zip
Rearrange PPE FAPI2 directory structure to be more in-line with HWPF
- Move files into new structure - Delete old, obsolete files and directories - Pre-import mirror of HWPF into importtemp - No additional function Change-Id: Iadad6eb05349f807acea362ec77d7f58273878b5 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21150 Tested-by: Jenkins Server Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com>
Diffstat (limited to 'hwpf')
-rwxr-xr-xhwpf/fapi/.empty0
-rwxr-xr-xhwpf/fapi/docs/Doxyfile2355
-rwxr-xr-xhwpf/fapi/docs/README6
-rwxr-xr-xhwpf/fapi/docs/topics/DEPRECATED.md81
-rwxr-xr-xhwpf/fapi/docs/topics/Examples.md246
-rwxr-xr-xhwpf/fapi/docs/topics/Ffdc.md149
-rwxr-xr-xhwpf/fapi/docs/topics/README.md166
-rwxr-xr-xhwpf/fapi/include/buffer.H423
-rwxr-xr-xhwpf/fapi/include/buffer_base.H331
-rwxr-xr-xhwpf/fapi/include/buffer_parameters.H65
-rwxr-xr-xhwpf/fapi/include/buffer_traits.H232
-rwxr-xr-xhwpf/fapi/include/collect_reg_ffdc.H78
-rwxr-xr-xhwpf/fapi/include/error_info.H854
-rwxr-xr-xhwpf/fapi/include/error_scope.H104
-rwxr-xr-xhwpf/fapi/include/ffdc.H191
-rwxr-xr-xhwpf/fapi/include/hw_access.H720
-rwxr-xr-xhwpf/fapi/include/plat_trace.H64
-rwxr-xr-xhwpf/fapi/include/return_code.H180
-rwxr-xr-xhwpf/fapi/include/target.H337
-rwxr-xr-xhwpf/fapi/include/target_types.H105
-rwxr-xr-xhwpf/fapi/include/utils.H59
-rwxr-xr-xhwpf/fapi/include/variable_buffer.H663
-rwxr-xr-xhwpf/fapi/src/error_info.C410
-rwxr-xr-xhwpf/fapi/src/plat_utils.C117
-rwxr-xr-xhwpf/fapi/tools/parseErrorInfo.pl1479
-rwxr-xr-xhwpf/fapi/xml/buffer_errors.xml40
-rw-r--r--hwpf/include/array.H (renamed from hwpf/plat/include/array.H)0
-rw-r--r--hwpf/include/buffer_traits.H (renamed from hwpf/plat/include/buffer_traits.H)0
-rw-r--r--hwpf/include/error_info_defs.H252
-rw-r--r--hwpf/include/fapi2.H72
-rw-r--r--hwpf/include/fapi2AttrEnumInfo.csv15
-rw-r--r--hwpf/include/fapi2AttrInfo.csv87
-rw-r--r--hwpf/include/fapi2AttributeIds.H746
-rw-r--r--hwpf/include/fapi2AttributePlatCheck.H361
-rw-r--r--hwpf/include/fapi2AttributeService.C519
-rw-r--r--hwpf/include/fapi2AttributeService.H (renamed from hwpf/plat/include/fapi2AttributeService.H)0
-rw-r--r--hwpf/include/fapi2AttributesSupported.html13
-rw-r--r--hwpf/include/fapi2ChipEcFeature.C75
-rw-r--r--hwpf/include/fapi2PlatAttributeService.H1575
-rw-r--r--hwpf/include/fapi2Structs.H (renamed from hwpf/plat/include/fapi2Structs.H)0
-rw-r--r--hwpf/include/fapi2_hw_access.H (renamed from hwpf/plat/include/fapi2_hw_access.H)0
-rw-r--r--hwpf/include/fapi2_target.H (renamed from hwpf/plat/include/fapi2_target.H)0
-rw-r--r--hwpf/include/hwp_ffdc_classes.H (renamed from hwpf/plat/include/hwp_ffdc_classes.H)0
-rw-r--r--hwpf/include/plat/hw_access.H (renamed from hwpf/plat/include/hw_access.H)0
-rw-r--r--hwpf/include/plat/hwp_executor.H (renamed from hwpf/plat/include/hwp_executor.H)0
-rw-r--r--hwpf/include/plat/plat_attributes.H (renamed from hwpf/plat/include/plat_attributes.H)0
-rw-r--r--hwpf/include/plat/plat_error_scope.H (renamed from hwpf/plat/include/plat_error_scope.H)0
-rw-r--r--hwpf/include/plat/plat_hw_access.H (renamed from hwpf/plat/include/plat_hw_access.H)0
-rw-r--r--hwpf/include/plat/plat_includes.H (renamed from hwpf/plat/include/plat_includes.H)0
-rw-r--r--hwpf/include/plat/plat_target.H (renamed from hwpf/plat/include/plat_target.H)28
-rw-r--r--hwpf/include/plat/plat_target_definitions.H (renamed from hwpf/plat/include/plat_target_definitions.H)0
-rw-r--r--hwpf/include/plat/plat_target_parms.H (renamed from hwpf/plat/include/plat_target_parms.H)63
-rw-r--r--hwpf/include/plat/plat_target_pg_attributes.H (renamed from hwpf/plat/include/plat_target_pg_attributes.H)0
-rw-r--r--hwpf/include/plat/plat_target_utils.H (renamed from hwpf/plat/include/plat_target_utils.H)0
-rw-r--r--hwpf/include/plat/plat_trace.H (renamed from hwpf/plat/include/plat_trace.H)0
-rw-r--r--hwpf/include/plat/target.H (renamed from hwpf/plat/include/target.H)0
-rw-r--r--hwpf/include/plat/target.apis11
-rw-r--r--hwpf/include/return_code.H (renamed from hwpf/plat/include/return_code.H)0
-rw-r--r--hwpf/include/set_sbe_error.H (renamed from hwpf/plat/include/set_sbe_error.H)0
-rw-r--r--hwpf/include/target_types.H (renamed from hwpf/plat/include/target_types.H)0
-rw-r--r--hwpf/include/utils.H (renamed from hwpf/plat/include/utils.H)2
-rw-r--r--hwpf/include/vector.H849
-rwxr-xr-xhwpf/plat/.empty0
-rw-r--r--hwpf/plat/include/buffer.H764
-rwxr-xr-xhwpf/plat/include/buffer_base.H331
-rw-r--r--hwpf/plat/include/buffer_parameters.H70
-rw-r--r--hwpf/plat/include/fapi2.H53
-rw-r--r--hwpf/plat/include/variable_buffer.H670
-rw-r--r--hwpf/plat/src/ffdc.C57
-rwxr-xr-xhwpf/plat/target_map49
-rw-r--r--hwpf/src/Makefile (renamed from hwpf/plat/src/Makefile)9
-rw-r--r--hwpf/src/array.C (renamed from hwpf/plat/src/array.C)0
-rw-r--r--hwpf/src/error_info.C (renamed from hwpf/plat/src/error_info.C)0
-rw-r--r--hwpf/src/fapi2PlatAttributeService.C486
-rw-r--r--hwpf/src/fapi2ppefiles.mk (renamed from hwpf/plat/src/fapi2ppefiles.mk)3
-rw-r--r--[-rwxr-xr-x]hwpf/src/ffdc.C (renamed from hwpf/fapi/src/ffdc.C)0
-rw-r--r--hwpf/src/plat/Makefile18
-rw-r--r--hwpf/src/plat/fapi2ppeplatfiles.mk28
-rw-r--r--hwpf/src/plat/plat_utils.C (renamed from hwpf/plat/src/plat_utils.C)0
-rw-r--r--hwpf/src/plat/target.C (renamed from hwpf/plat/src/target.C)0
80 files changed, 5187 insertions, 11474 deletions
diff --git a/hwpf/fapi/.empty b/hwpf/fapi/.empty
deleted file mode 100755
index e69de29b..00000000
--- a/hwpf/fapi/.empty
+++ /dev/null
diff --git a/hwpf/fapi/docs/Doxyfile b/hwpf/fapi/docs/Doxyfile
deleted file mode 100755
index 9cb5dc43..00000000
--- a/hwpf/fapi/docs/Doxyfile
+++ /dev/null
@@ -1,2355 +0,0 @@
-# Doxyfile 1.8.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = "FAPI 2"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = genfiles
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = NO
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = ../include ./topics
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.idl \
- *.ddl \
- *.odl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.cs \
- *.d \
- *.php \
- *.php4 \
- *.php5 \
- *.phtml \
- *.inc \
- *.m \
- *.markdown \
- *.md \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.for \
- *.tcl \
- *.vhd \
- *.vhdl \
- *.ucf \
- *.qsf \
- *.as \
- *.js \
- *.H
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE = README.md
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 1
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavours of web server based searching depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools. See
-# the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = YES
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED = DOXYGEN
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
-# all uppercase name, and do not end with a semicolon. Such function macros are
-# typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have an unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font n the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif and svg.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/hwpf/fapi/docs/README b/hwpf/fapi/docs/README
deleted file mode 100755
index da66d671..00000000
--- a/hwpf/fapi/docs/README
+++ /dev/null
@@ -1,6 +0,0 @@
-
-To generate FAPI2 documentation, run
-
-$doxygen Doxyfile
-
-The documentation will be output into genfiles.
diff --git a/hwpf/fapi/docs/topics/DEPRECATED.md b/hwpf/fapi/docs/topics/DEPRECATED.md
deleted file mode 100755
index 39df626e..00000000
--- a/hwpf/fapi/docs/topics/DEPRECATED.md
+++ /dev/null
@@ -1,81 +0,0 @@
-@deprecated Functions which were either not found used in the
-hostboot code or have other ways to perform the same operation
-with the new buffers are candidates for deprecation. They are listed
-here so if you're looking for something you might find that it's
-deprecated and not been implemented. If there's something in this
-list which should be implemented, let someone know and we can
-implement it.<br>
-- setDoubleWordLength(uint32_t i_newNumDoubleWords);<br>
-- setWordLength(uint32_t i_newNumWords);<br>
-- setHalfWordLength(uint32_t i_newNumHalfWords);<br>
-- setByteLength(uint32_t i_newNumBytes);<br>
-- setBitLength(uint32_t i_newNumBits);<br>
-- setCapacity (uint32_t i_newNumWords);<br>
-- shrinkBitLength(uint32_t i_newNumBits);<br>
-- growBitLength(uint32_t i_newNumBits);<br>
-Replaced with std::container operations
-- shiftRight(uint32_t i_shiftnum, uint32_t i_offset = 0);<br>
-Replaced with operator>> as offset appears unused<br>
-- shiftLeft(uint32_t i_shiftnum, uint32_t i_offset = 0xFFFFFFFF);<br>
-Replaced with operator<< as offset appears unused<br>
-- shiftRightAndResize(uint32_t i_shiftnum, uint32_t i_offset = 0);<br>
-- shiftLeftAndResize(uint32_t i_shiftnum);<br>
-- rotateRight(uint32_t i_rotatenum);<br>
-- rotateLeft(uint32_t i_rotatenum);<br>
-- flushTo0(); and flushTo1();<br>
-Replaced with flush<X>() where X can be {0,1}<br>
-- applyInversionMask(const uint32_t * i_invMask, uint32_t
- i_invByteLen);<br>
-- applyInversionMask(const ecmdDataBufferBase & i_invMaskBuffer,
- uint32_t i_invByteLen);<br>
-- insert(const ecmdDataBufferBase & i_bufferIn, uint32_t i_targetStart,
- uint32_t i_len, uint32_t i_sourceStart = 0);<br>
- insert(const uint32_t * i_data, uint32_t i_targetStart, uint32_t
- i_len, uint32_t i_sourceStart = 0);<br>
-It appears from the usage that the insert functions were used like a
-initializer list - given a chunk of data, insert at bit 0.
-Other useages have been replaced with a templated version for
-variable_buffers and bit operations for integral buffers.<br>
-- insertFromRight<br>
-Replaced with a templated version for
-variable_buffers and bit operations for integral buffers.<br>
-- extract API<br>
-Replaced with a templated version for
-variable_buffers and bit operations for integral buffers.<br>
-- setOr API/merge API<br>
-- concat( ... );<br>
-Replaced with operator+() and operator+=()<br>
-- setOr(const uint32_t * i_data, uint32_t i_startbit,
- uint32_t i_len);<br>
- merge()
-Replaced with operator|=() as it looks like startbit is always 0
-and len is always the length of i_data. Merge is the same I think<br>
-- setXor(const ecmdDataBufferBase & i_bufferIn, uint32_t i_startbit,
- uint32_t i_len);
-Replaced with operator|=() as it looks like startbit is always 0
-and len is always the length of i_data.<br>
-- setAnd(const ecmdDataBufferBase & i_bufferIn, uint32_t i_startbit,
- uint32_t i_len);<br>
-Replaced with operator&=() as it looks like startbit is mostly 0
-and len is mostly the length of i_data. The few cases seen where
-this isn't the case, a uint64_t mask would work better.<br>
-- copy(ecmdDataBufferBase & o_copyBuffer) const
-Replaced with operator=()
-- memCopyIn, memCopyOut
-- flattenSize(void) const;
-- flatten(uint8_t * o_data, uint32_t i_len) const;
-- unflatten(const uint8_t * i_data, uint32_t i_len);
-- oddParity()
-- evenParity()
-- shareBuffer(ecmdDataBufferBase* i_sharingBuffer);
-- compressBuffer(ecmdCompressionMode_t i_mode = ECMD_COMP_PRD);
-- uncompressBuffer();
-- isBufferCompressed();
-- setWord(), setHalfWord(), etc.
-Replaced with a templated version, set<type>();
-- getDoubleWordLength(), getDoubleLength
-Replaced with a templated version taking the type as an argument
-- getCapacity()
-- writeBit(bits_type i_bit, uint32_t i_value);
-Replaced with set operations (this might be needed?)
-e \ No newline at end of file
diff --git a/hwpf/fapi/docs/topics/Examples.md b/hwpf/fapi/docs/topics/Examples.md
deleted file mode 100755
index e7ccb027..00000000
--- a/hwpf/fapi/docs/topics/Examples.md
+++ /dev/null
@@ -1,246 +0,0 @@
-
-# Examples And Frequently Asked Questions
-
-## Buffers
-
-### Create a buffer of 32 bits and initialize it.
-
- fapi2::buffer<uint32_t> data(0xAA55FFAA);
-
-### Flip bit 0
-
- data.flipBit<0>();
-
-### Invert the buffer
-
- data.invert();
-
-### Reset it's value
-
- data = 0xFFFFFFFF;
-
-### Create a mask using an anonymous object
-
- my_buffer &= buffer<T>().setBit<B>.invert();
-
-### Create an 8 bit buffer, initialize it, and flip some bits around
-
- fapi2::buffer<uint8_t>(0xA5).flipBit<5>().flipBit<5>() == 0xA5;
-
-## Operations and Things
-### Is the FAPI_TRY / 'clean_up:' method, the recommended method for doing put/getscoms?
-
-Yes, FAPI_TRY is the preferred wrapper for put/get scom as well as other operations which used to do the do/while/break dance based on the fapi return code.
-A thread-local fapi return code, fapi2::current_err has been introduced to help with the housekeeping.
-
-Feel free to decompose the FAPI_TRY pattern if you have clean_up requirements which make FAPI_TRY too simplistic.
-
-
-## Targets
-
-### Create a processor target
-
- fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> A(PROCESSOR_CHIP_A);
-
-### Define a function which takes only a processor as an argument, enforced by the compiler
-
- void takesProc( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& V );
-
-### How do I pass TARGET_TYPE_X into putScom?
-
-It should "just work." fapi2::putScom is defined as a template.
-Basically any TargetType will match. So,
-
- Target<TARGET_TYPE_XBUS> foo;
- Target<TARGET_TYPE_ABUS> bar;
-
-will both match fapi::putScom in it's more generic sense. However, platforms
-might specialize the hw_access templates. For example, if the operation to
-perform a putScom on an XBUS is different than accessing other targets, the
-platform needs to specialize for XBUS.
-
- template<>
- fapi2::ReturnCode fapi2::putScom (const fapi2::Target<TARGET_TYPE_XBUS> &i_target, const uint64_t i_address, buffer< uint64_t > &i_data)
- {
- // Do XBUS special code here.
- }
-
-### How do I get <information> with the new targets when this used to be an attribute look up before?
-
-This question came up in the context of ATTR_CHIP_UNIT_POS, but really applies for any information
-previously tucked away in attributes.
-
-Do the attribute lookup, the platform can optimize the look up away. In any event the get_attr macro/call will always do the right thing.
-
-If the platform can resolve the lookup without looking anything up (all the information is encoded in the value of the target) the attribute
-mechanism can simply do that manipulation at compile time.
-
-For the smaller platforms, we discussed attribute look ups were templates which could be (would be?) specialized per attribute "key."
-In this way, the "look up" for the unit position could be coded to be nothing more than a static manipulation of the target value.
-A look up would, obviously, be needed if the unit position (or any other attribute value) couldn't be resolved from the target value alone.
-
-### Target Types
-
-#### How do I write a procedure which takes multiple target types?
-
-Depends on what you mean.
-
-##### If you mean "I have a procedure which is generic but only for a subset of types":
-
- fapi2::ReturnCode newProcedure( const fapi2::Target<TARGET_TYPE_XBUS | TARGET_TYPE_ABUS> & i_target, ...);
-
-Note that newProcedure can not then say "if xbus, do this, if abus do the
-other." This is the static equivilent of grabbing a "base class" and the same
-rules apply - if the method is not generic for all the subclasses, you need to
-specialize for those subclasses.
-
-__Think twice about using this mechanism. It creates a new type (the or of the
-target types) and reduces the input to this type. There is no support for run
-time type conversion, and so the original type is not available in this scope.__
-
-##### If you mean "I have a procedure and I want it to do different things for different target types":
-
-You can create templates:
-
- template<fapi2::TargetType T>
- void newProcedure( const fapi2::Target<T>& i_target );
-
- template<>
- void newProcedure( const fapi2::Target<TARGET_TYPE_XBUS>& i_target )
- {
- // XBUS specific code here
- }
-
- template<>
- void newProcedure( const fapi2::Target<TARGET_TYPE_ABUS>& i_target )
- {
- // ABUS specific code here
- }
-
-Notice that because the generic case for newProcedure is declared but
-never defined you will get an error at compile time if newProcedure is
-called with a type other than XBUS or ABUS.
-
-Or overloaded functions:
-
- void newProcedure( const fapi2::Target<TARGET_TYPE_XBUS>& i_target )
- {
- // XBUS specific code here
- }
-
- void newProcedure( const fapi2::Target<TARGET_TYPE_ABUS>& i_target )
- {
- // ABUS specific code here
- }
-
-##### If you mean "I have a procedure which is mostly generic but I need special handling for some target types":
-
-More or less the same as above, but define the generic template. There is no equivilent for
-overloaded functions unless a composite target will suit your needs.
-
- template<fapi2::TargetType T>
- void newProcedure( const fapi2::Target<T>& i_target )
- {
- // Code for types other than ABUS or XBUS
- }
-
- template<>
- void newProcedure( const fapi2::Target<TARGET_TYPE_XBUS>& i_target )
- {
- // XBUS specific code here
- }
-
- template<>
- void newProcedure( const fapi2::Target<TARGET_TYPE_ABUS>& i_target )
- {
- // ABUS specific code here
- }
-
-##### If you want to build a procedure which takes all target types:
-
-__It is recomended that you do not use TARGET_TYPE_ALL - that will reduce the
-type of the passed in target to the "top level base class" of targets and
-every procedure called will need to be completly generic. This is probably
-not what you inteded (but is sometimes useful.) Rather, it is recomended
-that you simply make a generic template.__
-
- template<fapi2::TargetType T>
- void newProcedure( const fapi2::Target<T>& i_target )
- {
- // Code for all types
- fapi2::putScom(i_target, ... );
- }
-
-Note that the putScom here will always be the correct putScom for the
-target type passed in. Assuming procedures called in this method have
-been specialized for specific target types, the compiler will find the
-best match and call it.
-
-#### Once I'm in newProcedure, what is the type of the target?
-
-If you used a generic or specialized template, the type will be the type
-of the target passed in. If you used a composite type (or'd together target
-types) then the type will be TYPE_A | TYPE_B.
-
-Notice there's no simple way to know the original type was TYPE_A in this
-case. If you think about this, it makes sense. Consider:
-
- void f(double x);
-
- int y = 3;
- f(y);
-
-There's no way in f() to know that x started life as an int, which happened to
-be cast to a double.
-
-Targets are the same thing - they're just types we create on the fly. So all of
-the usual C++ tools to deal with this are available.
-
-#### So, wait - I can't write a procedure which handles multiple target types?
-
-You can. What you can't do is figure out the type of the object prior to
-the cast. So what you need to do is make sure the original type isn't lost,
-and that means you can't use TYPE_A | TYPE_B:
-
-##### Specialize. This is the prefered mechanism.
-The template and overload examples above show how to do this specialization.
-It will create very regular and easy to maintain code.
-
-##### Create a generic template and handle each type yourself.
-
- template<fapi2::TargetType T>
- void newProcedure( fapi2::Target<T> i_target )
- {
- // If this procedure isn't generic, check for allowed types here.
- static_assert(fapi2::is_same<T, fapi2::TARGET_TYPE_ABUS>() || fapi2::is_same<T, fapi2::TARGET_TYPE_XBUS>(),
- "newProcedure only takes X/A busses");
-
- :
- :
-
- if (fapi2::is_same<T, fapi2::TARGET_TYPE_ABUS>())
- {
- // ABUS code
- }
-
- if (fapi2::is_same<T, fapi2::TARGET_TYPE_XBUS>())
- {
- // XBUS code
- }
-
- :
- :
- }
-
-newProcedure is a generic template, any target type will match. And, the type T of i_target is
-the original value of the target - the template matched without a cast because it's generic.
-However, with that generality we lost the compiler argument type checking so we replace it with
-the static_assert. This happens at compile time so the compiler will complain if a target other
-than an XBUS or ABUS is passed in to this procedure. To handle the special cases for the types,
-fapi2::is_same is used again - and is also a compile time operation. And so when this template
-matches an XBUS target, the code generated is specific to the XBUS target.
-
-#### Ok, so what is TARGET_TYPE_X | TARGET_TYPE_Y for then?
-
-Creating procedures which are generic to those types. Think of this as a base
-class method.
diff --git a/hwpf/fapi/docs/topics/Ffdc.md b/hwpf/fapi/docs/topics/Ffdc.md
deleted file mode 100755
index 85d696b1..00000000
--- a/hwpf/fapi/docs/topics/Ffdc.md
+++ /dev/null
@@ -1,149 +0,0 @@
-
-# Using the FFDC/XML Error Parsing Tools
-
-For FAPI2, the parseErrorInfo PERL script has changed. The main goal was to
-enable FFDC generation classes/methods. This enables a named-parameter
-model as well as tucking the FFDC generation into a container which can
-easily be used by the FAPI_ASSERT macro.
-
-## Using the Tools
-
-parseErrorInfo.pl [--empty-ffdc-classes] [--use-variable-buffers] --output-dir=<output dir> <filename1> <filename2> ...
-- This perl script will parse HWP Error XML files and creates the following files:
-- hwp_return_codes.H. HwpReturnCode enumeration (HWP generated errors)
-- hwp_error_info.H. Error information (used by FAPI_SET_HWP_ERROR when a HWP generates an error)
-- collect_reg_ffdc.C. Function to collect register FFDC
-- set_sbe_error.H. Macro to create an SBE error
-
-The --empty-ffdc-classes option is for platforms which don't collect FFDC. It will generate stub classes which
-will allow the source to have the same code, but compile to no-ops on certain platforms.
-
-The --use-variable-bufers option is for platforms which support variable buffers.
-
-The XML input is the same format as for P8
-
-## Using the Generated Classes
-
-Each error found in the XML files generates a class in hwp_ffdc_classes.H.
-The name of the class is the same as the return code itself (lower case)
-and the set methods are the same as the elements the xml described as
-needing colletion.
-
-Take for example RC_MBVPD_INVALID_MT_DATA. Here is the XML:
-
- <hwpError>
- <rc>RC_MBVPD_INVALID_MT_DATA</rc>
- <description>
- To get the proper MT data, we need a valid
- dimm rank combination.
- </description>
- <ffdc>RANK_NUM</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
-
-It generates an FFDC class which looks like this (simplified):
-
- class rc_mbvpd_invalid_mt_data
- {
- public:
- rc_mbvpd_invalid_mt_data( ... )
- { FAPI_ERR("To get the proper MT data, we need a valid dimm rank combination."); }
-
- rc_mbvpd_invalid_mt_data& set_rank_num(const T& i_value)
- { <setup ffdc> }
-
- void execute(void)
- {
- FAPI_SET_HWP_ERROR(..., RC_MBVPD_INVALID_MT_DATA);
- fapi2::logError( ... );
- }
- };
-
-To use this, for example, you may do:
-
- FAPI_ASSERT( foo != bar,
- rc_mbvpd_invalid_mt_data().set_rank_num(l_rank),
- "foo didn't equal bar" );
-
-Notice the description of the error is automatically logged.
-
-## Buffer Support
-
-In FAPI, a ReturnCode had a mechanism for "containing" an error from an
-ecmdDataBuffer. The API, setEcmdError(), no longer exists. fapi2::buffers
-return ReturnCodes, and as such the FFDC information is added in a manner
-consistent with the rest of the FFDC gathering.
-
-There is a new error xml file specifically for buffers called
-buffer_error.xml. It will generate an FFDC class which will take a buffer
-as an argument and generate the correct FFDC.
-
- <hwpError>
- <rc>RC_FAPI2_BUFFER</rc>
- <description>
- fapi2 error from a buffer operation
- </description>
- <buffer>BUFFER</buffer>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
-
-And its FFDC class:
-
- class rc_fapi2_buffer
- {
- public:
- rc_fapi2_buffer( ... )
- { FAPI_ERR("fapi2 error from a buffer operation"); }
-
- rc_fapi2_buffer& set_buffer(const fapi2::variable_buffer& i_value)
- { ... }
-
- template< typename T >
- rc_fapi2_buffer& set_buffer(const fapi2::buffer<T>& i_value)
- { ... }
- };
-
-And it can be used:
-
- fapi2::buffer<uint64_t> foo;
- fapi2::variable_buffer bar;
-
- FAPI_ASSERT( rc != FAPI2_RC_SUCCESS,
- rc_fapi2_buffer().set_fapi2_buffer(foo),
- "problem with buffer" );
-
- FAPI_ASSERT( rc != FAPI2_RC_SUCCESS,
- rc_fapi2_buffer().set_fapi2_buffer(bar),
- "problem with buffer" );
-
-Note the indifference to integral or variable buffers.
-
-## Error Log Generation
-
-FAPI had a function called fapiLogError() which would generate platform
-errors. The pattern was to call fapiLogError() at the end of the block
-which generated the FFDC. With the addition of the FFDC classes, this
-is no longer needed - the class knows to create these logs for you.
-
-However, the severity information is needed by this logging mechanism.
-It was an argument to fapiLogError(), and so it's been added to the
-constructor of the FFDC class:
-
-rc_repair_ring_invalid_ringbuf_ptr(fapi2::errlSeverity_t i_sev, ...)
-
-It defaults to "unrecoverable" and so only need be set for errors
-which have a different severity. That is, doing nothing will get you
-and error log with unrecoverable severity - which was the default
-for FAPI.
-
-## Known Limitations
-
-- Collecting register FFDC is not presently implemented.
-- Calling out to hwp to collect FFDC is not presently implemented.
-- The FirstFailureData class does not have a platform pointer \ No newline at end of file
diff --git a/hwpf/fapi/docs/topics/README.md b/hwpf/fapi/docs/topics/README.md
deleted file mode 100755
index ee7a9f07..00000000
--- a/hwpf/fapi/docs/topics/README.md
+++ /dev/null
@@ -1,166 +0,0 @@
-
-# FAPI 2 and FAPI Lite definitions for targets, buffers, error handling.
-
-## Were are some examples?
-
-Examples can be found in the "Related Pages" tab. These examples are constantly
-being expanded, please check back often.
-
-## How is the code structured?
-
-There is a new namespace; fapi2. This was created to prevent
-the FAPI 1 code, in the fapi namespace, from colliding with the new code.
-
-- Most documentation can be found under the class definition.
-- Documentation for FAPI_TRY/FAPI_ASSERT is in the file error_scope.H,
- and doesn't have a "tab" in the HTML like the classes and the namespaces do.
-- The documentation for TargeType is in the fapi namespace section.
-
-## What do I need to implement for my platform?
-
-### fapi2::buffer and fapi2::variable_buffer
-There should be nothing for platforms to implement in the buffer code.
-Smaller platforms which use fapi2::variable_buffer will need to
-ensure they have an implementation of std::vector. Hostboot has one
-which I'm sure you can steal if needed.
-
-### fapi2::Target and fapi2::TargetType
-Target is defined as a template of <TargetType, Value> where
-Value is defined per platform. Smaller platforms will want an integer
-type here, say uint64_t. Larger platforms may want to change this to
-a pointer to an underlying platform specific targeting object.
-
-The target traversing functions will need to be implemented per-platform.
-
-### Hardware Access (fapi2::getScom() ...)
-
-All of the hardware access functions are assumed to need implementation
-per platform.
-
-Please use template specialization for target types which need special
-treatment. The API documented here are generic, but they can be made
-very specific for a target type or composite type.
-
-For example (perhaps a poor example ...)
-
- template< TargetType K >
- ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address,
- buffer<uint64_t>& o_data)
-can become
-
- template<>
- ReturnCode getScom(const Target<TARGET_TYPE_DIMM>& i_target, const uint64_t i_address,
- buffer<uint64_t>& o_data)
-for DIMMs
-
-or
-
- template<>
- ReturnCode getScom(const Target<TARGET_TYPE_XBUS | TARGET_TYPE_ABUS>& i_target, const uint64_t i_address,
- buffer<uint64_t>& o_data)
-
-for XBUS and ABUS
-
-### fapi2::ReturnCode and error_scope.H
-
-For smaller platforms, a fapi::ReturnCode is nothing but a uint64_t. For
-larger platforms fapi2::ReturnCode inherits from a (TBD) FFDC object.
-
-There should be nothing to do for error_scope.H
-
-### fapi2::FirstFailureData (FFDC (work in progress))
-
-The platform specific FFDC object will need to be implemented, but the
-tooling to generate the FFDC functions used in FAPI_ASSERT will be provided.
-
-### Attributes
-
-As in FAPI 1, platforms will need to implement the mechanism behind the
-ATTR_GET/SET macros.
-
-## How to report an issue?
-
-Something in here is wrong - I'm sure of it. But you found it before someone
-else. Please don't fire off an email into the ether; it will get lost.
-Report an issue. Issues can be tracked and you can see what other issues are
-taking priority over yours, etc. It's just better for everyone.
-
-__To report an issue use Clear Quest__
- - Tier: ip Firmware
- - Reported Release: FW910
- - Subsystem: Hostboot
- - Component: FAPI
-
-## Not sure how to do something?
-
-So you've read the API documentation and it's horrible. You can't figure
-out how to get anything done. Could be an issue, could be you just need the
-crazy engineer who specified this horrible mess to see what struggles they
-created in their overzealous attempt to make things "simple."
-
-__Put it on the wiki__
-
-You could send someone an email, and that might work out great. But if you
-use the wiki you can be abrasive with your comments! Others might be able
-to help or offer an opinion or become a member of the virtual posse you're
-gathering to track down the crazy engineer. Good fun? You need a hobby.
-
-None the less, the crazy engineer should update the FAPI 2 documentation when
-the best practice is worked out, or create an issue to track the change
-(and add it to a test case.)
-
-Examples can be found in the "Related Pages" tab.
-
-Questions have been asked as topics on the PFD/HW for P9 community wiki.
-
-## Something missing? Before you report an issue ...
-
-Many of the API from FAPI 1 have been changed into templated functions. For
-example,
-
- ecmdDataBuffer::getDoubleWordLength() -> fapi::buffer::getLength<uint64_t>()
- ecmdDataBuffer::getWordLength() -> fapi::buffer::getLength<uint32_t>()
- ecmdDataBuffer::getHalfWordLength() -> fapi::buffer::getLength<uint16_t>()
-
-Some API have been deprecated in favor of other API, some API have been
-deprecated and are waiting for a use-case, and they'll be implemented.
-A list of deprecated ecmdDataBuffer functions can be found in the
-fapi::buffer_base class documentation.
-
-Some API have been removed/deprecated and are expected to return in a different
-form once the requirements are understood. Examples of this are the compressed
-fapi::buffers. While platforms may need these functions, they have been removed
-from the class itself as they are not vital to the class operation. These
-functions, as needed, will be replaced with utility functions which perform the
-operations needed for the platform. An example is fapi::Target::toString.
-It has been replaced with fapi::toString(Target, ...) which can be overloaded
-to take any type, and makes a nice utility for the fapi namespace.
-
-Some API have plum been forgotten. You should open an issue so we can track
-the implementation.
-
-## Where's the documentation for Attributes?
-
-The attribute macros are not expected to change for FAPI 2:
-
- l_rc = FAPI_ATTR_GET(<ID>, l_pTarget, l_val);
- l_rc = FAPI_ATTR_SET(<ID>, l_pTarget, l_val);
- l_rc = FAPI_ATTR_GET_PRIVILEGED(<ID>, l_pTarget, l_val);
- l_rc = FAPI_ATTR_SET_PRIVILEGED(<ID>, l_pTarget, l_val);
-
-There is one outstanding question:
- 1. whether we should/can change from a pointer to a target to a reference
- to a target to save a dereference on the smaller platforms (maybe it gets
- optimized out anyway?)
-
- Seems like the answer will be "no," but this depends on the PPE attribute
- look up scheme I think. Work in Progress.
-
-## Where's the FFDC documentation?
-
-Currently scheduled for End of February, 2015.
-
-## Other Known Issues
-
-- Thread local storage is broken on gcc 4.8, and the thread_local variables in
-error_scope.H will need to become pthread TLS for the time being.
diff --git a/hwpf/fapi/include/buffer.H b/hwpf/fapi/include/buffer.H
deleted file mode 100755
index 3f28c187..00000000
--- a/hwpf/fapi/include/buffer.H
+++ /dev/null
@@ -1,423 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer.H
- * @brief definitions for fapi2 variable integral buffers
- */
-
-#ifndef __FAPI2_INTEGRAL_BUFFER__
-#define __FAPI2_INTEGRAL_BUFFER__
-
-#include <buffer_base.H>
-#include <return_code.H>
-
-namespace fapi2
-{
- /// @brief Class representing a FAPI buffer<T>
- /// @note Buffers support method chaining. So, rather than
- /// this
- /// @code
- /// buffer<T> mask;
- /// mask.setBit<B>();
- /// mask.invert();
- /// my_buffer &= mask;
- /// @endcode
- /// You can do
- /// @code
- /// my_buffer &= buffer<T>().setBit<B>.invert();
- /// @endcode
- template <typename T>
- class buffer : public buffer_base<T>
- {
- public:
- /// Shortcut typedef to map to our traits class
- typedef typename buffer_base<T, buffer>::bits_type bits_type;
-
- ///
- /// @brief Integral buffer assignment constructor
- /// @param[in] i_value initial value of the buffer
- /// Meaningless for variable types and thus protected.
- ///
- inline buffer(T i_value = 0)
- {
- // Why not an initializer list? That would force buffer_base<T>
- // to have a ctor which took a T, and I want to avoid that in
- // the generic case: this makes it more clear that the two
- // ctor's (integral and container) behave very differently.
- // variable_buffers also have a ctor which takes a single
- // numerical value, and that represents a bit count, not an
- // initial value.
- this->iv_data = i_value;
- }
-
-
- /// @name Bit/Word Manipulation Functions
- ///@{
-
- ///
- /// @brief Return the length of the buffer in bits
- /// @return Length in bits
- ///
- inline constexpr uint32_t getBitLength(void) const
- { return bufferTraits<T>::bit_length(this->iv_data); }
-
- ///
- /// @brief Return the length of the buffer in OT units
- /// @return Length in OT units rounded up
- /// @tparam OT the type to get the length of. For example, if one
- /// wanted the length in double words, OT would be uint64_t
- /// (getLength<uint64_t>().) Similarly, to get the length in words,
- /// getLength<uin32_t>().
- ///
- template< typename OT >
- inline constexpr uint32_t getLength(void) const
- {
- return bufferTraits<T>::template size<OT>(this->iv_data);
- }
-
- ///
- /// @brief Templated setBit for integral types
- /// @tparam B the bit number to set.
- /// @return buffer& Useful for method chaining
- /// @note 0 is left-most
- /// @note Example: fapi2::buffer<uint64_t>().setBit<3>();
- ///
- template <bits_type B>
- inline buffer& setBit(void)
- {
- static_assert((B >= 0) &&
- (B < bufferTraits<T>::bits_per_unit), "failed range check");
-
- // Force iv_data to be dependent on the template type to force
- // its look up in the second phase
- this->iv_data |= (static_cast<T>(1)) << (bufferTraits<T>::bits_per_unit - B - 1);
- return *this;
- }
-
- ///
- /// @brief Clear a bit in buffer
- /// @tparam B Bit in buffer to clear.
- /// @return buffer& Useful for method chaining
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B >
- inline buffer& clearBit(void)
- {
- static_assert((B >= 0) &&
- (B < bufferTraits<T>::bits_per_unit), "failed range check");
-
- this->iv_data &= buffer<T>().setBit<B>().invert();
- return *this;
- }
-
- ///
- /// @brief Invert bit
- /// @tparam B Bit in buffer to invert.
- /// @return buffer& Useful for method chaining
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B >
- inline buffer& flipBit(void)
- {
- static_assert((B >= 0) &&
- (B < bufferTraits<T>::bits_per_unit), "failed range check");
-
- this->iv_data ^= buffer<T>().setBit<B>();
- return *this;
- }
-
- ///
- /// @brief Set a bit in the buffer
- /// @param[in] i_bit the bit number to set.
- /// @note 0 is left-most
- /// @return FAPI2_RC_SUCCESS if OK
- ///
- inline fapi2::ReturnCode setBit(const bits_type& i_bit)
- {
- if (i_bit >= bufferTraits<T>::bits_per_unit)
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- // Force iv_data to be dependent on the template type to force
- // its look up in the second phase
- this->iv_data |=
- (static_cast<T>(1)) << (bufferTraits<T>::bits_per_unit - i_bit - 1);
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Get the value of a bit in the buffer
- /// @tparam B Bit in buffer to get.
- /// @return true if bit is on, false if bit is off
- ///
- template< bits_type B >
- inline bool getBit(void) const
- {
- return buffer<T>().setBit<B>() & this->iv_data;
- }
-
- ///@}
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- // Note: Many (all?) of these are not needed and the compiler complains
- // as the cast to T yields a better operator. There are here mainly for
- // documenation purposes.
-
- ///
- /// @brief operator>>()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator>>(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator<<()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator<<(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator+()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator+(const T& rhs);
-#endif
-
- ///
- /// @brief operator+=()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator+=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|=()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator|=(const T& rhs);
-#endif
-
- ///
- /// @brief operator&=()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator&=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator|(const T& rhs);
-#endif
-
- ///
- /// @brief operator&()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator&(const T& rhs);
-#endif
-
- ///
- /// @brief operator^=()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator^=(const T& rhs);
-#endif
-
- ///
- /// @brief operator~()
- ///
-#ifdef DOXYGEN
- buffer<T>& operator~(const T& rhs) const;
-#endif
-
- ///
- /// @brief operator==()
- ///
-#ifdef DOXYGEN
- bool operator==(const T& rhs) const;
-#endif
-
- ///
- /// @brief operator!=()
- ///
-#ifdef DOXYGEN
- bool operator!=(const T& rhs) const;
-#endif
-
- ///
- /// @brief Copy part of a OT into the DataBuffer
- /// @tparam TS Start bit to insert into (target start)
- /// @tparam L Length of bits to insert
- /// @tparam SS Start bit in source
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken left aligned
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template<bits_type TS, bits_type L, bits_type SS, typename OT>
- inline void insert(const OT i_datain)
- {
- const bits_type target_length = parameterTraits<T>::bit_length;
- const bits_type source_length = parameterTraits<OT>::bit_length;
-
- // Error if input data don't make sense
- static_assert((TS + L) <= target_length,
- "insert(): (Target Start + Len) is out of bounds");
- static_assert((SS + L) <= source_length,
- "insert(): (Source Start + Len) is out of bounds");
- static_assert(TS < target_length,
- "insert(): Target Start is out of bounds");
- static_assert(SS < source_length,
- "insert(): Source Start is out of bounds");
-
- // Get mask value for Target buffer
- // Note: Need "& ((T)-1) because bit shift left for Target buffer doesn't roll off
- T mask =((T(~0) << (target_length - L)) & T(~0)) >> TS;
-
- // Calculate the equivalent position of the input Source start for the size of the Target buffer.
-
- // Assume OT is smaller (sizeof(T) > sizeof(OT))
- uint64_t sourceShift = abs(TS - ((target_length - source_length) + SS));
- uint64_t sourceAlign = T(i_datain) << sourceShift;
-
- if (sizeof(T) == sizeof(OT))
- {
- sourceShift = abs(SS - TS);
- sourceAlign = (SS > TS) ? ((T)i_datain) << sourceShift : ((T)i_datain) >> sourceShift;
- }
-
- if (sizeof(T) < sizeof(OT))
- {
- sourceShift = source_length - target_length;
- if (SS <= sourceShift)
- {
- sourceShift = sourceShift + TS - SS;
- sourceAlign = ((OT)i_datain) >> sourceShift;
- }
-
- // (SS > sourceShift)
- else
- {
- if (sourceShift > TS)
- {
- sourceShift = SS - sourceShift - TS;
- sourceAlign = OT(i_datain) << sourceShift;
- }
- else
- {
- sourceShift = SS - sourceShift;
- sourceAlign = (sourceShift < TS) ? OT(i_datain) >> sourceShift : OT(i_datain);
- }
- }
- }
-
- this->iv_data = (this->iv_data & ~mask) | (sourceAlign & mask);
- return;
- }
-
- ///
- /// @brief Copy in a right aligned value
- /// @tparam SB Start bit to insert into
- /// @tparam L Length of bits to insert
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken right aligned
- /// @note Data is assumed to be aligned on the word boundary of L
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template<bits_type TS, bits_type L, typename OT>
- inline void insertFromRight(const OT i_datain)
- {
- // Error if input data don't make sense
- static_assert(L < parameterTraits<OT>::bit_length,
- "insertFromRight(): Len >= input buffer");
- static_assert(TS < parameterTraits<T>::bit_length,
- "insertFromRight(): Target Start is out of bounds");
- static_assert((TS + L) <= parameterTraits<T>::bit_length,
- "InsertFromRight(): (Target Start + Len) is out of bounds");
-
- this->insert<TS, L, parameterTraits<OT>::bit_length - L>(i_datain);
- return;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam TS Start bit to insert into (target start)
- /// @tparam L Length of bits to insert
- /// @tparam SS Start bit in source
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template<bits_type TS, bits_type L, bits_type SS, typename OT>
- inline void extract(OT& o_out)
- {
- // Extraction is just an insert into o_out
-
- buffer<OT> out(o_out);
- out.insert<TS, L, SS>(this->iv_data);
- o_out = out;
- return;
- }
-
-#if 0
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam OT the type of the outgoing data - defaults to T
- /// @tparam SB Start bit to insert into - defaults to 0
- /// @tparam SS Start bit in o_out - default value is zero
- /// @tparam L Length of bits to copy - defaults to sizeof(OT) * 8
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @post Data is copied from specified location to o_out, right
- /// aligned. Data is only right aligned if L < sizeof(bits_type)
- ///
- template< typename OT = T, bits_type L = parameterTraits<OT>::bit_length,
- bits_type SB = 0, bits_type SS = 0 >
- void extractFromRight(OT& o_out);
-#endif
- ///@}
- };
-};
-
-#endif
diff --git a/hwpf/fapi/include/buffer_base.H b/hwpf/fapi/include/buffer_base.H
deleted file mode 100755
index a6e8c4ad..00000000
--- a/hwpf/fapi/include/buffer_base.H
+++ /dev/null
@@ -1,331 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer_base.H
- * @brief definitions for fapi2 buffer base class
- */
-
-#ifndef __FAPI2_BUFFER_BASE__
-#define __FAPI2_BUFFER_BASE__
-
-#include <stdint.h>
-#include <initializer_list>
-#include <error_scope.H>
-#include <buffer_parameters.H>
-#include <buffer_traits.H>
-#include <return_code.H>
-
-namespace fapi2
-{
- /// @brief Base class for buffers and variable buffers
- /// @tparam T is the type of iv_data (std::vector, etc)
- /// @tparam TT is the template trait, defaults to the trait for T
- ///
- /// Buffers can be of two styles; buffers made from an integral type and
- /// buffers made from a container. Integral type buffers, while limited
- /// in size, can be tightly controlled via the compiler by using c++
- /// templates.
- ///
- /// C++ templates allow for very explicit control, but yield a
- /// syntax different than the FAPI 1.x functional interface. For example,
- /// a fapi2::buffer is defined as having a type:
- /// @code
- /// fapi2::buffer<uint64_t> new_buffer;
- /// @endcode
- /// defines a buffer with exactly 64 bits, and can be manipulated by the
- /// compiler as a single intrgral value. These implementations result
- /// in concise instruction streams, and a platform may choose to implement
- /// all or some or none of the integral buffer types.
- ///
- /// Buffers which have containers as their underlying implementation
- /// are found in the class fapi2::variable_buffer. variable_buffer is little
- /// more than
- /// @code
- /// fapi2::buffer<fapi2::bits_container>
- /// @endcode
- /// where bits_container is the typedef of the underlying container (a
- /// vector of uint32_t, for example)
- ///
- /// Examples:<br>
- ///
- /// * Simple uint64_t buffer
- /// @code
- /// const uint32_t x = 2;
- ///
- /// // this data buffer will contain data in a uint64_t type
- /// fapi2::buffer<uint64_t> data;
- ///
- /// // Set using the template and a constant
- /// data.setBit<x>();
- ///
- /// // Set using the template and a value
- /// data.setBit<3>();
- ///
- /// // Set using the function interface, and a value
- /// data.setBit(1);
- ///
- /// // compiler gets smart.
- /// // movabs $0x7000000000000000,%rsi
- /// @endcode
- ///
- /// * variable_buffer, same thing
- /// @code
- ///
- /// const uint32_t x = 2;
- ///
- /// // Note: only 15 bits long
- /// fapi2::variable_buffer data(15);
- ///
- ///
- /// data.setBit(x);
- /// data.setBit(3);
- /// data.setBit(1);
- /// @endcode
- ///
- /// * method chaining
- /// Buffers support method chaining. So, rather than
- /// this
- /// @code
- /// buffer<T> mask;
- /// mask.setBit<B>();
- /// mask.invert();
- /// my_buffer &= mask;
- /// @endcode
- /// You can do
- /// @code
- /// my_buffer &= buffer<T>().setBit<B>.invert();
- /// @endcode
- ///
- /// * buffer operations
- /// @code
- ///
- /// // An 8 bit buffer, initialized with a value
- /// fapi2::buffer<uint8_t> eight_bits = 0xAA;
- /// fapi2::buffer<uint8_t> another_eight;
- /// fapi2::buffer<uint16_t> sixteen_bits;
- ///
- /// // You can't assign an 8 bit buffer to a 16 bit buffer.
- /// sixteen_bits = eight_bits; ERROR
- ///
- /// // But you can assign buffers of the same type
- /// another_eight = eight_bits;
- ///
- /// // You can assign constants (or other known values) directly:
- /// sixteen_bits = 0xAABB;
- /// @endcode
- ///
- /// * Variable buffer operations
- ///
- /// @code
- /// fapi2::variable_buffer data(16);
- ///
- /// // Very large buffers can be initialized rather than set bit by bit.
- /// const fapi2::variable_buffer bit_settings_known(
- /// {0xFFFF0000, 0xAABBF0F0,
- /// 0xFFFF0000, 0xAABBF0F0,
- /// 0xFFFF0000, 0xAABBF0F0,});
- ///
- /// // Assignment will expand or shrink the size automatically.
- /// data = bit_settings_known;
- ///
- /// // You can assign directly to the buffer:
- /// fapi2::variable_buffer other_bits;
- /// const fapi2::container_unit x = 0xFF00AA55;
- /// other_bits = {x, 0xDEADBEEF};
- /// @endcode
- ///
- template <typename T, typename TT = bufferTraits<T> >
- class buffer_base
- {
-
- public:
-
- /// Shortcut typedef to get to our traits class
- typedef typename TT::bits_type bits_type;
- /// Shortcut typedef to get to our traits class
- typedef typename TT::unit_type unit_type;
-
- ///
- /// @brief Default constructor
- /// @note iv_data will get the "default" construction, which is
- /// correct - 0 for integral types, an empty container for the others.
- ///
- buffer_base(void):
- iv_data()
- {}
-
- virtual ~buffer_base(void)
- {}
-
-#ifndef DOXYGEN
- /// @brief Print the contents of the buffer to stdout
- inline void print(void) const
- { TT::print(iv_data); }
-#endif
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T() const { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T&() { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline T& operator()(void) { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return Reference to the contents of the buffer
- ///
- inline const T& operator()(void) const { return iv_data; }
-
- ///
- /// @brief Get a pointer to the buffer bits
- /// @return Pointer to the buffer itself
- ///
- inline T* pointer(void) { return &iv_data; }
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- ///
- /// @brief Set an OT of data in buffer
- /// @param[in] i_value sizeof(OT) bits of data
- /// @param[in] i_offset Start OT (start word, for example) in buffer
- /// - defaults to 0 (will by default write the left most element)
- /// @return FAPI2_RC_SUCCESS on success, FAPI2_RC_OVERFLOW otherwise
- /// @note This is is only available for integral types. To set a
- /// variable_buffer into a variable_buffer, use insert()
- ///
- template< typename OT>
- inline fapi2::ReturnCode set(OT i_value, const bits_type i_offset = 0)
- {
- // Compile time check to make sure OT isn't a variable buffer
- static_assert( !std::is_same<bits_container, OT>::value,
- "Can't use a variable_buffer as input to set()" );
-
- //
- // There's a gotcha in here. size<OT>() returns the size in the buffer
- // in OT units *rounded up*. This is the actual size of the buffer, not
- // the perceived size of a variable_buffer. This should be OK however,
- // as what we're trying to prevent is overflow, which this should do.
- //
- const uint32_t length = TT:: template size<OT>(iv_data);
- static const bits_type bits_in_value = parameterTraits<OT>::bit_length;
- const bits_type bit_length = TT::bit_length(iv_data);
-
- if (i_offset >= length)
- {
- return FAPI2_RC_OVERFLOW;
- }
-
- // Create mask if part of this byte is not in the valid part of the buffer,
- // Shift it left by the amount of unused bits,
- // Clear the unused bits
- if (((i_offset + 1) == length) && (bit_length % bits_in_value)) {
- i_value &= parameterTraits<OT>::mask << ((bits_in_value * length) - bit_length);
- }
-
- parameterTraits<OT>::template write_element<unit_type>(TT::get_address(iv_data), i_value, i_offset);
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Set and entire buffer to X's
- /// @tparam X {0,1} depending if you want to clear (0)
- /// or fill (1) a buffer
- ///
- template< uint8_t X >
- inline void flush(void)
- {
- static_assert( (X == 1) || (X == 0), "bad argument to flush" );
- (0 == X) ? TT::clear(iv_data) : TT::set(iv_data);
- }
-
- ///
- /// @brief Invert entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer_base& invert(void)
- { TT::invert(iv_data); return *this; }
-
- ///
- /// @brief Bit reverse entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer_base& reverse(void)
- { TT::reverse(iv_data); return *this; }
-
- //@}
- protected:
-
- ///
- /// @brief Variable buffer constructor
- /// @param[in] i_value number of *bits* (sizeof(container_units) * 8)
- /// needed. Meaningless for integral types and thus protected.
- ///
- buffer_base(bits_type i_value);
-
- ///
- /// @brief Variable buffer construct from a list
- /// @param[in] i_value an initializer list to initialize the container.
- /// Meaningless for integral types and thus protected
- ///
- buffer_base(std::initializer_list<unit_type> i_value);
-
- ///
- /// @brief Clear the buffer
- ///
- inline void clear(void)
- { TT::clear(iv_data); }
-
- /// The contents of the buffer
- T iv_data;
- };
-
- template <typename T, typename TT>
- inline buffer_base<T, TT>::buffer_base(bits_type i_value):
- iv_data( std::max(bits_type(1),
- bits_type(i_value / 8 / sizeof(bits_type))))
- {
- }
-
- template <typename T, typename TT>
- inline buffer_base<T, TT>::buffer_base(std::initializer_list<unit_type> i_value):
- iv_data(i_value)
- {
- }
-};
-
-
-
-#endif
diff --git a/hwpf/fapi/include/buffer_parameters.H b/hwpf/fapi/include/buffer_parameters.H
deleted file mode 100755
index 3dc41b26..00000000
--- a/hwpf/fapi/include/buffer_parameters.H
+++ /dev/null
@@ -1,65 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer_parameters.H
- * @brief definitions for fapi2 buffer parameter types
- */
-
-#ifndef __FAPI2_BUFFER_PARAM__
-#define __FAPI2_BUFFER_PARAM__
-
-#include <stdint.h>
-
-namespace fapi2
-{
- /// @cond
- /// @brief Traits of buffer parameters - things passed in
- /// @tparam T is the type of i_value (typically an integral type)
- template<typename T>
- class parameterTraits
- {
- public:
- enum
- {
- mask = T(~0),
- bit_length = sizeof(T) * 8,
- byte_length = sizeof(T),
- };
-
- template<typename U>
- inline static void write_element(void* i_data, T i_value, uint32_t i_offset)
- {
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- T* ptr = (T*)i_data + (i_offset ^ ((sizeof(U) / sizeof(T)) - 1));
-#else
- T* ptr = (T*)i_data + i_offset;
-#endif
- *ptr = i_value;
- }
- };
- /// @endcond
-};
-
-#endif
diff --git a/hwpf/fapi/include/buffer_traits.H b/hwpf/fapi/include/buffer_traits.H
deleted file mode 100755
index 5fa9f0b7..00000000
--- a/hwpf/fapi/include/buffer_traits.H
+++ /dev/null
@@ -1,232 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer_traits.H
- * @brief trait definitions for fapi2 buffer base class
- */
-
-#ifndef __FAPI2_BUFFER_TRAITS__
-#define __FAPI2_BUFFER_TRAITS__
-
-#include <stdint.h>
-#include <vector>
-#include <algorithm>
-#include <buffer_parameters.H>
-
-// for debug printing ... can be removed for flight
-#include <iostream>
-#include <iterator>
-
-namespace fapi2
-{
- /// @cond
- /// Types representing a container of bits. Used to create
- /// variable_buffer.
- typedef uint32_t container_unit;
- typedef std::vector<container_unit> bits_container;
-
- /// @brief Traits of buffers
- // In general, we try to give buffers traits reflecting integral types. If
- // this fails, the compiler will let someone know.
- ///
- /// @tparam T is the type of iv_data (std::vector, etc)
- /// @tparam B is the type of the bit-specifier, typically uint32_t
- template<typename T, typename B = uint32_t>
- class bufferTraits
- {
- public:
-#ifndef DOXYGEN
- ///
- /// @brief Print a container of bits
- /// @param[in] i_data the container of bits
- ///
- static inline void print(const T& i_data)
- {
- // convert to uint64_t to prevent uint8_t from being
- // printed as a char.
- std::cout << "\tdata is "
- << std::hex
- << static_cast<uint64_t>(i_data)
- << std::dec << std::endl;
- }
-#endif
-
- ///
- /// @brief Return the size of the buffer in E units
- /// @tparam E, the element size.
- /// @param[in] io_buffer the buffer which to size
- /// @return The size of the buffer in E's rounded up
- ///
- template<typename E>
- constexpr static B size(const T& i_buffer)
- {
- return (bit_length(i_buffer) +
- (parameterTraits<E>::bit_length - 1)) /
- parameterTraits<E>::bit_length;
- }
-
- ///
- /// @brief Return the size of the buffer itself
- /// @param[in] io_buffer the buffer which to size
- /// @return The size of the buffer in bits (not units)
- ///
- constexpr static B bit_length(const T&)
- { return sizeof(T) * 8; }
-
- ///
- /// @brief Clear the buffer
- /// @param[in,out] io_buffer the buffer which to clear
- ///
- static inline void clear(T& io_buffer)
- { io_buffer = static_cast<T>(0); }
-
- ///
- /// @brief Set the buffer
- /// @param[in,out] io_buffer the buffer which to set
- ///
- static inline void set(T& io_buffer)
- { io_buffer = static_cast<T>(~0); }
-
- ///
- /// @brief Invert the buffer
- /// @param[in,out] io_buffer the buffer which to invert
- ///
- static inline void invert(T& io_buffer)
- { io_buffer = ~io_buffer; }
-
- ///
- /// @brief Reverse the buffer
- /// @param[in,out] io_buffer the buffer which to reverse
- ///
- static inline void reverse(T& io_buffer)
- {
- io_buffer =
- ((io_buffer & 0xAAAAAAAAAAAAAAAA) >> 1) |
- ((io_buffer & 0x5555555555555555) << 1);
- }
-
- ///
- /// @brief Get the address of the buffer as an array
- /// @param[in] i_buffer the buffer which to invert
- /// @return The address of the first element of the buffer
- ///
- static inline void* get_address(T& i_buffer)
- { return (void*)&i_buffer; }
-
- typedef B bits_type;
- typedef T unit_type;
- enum { bits_per_unit = sizeof(unit_type) * 8 };
- };
-
- //
- //
- /// @brief Traits for buffers which are a container of bits
- //
- //
- template<>
- class bufferTraits<bits_container, uint32_t>
- {
- public:
-#ifndef DOXYGEN
- ///
- /// @brief Print a container of bits
- /// @param[in] i_data the container of bits
- ///
- static inline void print(const bits_container& i_data)
- {
- std::cout << "\tdata is " << std::hex;
- std::copy(i_data.begin(), i_data.end(),
- std::ostream_iterator<container_unit>(std::cout, " "));
- std::cout << std::dec << std::endl;
- }
-#endif
-
- ///
- /// @brief Return the size of the buffer in E units
- /// @tparam E, the element size.
- /// @param[in] io_buffer the buffer which to size
- /// @return The size of the buffer in E's rounded up
- ///
- template<typename E>
- constexpr static uint32_t size(const bits_container& i_buffer)
- {
- return (bit_length(i_buffer) +
- (parameterTraits<E>::bit_length - 1)) /
- parameterTraits<E>::bit_length;
- }
-
- ///
- /// @brief Return the size of the buffer itself
- /// @param[in,out] io_buffer the buffer which to size
- /// @return The size of the buffer in bits (not units)
- ///
- static inline uint32_t bit_length(const bits_container& i_buffer)
- { return i_buffer.size() * sizeof(container_unit) * 8; }
-
- ///
- /// @brief Clear the buffer
- /// @param[in,out] io_buffer the buffer which to clear
- ///
- static inline void clear(bits_container& io_buffer)
- { io_buffer.assign(io_buffer.size(), 0); }
-
- ///
- /// @brief Set the buffer
- /// @param[in,out] io_buffer the buffer which to set
- ///
- static inline void set(bits_container& io_buffer)
- { io_buffer.assign(io_buffer.size(), ~0); }
-
- ///
- /// @brief Invert the buffer
- /// @param[in,out] io_buffer the buffer which to invert
- ///
- static inline void invert(bits_container& io_buffer)
- {
- std::transform(io_buffer.begin(), io_buffer.end(),
- io_buffer.begin(),
- [](container_unit u) { return ~u; });
- }
-
- ///
- /// @brief Get the address of the buffer as an array
- /// @param[in] i_buffer the buffer which to invert
- /// @return The address of the first element of the buffer
- ///
- static inline void* get_address(bits_container& i_buffer)
- {
- return (void*)&(i_buffer[0]);
- }
-
- typedef uint32_t bits_type;
- typedef container_unit unit_type;
- enum { bits_per_unit = sizeof(unit_type) * 8 };
- };
- /// @endcond
-};
-
-
-
-#endif
diff --git a/hwpf/fapi/include/collect_reg_ffdc.H b/hwpf/fapi/include/collect_reg_ffdc.H
deleted file mode 100755
index 495b2a3c..00000000
--- a/hwpf/fapi/include/collect_reg_ffdc.H
+++ /dev/null
@@ -1,78 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file collect_reg_ffdc.H
- *
- * @brief Defines the collectRegFfdc function that collects chip or
- * chiplet register FFDC data. This is called automatically by
- * FAPI_SET_HWP_ERROR (when a HWP creates an error) and
- * FAPI_ADD_INFO_TO_HWP_ERROR (when an FFDC HWP adds error information
- * to an existing error) if the error XML contains a
- * <collectRegisterFfdc> element. This function should not be called
- * directly by any user code. The function implementation is
- * automatically generated from FAPI Error XML files.
- */
-
-#ifndef FAPI2_COLLECT_REG_FFDC_H_
-#define FAPI2_COLLECT_REG_FFDC_H_
-
-#include <target.H>
-#include <return_code.H>
-#include <ffdc.H>
-#include <hwp_error_info.H>
-
-namespace fapi2
-{
-
- ///
- /// @brief Collects Register FFDC from a chip or chiplet
- ///
- /// @warning This should only be called by FAPI during FAPI_SET_HWP_ERROR or
- /// FAPI_ADD_INFO_TO_HWP_ERROR
- ///
- /// @param[in] i_target Pointer to Target to collect FFDC from
- /// @param[in] i_ffdcId FFDC Identifier
- /// @param[out] o_rc Reference to ReturnCode that FFDC is added to
- /// @param[in] i_child Specifies type of i_target's chiplet to collect
- /// FFDC from. If this parameter is TARGET_TYPE_NONE
- /// (default value), then register FFDC is collected
- /// from i_target, else, register FFDC is collected
- /// from all functional child chiplets i_target of
- /// the specified type
- /// @param[in] i_presChild When specified, register FFDC will be collected
- /// from i_target's registers based on present chiplets
- /// of this type.
- /// @param[in] i_childOffsetMult Specifies the chiplet position offset multiplier.
- /// This is used in calculating the scom register
- /// addresses when collecting register FFDC based on
- /// present child chiplets.
- ///
- void collectRegFfdc(const fapi2::Target<TARGET_TYPE_ALL>* i_target,
- const fapi2::HwpFfdcId i_ffdcId,
- fapi2::ReturnCode & o_rc,
- const TargetType i_child = TARGET_TYPE_NONE,
- const TargetType i_presChild = TARGET_TYPE_NONE,
- uint32_t i_childOffsetMult = 0);
-}
-
-#endif
diff --git a/hwpf/fapi/include/error_info.H b/hwpf/fapi/include/error_info.H
deleted file mode 100755
index b28ab011..00000000
--- a/hwpf/fapi/include/error_info.H
+++ /dev/null
@@ -1,854 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-
-///
-/// @file error_info.H
-/// @brief Defines the Error Information structures and classes
-///
-
-#ifndef FAPI2_ERRORINFO_H_
-#define FAPI2_ERRORINFO_H_
-
-#include <stdint.h>
-#include <memory>
-#include <vector>
-#include <target.H>
-#include <assert.h>
-
-namespace fapi2
-{
- class ReturnCode;
-
- ///
- /// @brief Type to hold the ffdc element in the ffdc class
- /// Needed so that the size can be squirled away before the
- /// macro is called.
- ///
- class ffdc_t
- {
- public:
- ffdc_t(void)
- {}
-
- operator const void*() const { return iv_value.first; }
- operator const uint8_t() const
- { return *(reinterpret_cast<const uint8_t*>(iv_value.first)); }
-
- int16_t size(void) const { return iv_value.second; }
- int16_t& size(void) { return iv_value.second; }
-
- const void* ptr(void) const { return iv_value.first; }
- const void*& ptr(void) { return iv_value.first; }
-
- private:
- std::pair<const void*, int16_t> iv_value;
- };
-
- ///
- /// @brief Enumeration of ErrorInfo FFDC sizes that are used to indicate a
- /// special type that cannot simply be memcopied
- enum ErrorInfoFfdcSize
- {
- EI_FFDC_SIZE_BUF = 0xffff, // fapi2::buffer<T>
- EI_FFDC_SIZE_TARGET = 0xfffe, // fapi2::Target
- EI_FFDC_SIZE_VBUF = 0xfffd, // fapi2::variable_buffer
- EI_FFDC_MAX_SIZE = 0x1000, // Limit regular FFDC capture to 4kb
- };
-
- ///
- /// @brief Enumeration of error log severity.
- ///
- enum errlSeverity_t
- {
- FAPI2_ERRL_SEV_RECOVERED = 0x10, /// Not seen by customer
- FAPI2_ERRL_SEV_PREDICTIVE = 0x20, /// Error recovered but customer will see
- FAPI2_ERRL_SEV_UNRECOVERABLE = 0x40 /// Unrecoverable, general
- };
-
- ///
- /// @brief Enumeration of ErrorInfo types
- ///
- enum ErrorInfoType
- {
- EI_TYPE_FFDC = 0,
- EI_TYPE_HW_CALLOUT = 1,
- EI_TYPE_PROCEDURE_CALLOUT = 2,
- EI_TYPE_BUS_CALLOUT = 3,
- EI_TYPE_CDG = 4, // Target Callout/Deconfig/GARD
- EI_TYPE_CHILDREN_CDG = 5, // Children Callout/Deconfig/GARD
- EI_TYPE_COLLECT_TRACE = 6,
- EI_LAST_TYPE = EI_TYPE_COLLECT_TRACE + 1,
- };
-
- ///
- /// @enum HwCallout
- ///
- /// This enumeration defines the possible Hardware Callouts that are not
- /// represented by fapi2::Targets
- ///
- /// Note that platform code may depend on the enum values starting at 0 and
- /// incrementing in order to efficiently convert to a platform callout value
- /// so do not reorder without consulting all platforms
- ///
- namespace HwCallouts
- {
- enum HwCallout
- {
- // Where indicated, a HW Callout in FAPI Error XML must include a
- // reference target that is used to identify the HW. e.g. for
- // TOD_CLOCK, the proc chip that the clock is attached to must be
- // specified
- TOD_CLOCK = 0, // Include proc-chip ref (or child chiplet)
- MEM_REF_CLOCK = 1, // Include membuf-chip ref (or child chiplet)
- PROC_REF_CLOCK = 2, // Include proc-chip ref (or child chiplet)
- PCI_REF_CLOCK = 3, // Include proc-chip ref (or child chiplet)
- FLASH_CONTROLLER_PART = 4,
- PNOR_PART = 5,
- SBE_SEEPROM_PART = 6,
- VPD_PART = 7,
- LPC_SLAVE_PART = 8,
- GPIO_EXPANDER_PART = 9,
- SPIVID_SLAVE_PART = 10,
- };
- }
-
- ///
- /// @enum ProcedureCallout
- ///
- /// This enumeration defines the possible Procedure Callouts
- /// These instruct the customer/customer-engineer what to do
- ///
- /// Note that platform code may depend on the enum values starting at 0 and
- /// incrementing in order to efficiently convert to a platform callout value
- /// so do not reorder without consulting all platforms
- ///
- namespace ProcedureCallouts
- {
- enum ProcedureCallout
- {
- CODE = 0, // Code problem
- LVL_SUPPORT = 1, // Call next level of support
- MEMORY_PLUGGING_ERROR = 2, // DIMM Plugging error
- BUS_CALLOUT = 3, // Bus Called Out
- };
- }
-
- ///
- /// @enum CalloutPriority
- ///
- /// This enumeration defines the possible Procedure and Target callout priorities
- ///
- /// Note that platform code may depend on the enum values starting at 0 and
- /// incrementing in order to efficiently convert to a platform priority value
- /// so do not reorder without consulting all platforms
- ///
- namespace CalloutPriorities
- {
- enum CalloutPriority
- {
- LOW = 0,
- MEDIUM = 1,
- HIGH = 2,
- };
- }
-
- ///
- /// @enum Collect Trace
- ///
- /// This enumeration defines the possible firmware traces to collect
- ///
- namespace CollectTraces
- {
- const uint32_t TRACE_SIZE = 256; // limit collected trace size
- enum CollectTrace
- {
- FSI = 1,
- SCOM = 2,
- SCAN = 3,
- MBOX = 4,
- };
- }
-
- ///
- /// @brief Get FFDC Size
- ///
- /// This is called by the FAPI_SET_HWP_ERROR macro to find out the size of
- /// FFDC data. If the data is of a special type that is handled differently
- /// than types that are simply memcopied then it is handled by a template
- /// specialization.
- /// If this function template is instantiated with a pointer, the compile
- /// will fail.
- ///
- /// @return uint16_t. Size of the FFDC data
- ///
- template<typename T>
- inline uint16_t getErrorInfoFfdcSize(const T &)
- {
- static_assert(sizeof(T) <= EI_FFDC_MAX_SIZE,
- "FFDC too large to capture");
- return sizeof(T);
- }
-
- ///
- /// @brief Compile error if caller tries to get the FFDC size of a pointer
- ///
- template<typename T>
- inline uint16_t getErrorInfoFfdcSize(const T*)
- {
- static_assert(std::is_pointer<T>::value,
- "pointer passed to getErrorInfoFfdcSize");
- }
-
- ///
- /// @brief Get FFDC Size specialization for fapi2::Target
- ///
- template<>
- inline uint16_t getErrorInfoFfdcSize(const fapi2::Target<TARGET_TYPE_ALL>*)
- {
- return EI_FFDC_SIZE_TARGET;
- }
-
- ///
- /// @brief Get FFDC Size specialization for ffdc method arguments
- /// @note The ffdc class sets the std::pair when the method is
- /// called so the size has been calculated. All that needs to be
- /// done here is to grab it. We do it this way so the macro definitions
- /// can be the same whether the ffdc class is used or the old-school
- /// locals.
- ///
- template<>
- inline uint16_t getErrorInfoFfdcSize(const fapi2::ffdc_t& i_thing)
- {
- return i_thing.size();
- }
-
- ///
- /// @class ErrorInfoFfdc
- ///
- /// This class contains a copy of some FFDC data
- ///
- class ErrorInfoFfdc
- {
- public:
- ///
- /// @brief Constructor
- ///
- /// @param[in] i_ffdcId FFDC Identifier (used to decode FFDC)
- /// @param[in] i_pFfdc Pointer to the FFDC to copy
- /// @param[in] i_size Size of the FFDC to copy
- ///
- ErrorInfoFfdc(const uint32_t i_ffdcId,
- const void* i_pFfdc,
- const uint32_t i_size);
-
- ///
- /// @brief Get a pointer to the FfdcData
- ///
- /// @param[out] o_size Reference to uint32_t that is filled in with
- /// the FFDC size
- ///
- /// @return void *. Pointer to the FFDC
- ///
- inline const void* getData(uint32_t & o_size) const
- {
- o_size = iv_size;
- return iv_pFfdc.get();
- }
-
- ///
- /// @brief Get a pointer to the FfdcData
- /// @return void *. Pointer to the FFDC
- ///
- inline void* getData(void) const
- { return iv_pFfdc.get(); }
-
- ///
- /// @brief Get the FFDC Identifier
- ///
- /// @return uint32_t The FFDC Identifier
- ///
- inline uint32_t getFfdcId(void)
- { return iv_ffdcId; }
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- private:
-
- // FFDC Identifier
- uint32_t iv_ffdcId;
-
- // Pointer to the FFDC
- std::shared_ptr<uint8_t> iv_pFfdc;
-
- // Size of the FFDC
- uint32_t iv_size;
-
- // Disabled
- ErrorInfoFfdc(const ErrorInfoFfdc &) = delete;
- ErrorInfoFfdc & operator=(const ErrorInfoFfdc &) = delete;
- };
-
- ///
- /// @struct ErrorInfoHwCallout
- ///
- /// This struct contains hardware to callout
- ///
- struct ErrorInfoHwCallout
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_hw Hardware to callout
- /// @param[in] i_calloutPriority Priority of callout
- /// @param[in] i_refTarget Reference to reference target
- ///
- ErrorInfoHwCallout(
- const HwCallouts::HwCallout i_hw,
- const CalloutPriorities::CalloutPriority i_calloutPriority,
- const Target<TARGET_TYPE_ALL> & i_refTarget);
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // The hw to callout
- HwCallouts::HwCallout iv_hw;
-
- // The callout priority
- CalloutPriorities::CalloutPriority iv_calloutPriority;
-
- // The reference target (needed for some HW callouts to identify what to
- // callout). The target handle is NULL if there is no reference target.
- Target<TARGET_TYPE_ALL> iv_refTarget;
- };
-
- ///
- /// @struct ErrorInfoProcedureCallout
- ///
- /// This struct contains a procedure to callout
- ///
- struct ErrorInfoProcedureCallout
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_procedure Procedure to callout
- /// @param[in] i_calloutPriority Priority of callout
- ///
- ErrorInfoProcedureCallout(
- const ProcedureCallouts::ProcedureCallout i_procedure,
- const CalloutPriorities::CalloutPriority i_calloutPriority);
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // The procedure to callout
- ProcedureCallouts::ProcedureCallout iv_procedure;
-
- // The callout priority
- CalloutPriorities::CalloutPriority iv_calloutPriority;
- };
-
- ///
- /// @struct ErrorInfoBusCallout
- ///
- /// This struct contains a bus to callout
- ///
- struct ErrorInfoBusCallout
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_target1 Reference to target on one end of the bus
- /// @param[in] i_target2 Reference to target on other end of the bus
- /// @param[in] i_calloutPriority Priority of callout
- ///
- ErrorInfoBusCallout(
- const Target<TARGET_TYPE_ALL> & i_target1,
- const Target<TARGET_TYPE_ALL> & i_target2,
- const CalloutPriorities::CalloutPriority i_calloutPriority);
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // The targets on each end of the bus to callout
- Target<TARGET_TYPE_ALL> iv_target1;
- Target<TARGET_TYPE_ALL> iv_target2;
-
- // The callout priority
- CalloutPriorities::CalloutPriority iv_calloutPriority;
- };
-
- ///
- /// @struct ErrorInfoCDG
- ///
- /// This struct contains a target to callout/deconfigure/GARD
- ///
- struct ErrorInfoCDG
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_target Reference to the target to c/d/g
- /// @param[in] i_callout True if Target should be called out
- /// @param[in] i_deconfigure True if Target should be deconfigured
- /// @param[in] i_gard True if Target should be GARDed
- /// @param[in] i_priority The priority of any callout
- ///
- ErrorInfoCDG(const Target<TARGET_TYPE_ALL> & i_target,
- const bool i_callout,
- const bool i_deconfigure,
- const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority);
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // The target to callout/deconfigure/GARD
- Target<TARGET_TYPE_ALL> iv_target;
-
- // Callout Information
- bool iv_callout;
- CalloutPriorities::CalloutPriority iv_calloutPriority;
-
- // Deconfigure Information
- bool iv_deconfigure;
-
- // GARD Information
- bool iv_gard;
- };
-
- ///
- /// @struct ErrorInfoChildrenCDG
- ///
- /// This struct contains children targets to callout/deconfigure/GARD
- ///
- /// Children by containment can be CDG (chiplets belonging to a parent chip)
- /// e.g.
- /// - PROC_CHIP -> EX_CHIPLET
- /// - MEMBUF_CHIP -> MBA_CHIPLET
- /// Children by affinity can be CDG.
- /// Any from PROC_CHIP->MCS_CHIPLET->MEMBUF_CHIP->MBA_CHIPLET->DIMM e.g.
- /// - PROC_CHIP->MEMBUF_CHIP
- /// - MEMBUF_CHIP->DIMM
- /// - MBA_CHIPLET->DIMM
- /// Port and Number criteria can be applied to the child target as
- /// detailed in the constructor
- ///
- struct ErrorInfoChildrenCDG
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_parent Reference to the parent target
- /// @oaram[in] i_childType Child target type to c/d/g
- /// @param[in] i_callout True if Target should be called out
- /// @param[in] i_deconfigure True if Target should be deconfigured
- /// @param[in] i_gard True if Target should be GARDed
- /// @param[in] i_priority The priority of any callout
- /// @param[in] i_childPort Child Port
- /// For DIMM children, the MBA port number
- /// @param[in] i_childNum Child Number
- /// For DIMM children, the dimm socket number
- /// For Chip children, the chip position
- /// For Chiplet children, the chiplet unit pos
- ///
- ErrorInfoChildrenCDG(const Target<TARGET_TYPE_ALL> & i_parentChip,
- const TargetType i_childType,
- const bool i_callout,
- const bool i_deconfigure,
- const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority,
- const uint8_t i_childPort, const uint8_t i_childNum);
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // The parent chip
- Target<TARGET_TYPE_ALL> iv_parent;
-
- // The child target types to c/d/g
- TargetType iv_childType;
-
- // Callout Information
- bool iv_callout;
- CalloutPriorities::CalloutPriority iv_calloutPriority;
-
- // Deconfigure Information
- bool iv_deconfigure;
-
- // GARD Information
- bool iv_gard;
-
- // Child Port
- static const uint8_t ALL_CHILD_PORTS = 0xff;
- uint8_t iv_childPort;
-
- // Child Number
- static const uint8_t ALL_CHILD_NUMBERS = 0xff;
- uint8_t iv_childNumber;
- };
-
- ///
- /// @struct ErrorInfoCollectTrace
- ///
- /// This struct contains trace ID to add to the error log
- ///
- struct ErrorInfoCollectTrace
- {
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_trace
- ///
- ErrorInfoCollectTrace(CollectTraces::CollectTrace i_traceId);
-
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // trace
- CollectTraces::CollectTrace iv_eiTraceId;
- };
-
- ///
- /// @struct ErrorInfo
- ///
- /// This struct defines the error information associated with a fapi2::ffdc
- /// Users are allowed to access the data directly
- ///
- struct ErrorInfo
- {
-
-#ifdef FAPI_CUSTOM_MALLOC
- ///
- /// @brief Overload new operator to use platform-specific allocator
- ///
- /// @param[in] i_sz Size of memory to allocate in bytes
- ///
- /// @return Pointer to allocated memory
- ///
- static void* operator new(size_t i_sz);
-
- ///
- /// @brief Overload delete operator to use platform-specific deallocator
- ///
- /// @param[in] i_ptr Pointer to memory previously allocated with new
- ///
- static void operator delete(void* i_ptr);
-#endif
-
- // Vector of FFDC Data
- std::vector<std::shared_ptr<ErrorInfoFfdc> > iv_ffdcs;
-
- // Vector of Hardware to callout
- std::vector<std::shared_ptr<ErrorInfoHwCallout> > iv_hwCallouts;
-
- // Vector of procedures to callout
- std::vector<std::shared_ptr<ErrorInfoProcedureCallout> >
- iv_procedureCallouts;
-
- // Vector of buses to callout
- std::vector<std::shared_ptr<ErrorInfoBusCallout> > iv_busCallouts;
-
- // Vector of targets to callout/deconfigure/GARD
- std::vector<std::shared_ptr<ErrorInfoCDG> > iv_CDGs;
-
- // Vector of children targets to callout/deconfigure/GARD
- std::vector<std::shared_ptr<ErrorInfoChildrenCDG> > iv_childrenCDGs;
-
- // Vector of traces to collect
- std::vector<std::shared_ptr<ErrorInfoCollectTrace> > iv_traces;
- };
-
- ///
- /// @brief Structure representing a single ErrorInfo entry.
- ///
- /// An array of these is passed to the addErrorInfo function when a HWP
- /// generates an error by calling the FAPI_SET_HWP_ERROR macro
- // Why aren't these inherited classes? Saves on allocation overhead.
- // We create an array of ErrorInfoEntries as automatics when we start
- // FFDC collection. If we did this as inherited classes it would either
- // be allocating and deallocating or we'd need to allocate an array of
- // the largest and map each struct in to it. That's messy to do without
- // unions (that's what they're for) so we do it like this. The inherited
- // model would result in a jump table anyway, so we're basically doing
- // all of that by hand to avoid the mess.
- //
- struct ErrorInfoEntryFfdc
- {
- uint8_t iv_ffdcObjIndex;
- uint16_t iv_ffdcSize;
- uint32_t iv_ffdcId;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Structure representing a hardware callout
- ///
- struct ErrorInfoEntryHwCallout
- {
- uint8_t iv_hw;
- uint8_t iv_calloutPriority;
- uint8_t iv_refObjIndex;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Structure representing a procedure callout
- ///
- struct ErrorInfoEntryProcCallout
- {
- uint8_t iv_procedure;
- uint8_t iv_calloutPriority;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
-
- ErrorInfoEntryProcCallout(uint8_t i_procedure, uint8_t i_calloutPriority):
- iv_procedure(i_procedure),
- iv_calloutPriority(i_calloutPriority)
- {}
-
- ErrorInfoEntryProcCallout(void) = default;
- };
-
- ///
- /// @brief Structure representing a bus callout
- ///
- struct ErrorInfoEntryBusCallout
- {
- uint8_t iv_endpoint1ObjIndex;
- uint8_t iv_endpoint2ObjIndex;
- uint8_t iv_calloutPriority;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Structure representing a target callout
- ///
- struct ErrorInfoEntryTargetCDG
- {
- uint8_t iv_targetObjIndex;
- uint8_t iv_callout;
- uint8_t iv_deconfigure;
- uint8_t iv_gard;
- uint8_t iv_calloutPriority;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Structure representing a child callout
- ///
- struct ErrorInfoEntryChildrenCDG
- {
- uint8_t iv_parentObjIndex;
- uint8_t iv_callout;
- uint8_t iv_deconfigure;
- uint32_t iv_childType;
- uint8_t iv_childPort;
- uint8_t iv_childNumber;
- uint8_t iv_gard;
- uint8_t iv_calloutPriority;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Structure representing collected trace information
- ///
- struct ErrorInfoEntryCollectTrace
- {
- uint32_t iv_eieTraceId;
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const;
- };
-
- ///
- /// @brief Union of all the error info types
- ///
- struct ErrorInfoEntry
- {
- uint8_t iv_type; // Value from ErrorInfoType
- union
- {
- ErrorInfoEntryFfdc ffdc;
- ErrorInfoEntryHwCallout hw_callout;
- ErrorInfoEntryProcCallout proc_callout;
- ErrorInfoEntryBusCallout bus_callout;
- ErrorInfoEntryTargetCDG target_cdg;
- ErrorInfoEntryChildrenCDG children_cdg;
- ErrorInfoEntryCollectTrace collect_trace;
- };
-
- ///
- /// @brief Add error information to the FFDC object
- /// @param[in] i_info a shared pointer to the error info
- /// @param[in] i_object the list of ffdc objects being collected
- ///
- void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- // "unhandled error info type");
- assert(iv_type < EI_LAST_TYPE);
-
- switch(iv_type)
- {
- case EI_TYPE_FFDC:
- ffdc.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_HW_CALLOUT:
- hw_callout.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_PROCEDURE_CALLOUT:
- proc_callout.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_BUS_CALLOUT:
- bus_callout.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_CDG:
- target_cdg.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_CHILDREN_CDG:
- children_cdg.addErrorInfo(i_info, i_object);
- break;
- case EI_TYPE_COLLECT_TRACE:
- collect_trace.addErrorInfo(i_info, i_object);
- break;
- };
- return;
- }
- };
-}
-
-#endif // FAPI2_ERRORINFO_H_
diff --git a/hwpf/fapi/include/error_scope.H b/hwpf/fapi/include/error_scope.H
deleted file mode 100755
index d510c6de..00000000
--- a/hwpf/fapi/include/error_scope.H
+++ /dev/null
@@ -1,104 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file error_scope.H
- * @brief definitions which create a scope for automatic error handling
- */
-
-#ifndef __FAPI2_ERROR_SCOPE__
-#define __FAPI2_ERROR_SCOPE__
-
-#include <stdint.h>
-#include <thread>
-#include <stdio.h>
-#include <return_code.H>
-
-/// @cond
-#define FAPI_VA_NARGS_IMPL(_1, _2, _3, _4, _5, N, ...) N
-#define FAPI_VA_NARGS(...) FAPI_VA_NARGS_IMPL(__VA_ARGS__, 5, 4, 3, 2, 1)
-
-#define FAPI_TRY_IMPL2(count, ...) FAPI_TRY ## count (__VA_ARGS__)
-#define FAPI_TRY_IMPL(count, ...) FAPI_TRY_IMPL2(count, __VA_ARGS__)
-
-#define FAPI_TRY_NO_TRACE( __operation__ ) \
- if ((fapi2::current_err = (__operation__)) != fapi2::FAPI2_RC_SUCCESS) \
- { \
- goto clean_up; \
- }
-
-// Why debug? Because this isn't a mechanism to gather FFDC
-// one should be using FAPI_ASSERT. However, it is nice to
-// have a conditional trace in the event of a failure in the
-// operation, so that's why this is here.
-#define FAPI_TRY_TRACE( __operation__, ... ) \
- if ((fapi2::current_err = (__operation__)) != fapi2::FAPI2_RC_SUCCESS) \
- { \
- FAPI_DBG(__VA_ARGS__); \
- goto clean_up; \
- }
-
-#define FAPI_TRY1 FAPI_TRY_NO_TRACE
-#define FAPI_TRY2 FAPI_TRY_TRACE
-#define FAPI_TRY3 FAPI_TRY_TRACE
-#define FAPI_TRY4 FAPI_TRY_TRACE
-#define FAPI_TRY5 FAPI_TRY_TRACE
-/// @endcond
-
-///
-/// @brief Wrapper to check an operation for an error state
-/// and jump to the label cleam_up if there is an error.
-/// @param[in] __operation__ an operation which returns a fapi::ReturnCode
-/// @param[in] ... vararg format/agruments for trace output (optional)
-/// @note This implementation does not support PIB error masks or
-/// FSP operational states.
-/// @warning The trace information is only going to be seen during
-/// debug, it's not an error or informational trace. This is because
-/// traces might not be seen in the field. If you want information
-/// you will see on a field error, use FAPI_ASSERT.
-///
-#ifdef DOXYGEN
-#define FAPI_TRY(__operation__, ...) FAPI_TRY_IMPL
-#else
-#define FAPI_TRY(...) FAPI_TRY_IMPL(FAPI_VA_NARGS(__VA_ARGS__), __VA_ARGS__)
-#endif
-
-///
-/// @brief Assert a conditional is true.
-/// If it is not, the FFDC gathering function is called and the
-/// trace is output as a FAPI error trace.
-/// @param[in] __conditional__ the condition to assert
-/// @param[in] __ffdc__ the FFDC gathering function
-/// @param[in] ... varargs, as input to FAPI_ERR
-///
-#define FAPI_ASSERT( __conditional__, __ffdc__, ... ) \
- if (! (__conditional__)) \
- { \
- (__ffdc__).execute(); \
- FAPI_ERR(__VA_ARGS__); \
- goto clean_up; \
- }
-
-
-#endif
diff --git a/hwpf/fapi/include/ffdc.H b/hwpf/fapi/include/ffdc.H
deleted file mode 100755
index fd79d92e..00000000
--- a/hwpf/fapi/include/ffdc.H
+++ /dev/null
@@ -1,191 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file ffdc.H
- * @brief Defines the FirstFailureData class
- */
-
-#ifndef FAPI2_FFDC_H_
-#define FAPI2_FFDC_H_
-
-#include <memory>
-#include <hwp_return_codes.H>
-#include <plat_trace.H>
-#include <error_info.H>
-#include <target.H>
-#include <assert.h>
-
-using fapi2::TARGET_TYPE_ALL;
-
-namespace fapi2
-{
- ///
- /// @brief Check the type of a variable
- ///
- /// This function can be called to check that a variable type is as expected
- /// @note This mechanism will allow for cast ctor's which other static type
- /// checking might not.
- ///
- template<typename T>
- inline
- void checkType(const T &) {}
-
- class ReturnCode;
-
- ///
- /// @class FirstFailureData
- ///
- /// This class provides storage and methods for creating and manipulating
- /// FFDC.
- /// It is not needed on all platforms - platforms which need this class have
- /// specified this by forcing their fapi2::ReturnCode to be a subclass of
- /// this class.
- ///
- template< class R = fapi2::ReturnCode >
- class FirstFailureData
- {
- public:
-
- ///
- /// @brief Default constructor.
- /// @note We don't create our error info be default. It will be created
- /// when its needed in the setHwpError() method. Note that dereferencing
- /// the error info without will create a problem.
- ///
- FirstFailureData(void):
- iv_info( nullptr )
- {}
-
- ///
- /// @brief Copy Constructor
- ///
- /// @param[in] i_right Reference to FirstFailureData to copy
- /// @note Generates default copy constructor - no deep pointer
- /// copies necessary.
- ///
- FirstFailureData(const FirstFailureData & i_right) = default;
-
- ///
- /// @brief Destructor
- ///
- ~FirstFailureData(void) = default;
-
- ///
- /// @brief Assignment Operator.
- ///
- /// @param[in] i_right Reference to FirstFailureData to assign from.
- /// @return Reference to 'this' FirstFailureData
- ///
- FirstFailureData & operator=(const FirstFailureData & i_right) = default;
-
- ///
- /// @brief Sets a HWP error. Sets the rcValue to the supplied value (from
- /// the HwpFirstFailureData enumeration) and deletes any
- /// associated data.
- ///
- /// HWP code must call the FAPI_SET_HWP_ERROR macro rather than this
- /// function
- /// directly to generate an error so that any error information is
- /// automatically added to the FirstFailureData
- ///
- /// @param[in] i_rcValue Error value to set
- ///
- inline void _setHwpError(const fapi2::HwpReturnCode i_rcValue)
- {
- FAPI_ERR("_setHwpError: Creating HWP error 0x%x", i_rcValue);
- static_cast<R*>(this)->operator=(i_rcValue);
-
- // Forget about any associated data (this is a new error)
- iv_info.reset(new ErrorInfo());
- }
-
- ///
- /// @brief Get a pointer to any PlatData. FirstFailureData is still
- /// responsible for deletion of the data. The caller must not
- /// delete
- ///
- /// This is called by PLAT. The expected use-case is to get a pointer to
- /// a platform error log. The data pointer should be used immediately in
- /// the same thread.
- ///
- /// @return void *. Pointer to any PlatData. If NULL then no data
- ///
- void* getData(void) const;
-
- ///
- /// @brief Get a pointer to any PlatData and release ownership from
- /// FirstFailureData. The caller is responsible for deletion.
- ///
- /// This is called by PLAT. The expected use-case is to retrieve a
- /// platform error log.
- ///
- /// @return void*. Pointer to any PlatData. If NULL then no data
- ///
- void* releaseData(void);
-
- ///
- /// @brief Add ErrorInfo
- ///
- /// This is called by the FAPI_SET_HWP_ERROR and macro to add ErrorInfo
- /// to the FirstFailureData when a HWP generates an error. The function
- /// is designed to add all the ErrorInfo at once rather than the
- /// FAPI_SET_HWP_ERROR macro making multiple function calls to add each
- /// piece of ErrorInfo individually in order to minimize code size
- ///
- /// @param[in] i_pObjects Pointer to array of const pointers to const
- /// objects that are referred to by ErrorInfoEntry objects
- /// @param[in] i_pEntries Pointer to array of ErrorInfoEntry objects
- /// defining the ErrorInfo that needs to be added
- /// @param[in] i_count Number of ErrorInfoEntry entries
- ///
- void addErrorInfo(const void* const * i_pObjects,
- const ErrorInfoEntry* i_pEntries,
- const uint8_t i_count);
-
- ///
- /// @brief Get a pointer to any ErrorInfo
- ///
- /// This is called by PLAT to find information about an error
- ///
- /// @return ErrorInfo *. Pointer to any ErrorInfo. If NULL then no info
- ///
- inline const fapi2::ErrorInfo* getErrorInfo(void) const
- { return iv_info.get(); }
-
- ///
- /// @brief Forgets about any associated data (PlatData and ErrorInfo)
- ///
- /// If this is the only FirstFailureData pointing to the data then the
- /// data is deleted
- ///
- inline void forgetData(void)
- { iv_info = nullptr; }
-
- private:
-
- // Pointer to the data
- std::shared_ptr<ErrorInfo> iv_info;
- };
-
-};
-#endif // FAPI2_FFDC_H_
diff --git a/hwpf/fapi/include/hw_access.H b/hwpf/fapi/include/hw_access.H
deleted file mode 100755
index 570d540c..00000000
--- a/hwpf/fapi/include/hw_access.H
+++ /dev/null
@@ -1,720 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file hw_access.H
- *
- * @brief Defines the hardware access functions that platform code must
- * implement.
- */
-
-#ifndef FAPI2_HWACCESS_H_
-#define FAPI2_HWACCESS_H_
-
-#ifdef FAPI_SUPPORT_SPY_AS_ENUM
-#include <fapiSpyIds.H>
-#endif
-
-#include <stdint.h>
-#include <thread>
-#include <buffer.H>
-#include <variable_buffer.H>
-#include <return_code.H>
-#include <target.H>
-
-#ifdef FAPI_SUPPORT_MULTI_SCOM
-#include <fapiMultiScom.H>
-#endif
-
-/// @cond
-typedef uint64_t spyId_t;
-typedef uint64_t scanRingId_t;
-/// @endcond
-
-namespace fapi2
-{
-
- ///
- /// @enum fapi2::ChipOpModifyMode
- /// @brief Enumeration of modify modes used in HW access modify operations
- ///
- enum ChipOpModifyMode
- {
- CHIP_OP_MODIFY_MODE_OR = 1, ///< Modify or mode
- CHIP_OP_MODIFY_MODE_AND = 2, ///< Modify and mode
- CHIP_OP_MODIFY_MODE_XOR = 3, ///< Modify xor mode
- };
-
- ///
- /// @enum fapi2::RingMode
- /// @brief Enumeration of Ring access operation modes
- /// This is a bitmap to allow the user to specify multiple modes.
- ///
- enum RingMode
- {
- RING_MODE_SET_PULSE = 0x00000001, ///< Set pulse
- RING_MODE_NO_HEADER_CHECK = 0x00000002, ///< Dont' check header
- // FUTURE_MODE = 0x00000004,
- // FUTURE_MODE = 0x00000008,
- };
-
- //--------------------------------------------------------------------------
- // PIB Error Functions
- //--------------------------------------------------------------------------
-
- /// @brief Sets the PIB error mask - platform dependant
- /// @param[in] i_mask The new error mask
- inline void setPIBErrorMask(uint8_t i_mask)
- {
- // Platform specific funtion needs to be defined here.
- // For Cronus/FSP/Hostboot, this is a no-op.
- return;
- }
-
- /// @brief Gets the PIB error mask - platform dependant
- /// @return uint8_t The current PIB error mask
- inline uint8_t getPIBErrorMask(void)
- {
- // Platform specific funtion needs to be defined here.
- // For Cronus/FSP/Hostboot, this always returns 0
- return 0;
- }
-
- //--------------------------------------------------------------------------
- // Operational Mode Error Functions
- //--------------------------------------------------------------------------
-
- /// @enum OpModes operational Mode Error Functions
- enum OpModes
- {
- // These are bit-masks in case they need to be or'd together
- NORMAL = 0x00,
- IGNORE_HW_ERROR = 0x01,
- DO_NOT_DO_WAKEUP = 0x02,
- };
-
- /// @brief Sets the operational mode
- /// @param[in] i_mode The new mode
- inline void setOpMode(const OpModes i_mode)
- {
- // No-op for now. Should set thread-local operational mode
- return;
- }
-
- /// @brief Gets the operational mode
- /// @return the operational mode
- inline OpModes getOpMode(void)
- {
- // No-op for now. Should read thread-local operational mode
- return NORMAL;
- }
-
- //--------------------------------------------------------------------------
- // HW Communication Functions
- //--------------------------------------------------------------------------
-
- /// @brief Reads a SCOM register from a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address SCOM register address to read from.
- /// @param[out] o_data Buffer that holds data read from HW target.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address,
- buffer<uint64_t>& o_data)
- {
- o_data = 0x0000FEEDFACE0000;
- std::cout << std::hex << " getScom "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "output data: " << uint64_t(o_data)
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Writes a SCOM register on a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address SCOM register address to write to.
- /// @param[in] i_data Buffer that holds data to write into address.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode putScom(const Target<K>& i_target, const uint64_t i_address,
- buffer<uint64_t>& i_data)
- {
- std::cout << std::hex << " putScom "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input data: " << uint64_t(i_data)
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Read-modify-write a SCOM register on a chip
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address SCOM register address to write to.
- /// @param[in] i_data Buffer that holds data to be modified.
- /// @param[in] i_modifyMode The modify mode (or/and/xor).
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode modifyScom(const Target<K>& i_target,
- const uint64_t i_address,
- const buffer<uint64_t>& i_data,
- const ChipOpModifyMode i_modifyMode)
- {
- fapi2::buffer<uint64_t> l_modifyDataBuffer = i_data;
- std::cout << std::hex << " modifyScom "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input modifying data: " << uint64_t(l_modifyDataBuffer) << "; "
- << "input ChipOpModifyMode: " << i_modifyMode
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Writes a SCOM register under mask on a chip
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address SCOM register address to write to.
- /// @param[in] i_data Buffer that holds data to write into address.
- /// @param[in] i_mask Buffer that holds the mask value.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode putScomUnderMask(const Target<K>& i_target,
- const uint64_t i_address,
- buffer<uint64_t>& i_data,
- buffer<uint64_t>& i_mask)
- {
- std::cout << std::hex << " putScomUnderMask "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input data: " << uint64_t(i_data) << "; "
- << "input mask: " << uint64_t(i_mask)
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Reads a CFAM register from a chip.
- /// CFAM register is 32-bit wide.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address CFAM register address to read from.
- /// @param[out] o_data Buffer that holds data read from HW target.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode getCfamRegister(const Target<K>& i_target,
- const uint32_t i_address,
- buffer<uint32_t>& o_data)
- {
- o_data = 0xFEED0CFA;
- std::cout << std::hex << " getCfamRegister "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "output data: " << uint32_t(o_data)
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Writes a CFAM register on a chip.
- /// CFAM register is 32-bit wide.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address CFAM register address to write to.
- /// @param[in] i_data Buffer that holds data to write into address.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode putCfamRegister(const Target<K>& i_target,
- const uint32_t i_address,
- buffer<uint32_t>& i_data)
- {
- std::cout << std::hex << " putCfamRegister "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input data: " << uint32_t(i_data)
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Read-modify-write a CFAM register on a chip.
- /// CFAM register is 32-bit wide.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target HW target to operate on.
- /// @param[in] i_address CFAM register address to modify.
- /// @param[in] i_data Buffer that holds data to be modified.
- /// @param[in] i_modifyMode The modify mode (or/and/xor).
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode modifyCfamRegister(const Target<K>& i_target,
- const uint32_t i_address,
- const buffer<uint32_t>& i_data,
- const ChipOpModifyMode i_modifyMode)
- {
- fapi2::buffer<uint32_t> l_modifyDataBuffer = i_data;
- std::cout << std::hex << " modifyCfamRegister "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input modifying data: " << uint32_t(l_modifyDataBuffer) << "; "
- << "input ChipOpModifyMode: " << i_modifyMode
- << std::dec << std::endl;
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Reads a ring from a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_address Ring address to read from.
- /// @param[out] o_data Buffer that holds data read from HW target.
- /// @param[in] i_ringMode Ring operation mode.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode getRing(const Target<K>& i_target,
- const scanRingId_t i_address,
- variable_buffer& o_data,
- const RingMode i_ringMode = 0)
- {
- o_data.setBit(0);
- o_data.setBit(3);
- std::cout << std::hex << " getRing "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "ring address: " << i_address << "; "
- << "ring mode: " << i_ringMode << "; "
- << "output data:";
- o_data.print();
-
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Writes a ring to a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_address Ring address to write to.
- /// @param[in] i_data Buffer that contains RS4 compressed ring data
- /// to write into address
- /// @param[in] i_ringMode Ring operation mode.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode putRing(const Target<K>& i_target,
- const scanRingId_t i_address,
- variable_buffer& i_data,
- const RingMode i_ringMode = 0)
- {
- std::cout << std::hex << " putRing "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "ring mode: " << i_ringMode << "; "
- << "input data:";
- i_data.print();
-
- return FAPI2_RC_SUCCESS;
- }
-
-
- /// @brief Writes a ring to a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_address Ring address to write to.
- /// @param[in] i_data Pointer to location that contains RS4 compressed
- // ring data to write into address
- /// @param[in] i_ringMode Ring operation mode.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode putRing(const Target<K>& i_target,
- const scanRingId_t i_address,
- const void* i_data,
- const RingMode i_ringMode = 0)
- {
- uint64_t* dataPtr = reinterpret_cast<uint64_t*>(const_cast<void*>(i_data));
- std::cout << std::hex << " putRing (void*) "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "ring mode: " << i_ringMode << "; "
- << "input data: " << (uint64_t)(*dataPtr)
- << (uint64_t)*(dataPtr+1)
- << (uint64_t)*(dataPtr+2)
- << (uint64_t)*(dataPtr+3);
- std::cout << std::dec << std::endl;
-
- return FAPI2_RC_SUCCESS;
- }
-
- /// @brief Read-modify-write a ring on a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_address Ring address to modify.
- /// @param[in] i_data Buffer that contains RS4 compressed ring data
- /// to be modified.
- /// @param[in] i_modifyMode The modify mode (or/and/xor)
- /// @param[in] i_ringMode Ring operation mode.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- template< TargetType K >
- inline ReturnCode modifyRing(const Target<K>& i_target,
- const scanRingId_t i_address,
- variable_buffer& i_data,
- const ChipOpModifyMode i_modifyMode,
- const RingMode i_ringMode = 0)
- {
- std::cout << std::hex << " modifyRing "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "address: " << i_address << "; "
- << "input ChipOpModifyMode: " << i_modifyMode << "; "
- << "ring mode: " << i_ringMode << "; "
- << "input data: ";
- i_data.print();
-
- return FAPI2_RC_SUCCESS;
- }
-
- /// @note
- /// These spy access interfaces are only used in FSP and cronus
- /// HB does not allow spy access
-
-#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) || defined(DOXYGEN)
- /// @brief Reads a spy from a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_spyId Id of the spy whose data to be read.
- /// @param[out] o_data Buffer that holds data read from HW target.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- ///
- /// @note: The string version is only supported for cronus.
- ///
- /// The fapi design to support both FSP and cronus use of get and
- /// put spy functions is dependant on the SPY names being expanded
- /// to resemble a valid C identifier. This design places some
- /// restrictions on the SPY names which can be used.
- ///
- /// 1. if the spy name contains a # procedure writers should replace
- /// it with an __P__ for example -
- ///
- /// ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
- /// becomes
- /// ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS
- ///
- /// 2. if the spy name has a number following a "." it must have an
- /// underscore prepended to the number.
- ///
- /// EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY
- /// becomes
- /// EH.TPCHIP._2KX100_ARY_CLK_EDGES_DLY
- ///
- /// Example SPY name:
- /// The hardware procedure should call the function like:
- ///
- /// ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
- ///
- /// fapi::ReturnCode rc = fapiGetSpy( targ,
- /// ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS, data );
- ///
- /// @note The ID is not in quotes the fapi code will handle adding
- /// the quotes for the cronus environment
- ///
-#endif
-
-// Set to 1 for fapi2 API test
-#define FAPI_SUPPORT_SPY_AS_ENUM 1
-
-#ifdef FAPI_SUPPORT_SPY_AS_ENUM
-
-#ifndef DOXYGEN
-#define fapiGetSpy(TARGET, ID, DATA) \
- _fapiGetSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA )
-#endif
- template< TargetType K >
- inline ReturnCode _fapiGetSpy(const Target<K>& i_target,
- const spyId_t i_spyId,
- variable_buffer& o_data)
- {
- o_data.setBit(1);
- o_data.setBit(4);
- std::cout << std::hex << " _fapiGetSpy "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "Spy ID: " << i_spyId << "; "
- << "output data:";
- o_data.print();
-
- return FAPI2_RC_SUCCESS;
- }
-
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_STRING
-
-#ifndef DOXYGEN
-#define fapiGetSpy(TARGET, ID, DATA) _fapiGetSpy(TARGET, #ID, DATA)
-#endif
- template< TargetType K >
- inline ReturnCode _fapiGetSpy(const Target<K>& i_target,
- const char * const i_spyId,
- variable_buffer& o_data);
-#endif
-
-#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) || defined(DOXYGEN)
- /// @brief Writes a spy on a chip.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_spyId Id of the spy to write data to.
- /// @param[out] i_data Buffer that holds data to write into spy.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- ///
- /// @note: The string version is only supported for cronus.
- ///
- /// The fapi design to support both FSP and cronus use of get and
- /// put spy functions is dependent on the SPY names being expanded
- /// to resemble a valid C identifier. This design places some
- /// restrictions on the SPY names which can be used.
- ///
- /// 1. if the spy name contains a # procedure writers should replace
- /// is with an __P__ for example -
- ///
- /// ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
- /// becomes
- /// ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS
- ///
- /// 2. if the spy name has a number following a "." it must have an
- /// underscore prepended to the number.
- ///
- /// EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY
- /// becomes
- /// EH.TPCHIP._2KX100_ARY_CLK_EDGES_DLY
- ///
- /// Example SPY name:
- /// The hardware procedure should call the function like:
- ///
- /// ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS
- ///
- /// fapi::ReturnCode rc = fapiPutSpy( targ,
- /// ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS, data );
- ///
- /// @note The ID is not in quotes the fapi code will handle adding
- /// the quotes for the cronus environment
- ///
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_ENUM
-#ifndef DOXYGEN
-#define fapiPutSpy(TARGET, ID, DATA) \
- _fapiPutSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA)
-#endif
- template< TargetType K >
- inline ReturnCode _fapiPutSpy(const Target<K>& i_target,
- const spyId_t i_spyId,
- variable_buffer& i_data)
- {
- std::cout << std::hex << " _fapiPutSpy "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "Spy Id: " << i_spyId << "; "
- << "input data:";
- i_data.print();
-
- return FAPI2_RC_SUCCESS;
- }
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_STRING
-#ifndef DOXYGEN
-#define fapiPutSpy(TARGET, ID, DATA) _fapiPutSpy(TARGET, #ID, DATA)
-#endif
- template< TargetType K >
- inline ReturnCode _fapiPutSpy(const Target<K>& i_target,
- const char* const i_spyId,
- variable_buffer& i_data);
-#endif
-
-#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING)
-
- /// @brief Writes spy data into a buffer holding ring data image
- /// This API is used by L2/L3 repair to put column repair data
- /// into a ring buffer image.
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in] i_spyId Id of the spy.
- /// @param[in] i_data Buffer that holds spy data to write into ring
- /// image.
- /// @param[out] o_data Buffer that holds updated ring image.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- ///
- /// @note: The string version is only supported for cronus.
- ///
- /// The fapi design to support both FSP and cronus use of get and
- /// put spy functions is dependent on the SPY names being expanded
- /// to resemble a valid C identifier. This design places some
- /// restrictions on the SPY names which can be used.
- ///
- /// See fapiPutSpy for details on spy id specifics.
- ///
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_ENUM
-#ifndef DOCUMENTATION
-#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) \
- _fapiPutSpyImage(TARGET, \
- FAPI_SPY_NAMES::ID.value, \
- DATA1, DATA2)
-#endif
- template< TargetType K >
- inline ReturnCode _fapiPutSpyImage(const Target<K>& i_target,
- const spyId_t i_spyId,
- variable_buffer& i_data,
- variable_buffer& o_imageData)
- {
- std::cout << std::hex << " _fapiPutSpyImage "
- << "target: {" << i_target.getType() << ","
- << uint64_t(i_target) << "}; "
- << "Spy Id: " << i_spyId << "; "
- << "input data: ";
- i_data.print();
-
- // Set fake output data
- o_imageData.invert();
-
- return FAPI2_RC_SUCCESS;
- }
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_STRING
-// fapiPutSpyImage function Cronus version
-#ifndef DOCUMENTATION
-#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) \
- _fapiPutSpyImage(TARGET, #ID, \
- DATA1,DATA2)
-#endif
-
- template< TargetType K >
- inline ReturnCode _fapiPutSpyImage(const Target<K>& i_target,
- const char* const i_spyId,
- variable_buffer& i_data,
- variable_buffer& o_imageData);
-#endif
-
-#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) || defined(DOXYGEN)
- /// @brief Reads spy data from a ring image buffer
- /// @param[in] i_target Target to operate on
- /// @param[in] i_spyId The spy's id
- /// @param[out] o_data Buffer that holds data read from ring image.
- /// @param[in] i_imageData Buffer that holds ring image to read data
- /// from.
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- ///
- /// @note: The string version is only supported for cronus.
- ///
- /// The fapi design to support both FSP and cronus use of get and
- /// put spy functions is dependent on the SPY names being expanded
- /// to resemble a valid C identifier. This design places some
- /// restrictions on the SPY names which can be used.
- ///
- /// See fapiPutSpy for details on spy id specifics.
- ///
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_ENUM
-#ifndef DOXYGEN
-#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) \
- _fapiGetSpyImage(TARGET, \
- FAPI_SPY_NAMES::ID.value, \
- DATA1, DATA2)
-#endif
- template< TargetType K >
- inline ReturnCode _fapiGetSpyImage(const Target<K>& i_target,
- const spyId_t i_spyId,
- variable_buffer& o_data,
- const variable_buffer& i_imageData);
-#endif
-
-#ifdef FAPI_SUPPORT_SPY_AS_STRING
-// fapiGetSpyImage function Cronus version
-#ifndef DOXYGEN
-#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) \
- _fapiGetSpyImage(TARGET, \
- #ID, DATA1,DATA2)
-#endif
-
- inline fapi::ReturnCode _fapiGetSpyImage(
- const fapi::Target& i_target,
- const char* const i_spyId,
- fapi::buffer<fapi::bits_container> & o_data,
- const fapi::buffer<fapi::bits_container> & i_imageData);
-#endif
-
-#if defined(FAPI_SUPPORT_MULTI_SCOM) || defined(DOXYGEN)
-
- /// @brief Performs a multiple SCOM operation
- /// This interface performs multiple SCOM operations on a chip in the
- /// order specified by the input MultiScom object.
- /// See fapiMultiScom.H for details of how to populate the MultiScom
- /// object with SCOM operations.
- ///
- /// @tparam K template parameter, passed in target.
- /// @param[in] i_target Target to operate on.
- /// @param[in,out] io_multiScomObj Reference to a MultiScom object,
- /// pre-populated with SingleScomInfo entries
- /// to perform multiple SCOMs on input target
- /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
- ///
- /// @note This is a synchronous interface and would return after all the
- /// SCOM operations are completed or on the first failed operation
- ///
- /// @note SCOMs will be performed in the order they were added to the
- /// input MultiScom object
- ///
- /// @note In case of errors, the platform code is responsible to collect
- /// and add all the required error info and FFDC into the error data
- /// for debugging
- ///
- /// @note If the SCOM operations added are specific to a processor chip,
- /// then the FSI Shift Engine configured in scatter-gather DMA mode
- /// extension would be used to execute the SCOM operations in a
- /// performance optimize mode. In this mode, the special
- /// SCOM_BULK_READ_MODE and SCOM_BULK_WRITE_MODE operations are
- /// supported that allow a large bulk of SCOM access (in multiple of
- /// 64 bits) for targets that support auto-increment. The
- /// SCOM_WRITE_UNDER_MASK operation is not supported in this mode
- ///
- /// @note If the SCOM operations added are specific to a memory buffer
- /// chip, then the regular SCOM engine is used to execute the SCOM
- /// operations. SCOM_WRITE_UNDER_MASK operation is supported in
- /// this mode, but the special SCOM_BULK_READ_MODE and
- /// SCOM_BULK_WRITE_MODE operations are not supported due to
- /// hardware limitations.
- ///
- fapi::ReturnCode fapiMultiScom (const Target<K>& i_target,
- MultiScom& io_multiScomObj);
-#endif // FAPI_SUPPORT_MULTI_SCOM
-
-};
-
-#endif // FAPI2HWACCESS_H_
diff --git a/hwpf/fapi/include/plat_trace.H b/hwpf/fapi/include/plat_trace.H
deleted file mode 100755
index 7c7dd3be..00000000
--- a/hwpf/fapi/include/plat_trace.H
+++ /dev/null
@@ -1,64 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file plat_trace.H
- * @brief Defines the FAPI2 trace macros.
- *
- * Note that platform code must provide the implementation.
- *
- * FAPI has provided a default implementation. Platform code must
- * provide an alternate implementation if needed.
- */
-
-#ifndef FAPI2_PLATTRACE_H_
-#define FAPI2_PLATTRACE_H_
-
-#include <stdio.h>
-
-#define MAX_ECMD_STRING_LEN 64
-
-// Information traces (go into fast trace buffer that can wrap often)
-#define FAPI_TRACE(_id_, _fmt_, _args_...) \
- printf("%s: %s:%d ", _id_, __func__, __LINE__); \
- printf(_fmt_, ##_args_); \
- printf("\n")
-
-#define FAPI_INF(_fmt_, _args_...) FAPI_TRACE("inf", _fmt_, ##_args_)
-
-// Important traces (go into slow trace buffer that should not wrap often)
-#define FAPI_IMP(_fmt_, _args_...) FAPI_TRACE("imp", _fmt_, ##_args_)
-
-// Error traces (go into slow trace buffer that should not wrap often)
-#define FAPI_ERR(_fmt_, _args_...) FAPI_TRACE("err", _fmt_, ##_args_)
-
-// Debug traces (go into fast trace buffer that can wrap often)
-#define FAPI_DBG(_fmt_, _args_...) FAPI_TRACE("dbg", _fmt_, ##_args_)
-
-// Scan traces
-#define FAPI_SCAN(_fmt_, _args_...) FAPI_TRACE("scan", _fmt_, ##_args_)
-
-#define FAPI_MFG(_fmt_, _args_...) FAPI_TRACE("mfg", _fmt_, ##_args_)
-
-#endif // FAPI2_PLATTRACE_H_
diff --git a/hwpf/fapi/include/return_code.H b/hwpf/fapi/include/return_code.H
deleted file mode 100755
index 0442ca89..00000000
--- a/hwpf/fapi/include/return_code.H
+++ /dev/null
@@ -1,180 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file return_code.H
- * @brief definitions for fapi2 return codes
- */
-
-#ifndef __FAPI2_RETURN_CODE__
-#define __FAPI2_RETURN_CODE__
-
-#include <stdint.h>
-
-// Remove this for platforms which don't support FFDC
-#include <ffdc.H>
-
-///
-/// @brief Set HWP Error macro
-///
-/// This macro should be used by a HWP to create an error. The ReturnCode's
-/// internal return code is set and any error information in the Error XML file
-/// is added to the ReturnCode
-///
-#define FAPI_SET_HWP_ERROR(RC, ERROR) \
- RC._setHwpError(fapi2::ERROR); \
- ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \
- ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \
- ERROR##_ADD_ERROR_INFO(RC)
-
-///
-/// @brief Add info to HWP Error macro
-///
-/// This macro should be used by an FFDC HWP to add error information from an
-/// Error XML file to an existing error.
-///
-#define FAPI_ADD_INFO_TO_HWP_ERROR(RC, ERROR) \
- ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \
- ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \
- ERROR##_ADD_ERROR_INFO(RC)
-
-namespace fapi2
-{
- ///
- /// @brief Enumeration of return codes
- ///
- enum ReturnCodes
- {
- ///< Success
- FAPI2_RC_SUCCESS = 0,
-
- // Flag bits indicating which code generated the error.
- FAPI2_RC_FAPI2_MASK = 0x04000000, ///< FAPI2 mask
- FAPI2_RC_PLAT_MASK = 0x02000000, ///< Platform mask
- FAPI2_RC_HWP_MASK = 0x00000000, ///< HWP mask
-
- //
- // FAPI generated return codes
- //
-
- FAPI2_RC_INVALID_ATTR_GET = FAPI2_RC_FAPI2_MASK | 0x01,
- ///< Initfile requested an attribute with an invalid attribute ID
-
- FAPI2_RC_INVALID_CHIP_EC_FEATURE_GET = FAPI2_RC_FAPI2_MASK | 0x02,
- ///< HWP requested a chip EC feature with an invalid attribute ID
-
- FAPI2_RC_INVALID_MULTISCOM_LENGTH = FAPI2_RC_FAPI2_MASK | 0x03,
- ///< Invalid multiscom parameters
-
- FAPI2_RC_INVALID_PARAMETER = FAPI2_RC_FAPI2_MASK | 0x04,
- ///< Invalid parameters to a FAPI2 function
-
- FAPI2_RC_OVERFLOW = FAPI2_RC_FAPI2_MASK | 0x05,
- ///< Overflow condition, typically a buffer operation
-
- //
- // PLAT generated return codes. Additional details may be contained in
- // ReturnCode platData (this can only be looked at by PLAT code)
- //
-
- FAPI2_RC_PLAT_ERR_SEE_DATA = FAPI2_RC_PLAT_MASK | 0x01,
- ///< Generic platform error
-
- FAPI2_RC_PLAT_ERR_ADU_LOCKED = FAPI2_RC_PLAT_MASK | 0x02,
- ///< Operation to AlterDisplay unit failed because it is locked
-
- FAPI2_RC_PLAT_NOT_SUPPORTED_AT_RUNTIME = FAPI2_RC_PLAT_MASK | 0x03,
- ///< Operation not supported by HB runtime
- };
-
- ///
- /// @brief Class representing a FAPI2 ReturnCode
- ///
- /// @note Remove the inheritance relationship with FirstFailureData if
- /// the platform doesn't support FFDC.
- class ReturnCode : public FirstFailureData<ReturnCode>
- {
- public:
-
- ///
- /// @brief Constructor.
- /// @param[in] i_rc the rc to set
- ///
- ReturnCode(const uint64_t i_rc = FAPI2_RC_SUCCESS):
- iv_rc(i_rc)
- {};
-
- ///
- /// @brief integral type conversion function. Returns the error code
- /// @return The error code
- ///
- inline operator uint64_t() const { return iv_rc; }
-
- ///
- /// @brief Returns true iff iv_rc == SUCCESS
- /// @return true or false
- ///
- inline operator bool() const { return iv_rc == FAPI2_RC_SUCCESS; }
-
- ///
- /// @brief Assignement operator
- ///
- inline ReturnCode& operator=(const uint64_t& rhs)
- {
- iv_rc = rhs;
- return *this;
- }
-
- inline ReturnCode& operator=(const ReturnCodes& rhs)
- {
- iv_rc = rhs;
- return *this;
- }
-
- inline bool operator==(const uint64_t& rhs) const
- { return rhs == iv_rc; }
-
- inline bool operator==(const ReturnCodes& rhs) const
- { return rhs == iv_rc; }
-
- inline bool operator!=(const uint64_t& rhs) const
- { return rhs != iv_rc; }
-
- inline bool operator!=(const ReturnCodes& rhs) const
- { return rhs != iv_rc; }
-
- private:
- uint64_t iv_rc;
- };
-
- /// This implementation assumes no exception handling and leverages thread-local
- /// storage. For platforms without thread support, a global variable will
- /// suffice for the error state.
- extern thread_local ReturnCode current_err; /// the current error state
- extern thread_local uint64_t pib_error_mask; /// the pib mask
- extern thread_local uint64_t operational_state; /// the operational mode
-
-};
-
-#endif
diff --git a/hwpf/fapi/include/target.H b/hwpf/fapi/include/target.H
deleted file mode 100755
index 1add61d6..00000000
--- a/hwpf/fapi/include/target.H
+++ /dev/null
@@ -1,337 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file target.H
- * @brief definitions for fapi2 targets
- */
-
-#ifndef __FAPI2_TARGET__
-#define __FAPI2_TARGET__
-
-#include <stdint.h>
-#include <vector>
-#include <target_types.H>
-#include <stdio.h>
-
-namespace fapi2
-{
- ///
- /// @brief Enumeration of target state values (bitmask values)
- ///
- enum TargetState
- {
- TARGET_STATE_PRESENT = 0x00000001,
- TARGET_STATE_FUNCTIONAL = 0x00000002,
- };
-
- ///
- /// @brief Class representing a FAPI2 Target
- /// @tparam K the type (Kind) of target
- /// @tparam V the type of the target's Value
- /// @remark TargetLite targets are uint64_t, Targets
- /// are uintptr_t (void*).
- ///
- /// Assuming there are representations of a processor,
- /// a membuf and a system here are some examples:
- /// @code
- /// #define PROCESSOR_CHIP_A 0xFFFF0000
- /// #define MEMBUF_CHIP_B 0x0000FFFF
- /// #define SYSTEM_C 0x0000AAAA
- /// @endcode
- ///
- /// * To define a target:
- /// @code
- /// fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> A(PROCESSOR_CHIP_A);
- /// fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> C(SYSTEM_C);
- /// fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> B(MEMBUF_CHIP_B);
- /// @endcode
- ///
- /// * Functions which take composite target types
- /// @code
- /// void takesProcOrMembuf(
- /// const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP |
- /// fapi2::TARGET_TYPE_MEMBUF_CHIP>& V );
- ///
- /// void takesAny(const fapi2::Target<fapi2::TARGET_TYPE_ALL>& V );
- ///
- /// @endcode
- ///
- /// * Traversing the target "tree"
- /// @code
- /// fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> A(PROCESSOR_CHIP_A);
- ///
- /// // Get A's parent
- /// A.getParent<fapi2::TARGET_TYPE_SYSTEM>();
- ///
- /// // Get the 0x53'd core
- /// fapi2::getTarget<fapi2::TARGET_TYPE_CORE>(0x53);
- ///
- /// // Get all *my* present/functional children which are cores
- /// A.getChildren<fapi2::TARGET_TYPE_CORE>();
- ///
- /// // Get all of the the cores relative to my base target
- /// fapi2::getChildren<fapi2::TARGET_TYPE_CORE>();
- /// @endcode
- ///
- /// * Invalid casts
- /// @code
- /// // Can't cast to a specialized target
- /// fapi2::Target<fapi2::TARGET_TYPE_NONE> D(MEMBUF_CHIP_B);
- /// takesProcOrMembuf( D );
- ///
- /// // Not one of the shared types
- /// fapi2::Target<fapi2::TARGET_TYPE_ABUS_ENDPOINT> E;
- /// takesProcOrMembuf( E );
- /// @endcode
- template<TargetType K, typename V = uint64_t>
- class Target
- {
- public:
-
- ///
- /// @brief Create a Target, with a value
- /// @param[in] Value the value (i.e., specific element this
- /// target represents, or pointer)
- /// @note Platforms can mangle the value and K to get a
- /// single uint64_t in value which represents all the information
- /// they might need. value( K | V ), for example
- ///
- Target(V Value = 0):
- iv_handle(Value)
- {}
-
- ///
- /// @brief Assignment Operator.
- /// @param[in] i_right Reference to Target to assign from.
- /// @return Reference to 'this' Target
- ///
- Target& operator=(const Target& i_right)
- { iv_handle = i_right.iv_handle; return *this; }
-
- ///
- /// @brief Equality Comparison Operator
- /// @param[in] i_right Reference to Target to compare.
- /// @return bool. True if equal.
- /// @note Platforms need to define this so that the physical
- /// targets are determined to be equivilent rather than just the handles
- ///
- bool operator==(const Target& i_right) const
- { return i_right.iv_handle == iv_handle; }
-
- ///
- /// @brief Inquality Comparison Operator
- /// @param[in] i_right Reference to Target to compare.
- /// @return bool. True if not equal.
- /// @note Platforms need to define this so that the physical
- /// targets are determined to be equivilent rather than just the handles
- ///
- bool operator!=(const Target& i_right) const
- { return i_right.iv_handle != iv_handle; }
-
- ///
- /// @brief Get the handle.
- /// @return V The target's handle, or value
- ///
- V get(void) const
- { return iv_handle; }
-
- ///
- /// @brief Get the handle as a V
- /// @return V The target's handle, or value
- ///
- inline operator V() const { return iv_handle; }
-
- ///
- /// @brief Get a target's value
- /// @return V The target's handle, or value
- ///
- inline V& operator()(void) { return iv_handle; }
-
- ///
- /// @brief Get the target type
- /// @return The type of target represented by this target
- ///
- inline TargetType getType(void) const { return iv_type; }
-
- ///
- /// @brief Get this target's immediate parent
- /// @tparam T The type of the parent
- /// @return Target<T> a target representing the parent
- ///
- template< TargetType T >
- inline Target<T> getParent(void) const
- {
- // For testing
- return Target<T>(iv_handle);
- }
-
- ///
- /// @brief Get this target's children
- /// @tparam T The type of the parent
- /// @param[in] i_state The desired TargetState of the children
- /// @return std::vector<Target<T> > a vector of present/functional
- /// children
- ///
- template< TargetType T>
- inline std::vector<Target<T> >
- getChildren(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const
- {
- // For testing
- return {Target<T>()};
- }
-
- ///
- /// @brief Get the target at the other end of a bus - dimm included
- /// @tparam T The type of the parent
- /// @param[in] i_state The desired TargetState of the children
- /// @return Target<T> a target representing the thing on the other end
- /// @note Can be easily changed to a vector if needed
- ///
- template<TargetType T>
- inline Target<T>
- getOtherEnd(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const
- {
- // Implementation note: cast to a composite of
- // bus types and the compiler will check if this is
- // a good function at compile time
- return Target<T>();
- }
-
- ///
- /// @brief Copy from a Target<O> to a Target<K>
- /// @tparam O the target type of the other
- ///
- template<TargetType O>
- inline Target( const Target<O>& Other ):
- Target<K, V>(Other.get())
- {
- static_assert( (K & O) != 0,
- "unable to cast Target, no shared types");
-
- static_assert( bitCount<K>::count >= bitCount<O>::count,
- "unable to cast to specialized Target");
- }
-
- private:
- // Don't use enums here as it makes it hard to assign
- // in the platform target cast constructor.
- static const TargetType iv_type = K;
- V iv_handle;
-
- };
-
- ///
- /// @brief Return the string interpretation of this target
- /// @tparam T The type of the target
- /// @tparam B The type of the buffer
- /// @param[in] i_target Target<T>
- /// @param[in] i_buffer buffer
- /// @return void
- /// @post The contents of the buffer is replaced with the string
- /// representation of the target
- ///
- template< TargetType T >
- inline void toString(const Target<T>& i_target, char* i_buffer, size_t i_bsize)
- {
- snprintf(i_buffer, i_bsize, "Target 0x%lx/0x%x", i_target.get(), T);
- }
-
- ///
- /// @brief Return the string interpretation of this target
- /// @tparam T The type of the target
- /// @tparam B The type of the buffer
- /// @param[in] A pointer to the Target<T>
- /// @param[in] The buffer
- /// @return void
- /// @post The contents of the buffer is replaced with the string
- /// representation of the target
- ///
- template< TargetType T >
- inline void toString(const Target<T>* i_target, char* i_buffer, size_t i_bsize)
- {
- snprintf(i_buffer, i_bsize, "Target 0x%lx/0x%x", i_target->get(), T);
- }
-
- ///
- /// @brief Get an enumerated target of a specific type
- /// @tparam T The type of the target
- /// @param[in] Ordinal representing the ordinal number of
- /// the desired target
- /// @return Target<T> the target requested
- ///
- template<TargetType T>
- inline Target<T> getTarget(uint64_t Ordinal)
- {
- // For testing
- return Target<T>(Ordinal);
- }
-
- // Why has the been removed? For starters, the API name
- // is probably wrong as it's already been confused with
- // Target::getChildren(). And if I'm going to change it
- // I really want to see if we need it. I'm still not
- // clear on whether we're alloing this traversal or not.
-#if 0
- ///
- /// @brief Get the base target's children
- /// @tparam T The type of the target
- /// @return std::vector<Target<T> > a vector of present/functional
- /// children
- ///
- template<TargetType T>
- inline std::vector<Target<T> > getChildren()
- {
- // For testing
- return {Target<T>(), Target<T>()};
- }
-#endif
-
- ///
- /// @brief Return the string interpretation of this target
- /// @tparam T The type of the target
- /// @tparam B The type of the buffer
- /// @param[in] i_target Target<T>
- /// @param[in] i_buffer buffer
- /// @return void
- /// @post The contents of the buffer is replaced with the string
- /// representation of the target
- ///
- template<TargetType T, typename B>
- inline void toString(const Target<T>& i_target, B& i_buffer);
-
- ///
- /// @brief Check if the target is of a type, or in a type subset.
- /// @tparam K the TargetType to check
- /// @tparam T TargetType or TargetType composite to check against
- /// @return True, iff K is a proper T
- ///
- template< TargetType K, TargetType T >
- inline constexpr bool is_same(void)
- { return (K & T) != 0; }
-
-
-};
-
-#endif
diff --git a/hwpf/fapi/include/target_types.H b/hwpf/fapi/include/target_types.H
deleted file mode 100755
index f4cfd931..00000000
--- a/hwpf/fapi/include/target_types.H
+++ /dev/null
@@ -1,105 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file target_types.H
- * @brief definitions for fapi2 target types
- */
-
-#ifndef __FAPI2_TARGET_TYPES__
-#define __FAPI2_TARGET_TYPES__
-
-/// FAPI namespace
-namespace fapi2
-{
- ///
- /// @enum fapi::TargetType
- /// @brief Types, kinds, of targets
- /// @note TYPE_NONE is used to represent empty/NULL targets in lists
- /// or tables. TYPE_ALL is used to pass targets to methods which
- /// can act generally on any type of target
- ///
- /// Target Kind
- enum TargetType
- {
- TARGET_TYPE_NONE = 0x00000000, ///< No type
- TARGET_TYPE_SYSTEM = 0x00000001, ///< System type
- TARGET_TYPE_DIMM = 0x00000002, ///< DIMM type
- TARGET_TYPE_PROC_CHIP = 0x00000004, ///< Processor type
- TARGET_TYPE_MEMBUF_CHIP = 0x00000008, ///< Membuf type
- TARGET_TYPE_EX = 0x00000010, ///< Ex type
- TARGET_TYPE_MBA = 0x00000020, ///< MBA type
- TARGET_TYPE_MCS = 0x00000040, ///< MCS type
- TARGET_TYPE_XBUS = 0x00000080, ///< XBUS type
- TARGET_TYPE_ABUS = 0x00000100, ///< ABUS type
- TARGET_TYPE_L4 = 0x00000200, ///< L4 type
- TARGET_TYPE_CORE = 0x00000400, ///< Core type
- TARGET_TYPE_EQ = 0x00000800, ///< EQ type
- TARGET_TYPE_MCA = 0x00001000, ///< MCA type
- TARGET_TYPE_MCBIST = 0x00002000, ///< MCBIST type
- TARGET_TYPE_MIA = 0x00004000, ///< MIA type
- TARGET_TYPE_MIS = 0x00008000, ///< MIS type
- TARGET_TYPE_DMI = 0x00010000, ///< DMI type
- TARGET_TYPE_OBUS = 0x00020000, ///< OBUS type
- TARGET_TYPE_NV = 0x00040000, ///< NV bus type
- TARGET_TYPE_SBE = 0x00080000, ///< SBE type
- TARGET_TYPE_PPE = 0x00100000, ///< PPE type
- TARGET_TYPE_PERV = 0x00200000, ///< Pervasive type
- TARGET_TYPE_PEC = 0x00400000, ///< PEC type
- TARGET_TYPE_PHB = 0x00800000, ///< PHB type
- TARGET_TYPE_EL = 0x01000000, ///< L3/L2 Caches
-
- TARGET_TYPE_ALL = 0xFFFFFFFF, ///< Any/All types
-
- // Mappings to target types found in the error xml files
- TARGET_TYPE_EX_CHIPLET = TARGET_TYPE_EX,
- TARGET_TYPE_MBA_CHIPLET = TARGET_TYPE_MBA,
- TARGET_TYPE_MCS_CHIPLET = TARGET_TYPE_MCS,
- TARGET_TYPE_XBUS_ENDPOINT = TARGET_TYPE_XBUS,
- TARGET_TYPE_ABUS_ENDPOINT = TARGET_TYPE_ABUS,
- };
-
- /// @cond
- constexpr TargetType operator|(TargetType x, TargetType y)
- {
- return static_cast<TargetType>(static_cast<int>(x) |
- static_cast<int>(y));
- }
-
- template<uint64_t V>
- class bitCount {
- public:
- // Don't use enums, too hard to compare
- static const uint8_t count = bitCount<(V >> 1)>::count + (V & 1);
- };
-
- template<>
- class bitCount<0> {
- public:
- static const uint8_t count = 0;
- };
- /// @endcond
-};
-
-#endif
diff --git a/hwpf/fapi/include/utils.H b/hwpf/fapi/include/utils.H
deleted file mode 100755
index 65806272..00000000
--- a/hwpf/fapi/include/utils.H
+++ /dev/null
@@ -1,59 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file utils.H
- * @brief Defines common fapi2 utilities
- */
-
-#ifndef FAPI2_UTILS_H_
-#define FAPI2_UTILS_H_
-
-#include <stdint.h>
-#include <return_code.H>
-#include <error_info.H>
-
-namespace fapi2
-{
- ///
- /// @brief Log an error.
- ///
- /// @param[in,out] io_rc Reference to ReturnCode (Any references to data and error
- /// target are removed and rc value is set to success after
- /// function ends.)
- /// @param[in] i_sev Fapi error log severity defaulted to unrecoverable
- /// @param[in] i_unitTestError - flag to log error which does not cause a unit
- /// test to fail.
- ///
- /// @note This function is called from the ffdc collection classes and no longer
- /// needs to be called directly.
- /// @note Implemented by platform code
- ///
- void logError(
- fapi2::ReturnCode & io_rc,
- fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE,
- bool i_unitTestError = false );
-};
-
-#endif // FAPI2_UTILS_H_
diff --git a/hwpf/fapi/include/variable_buffer.H b/hwpf/fapi/include/variable_buffer.H
deleted file mode 100755
index a1280830..00000000
--- a/hwpf/fapi/include/variable_buffer.H
+++ /dev/null
@@ -1,663 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file variable_buffer.H
- * @brief definitions for fapi2 variable length buffers
- */
-
-#ifndef __FAPI2_VARIABLE_BUFFER__
-#define __FAPI2_VARIABLE_BUFFER__
-
-#include <buffer_base.H>
-
-namespace fapi2
-{
- /// @brief Get a 32 bit mask quickly
- // This is one of the main reasons we static_assert in the ctor's
- // to ensure the unit_type is 32 bits.
- inline uint32_t fast_mask32(int32_t i_pos, int32_t i_len)
- {
- // generates an arbitrary 32-bit mask using two operations, not too shabby
-
- static const uint32_t l_mask32[] = {
- 0x00000000,
- 0x80000000, 0xC0000000, 0xE0000000, 0xF0000000,
- 0xF8000000, 0xFC000000, 0xFE000000, 0xFF000000,
- 0xFF800000, 0xFFC00000, 0xFFE00000, 0xFFF00000,
- 0xFFF80000, 0xFFFC0000, 0xFFFE0000, 0xFFFF0000,
- 0xFFFF8000, 0xFFFFC000, 0xFFFFE000, 0xFFFFF000,
- 0xFFFFF800, 0xFFFFFC00, 0xFFFFFE00, 0xFFFFFF00,
- 0xFFFFFF80, 0xFFFFFFC0, 0xFFFFFFE0, 0xFFFFFFF0,
- 0xFFFFFFF8, 0xFFFFFFFC, 0xFFFFFFFE, 0xFFFFFFFF,
- };
- return l_mask32[i_len] >> i_pos;
- }
-
- //
- // General set a series of bits in the buffer.
- //
-
- ///
- /// @cond
- /// @brief Internal bit inserting method.
- /// @tparam unit_type The type of a unit of the arrays
- /// @tparam bits_type The type of the bit counting values
- /// @param[in] i_source The incoming data
- /// @param[in] i_source_length The length in bits of the incoming data
- /// @param[in] i_target The outgoing data
- /// @param[in] i_target_length The length in bits of the outgoing data
- /// @param[in] i_source_start_bit The starting bit location in the
- /// incoming data
- /// @param[in] i_target_start_bit The starting bit position in this
- /// @param[in] i_length The length, in bits, the user wants copied.
- ///
- template<typename unit_type, typename bits_type>
- inline fapi2::ReturnCode _insert(const unit_type* i_source,
- bits_type i_source_length,
- unit_type* i_target,
- bits_type i_target_length,
- bits_type i_source_start_bit,
- bits_type i_target_start_bit,
- bits_type i_length)
- {
- const bits_type bits_per_unit = fapi2::parameterTraits<unit_type>::bit_length;
-
- // tartgetStart is defaulted to the sizeof(target) - (sizeof(source) - i_source_start_bit)
- // which makes this act like insert from right
- if (i_target_start_bit == ~0)
- {
- i_target_start_bit = (i_target_length - (i_source_length - i_source_start_bit));
- }
-
- // len defaults to (sizeof(OT) * 8) - i_source_start_bit
- if (i_length == ~0)
- {
- i_length = i_source_length - i_source_start_bit;
- }
-
- // Check for overflow
- if ((i_length + i_target_start_bit > i_target_length) ||
- (i_length + i_source_start_bit > i_source_length))
- {
- return fapi2::FAPI2_RC_OVERFLOW;
- }
-
- do
- {
- const bits_type src_idx = i_source_start_bit / bits_per_unit;
- const bits_type trg_idx = i_target_start_bit / bits_per_unit;
-
- // "slop" = unaligned bits
- const bits_type src_slop = i_source_start_bit % bits_per_unit;
- const bits_type trg_slop = i_target_start_bit % bits_per_unit;
-
- // "cnt" = largest number of bits to be moved each pass
- bits_type cnt = std::min(i_length, bits_per_unit);
- cnt = std::min(cnt, bits_per_unit - src_slop);
- cnt = std::min(cnt, bits_per_unit - trg_slop);
-
- // generate the source mask only once
- bits_type mask = fast_mask32(src_slop, cnt);
-
- // read the source bits only once
- bits_type src_bits = i_source[src_idx] & mask;
-
- // "shift" = amount of shifting needed for target alignment
- int32_t shift = trg_slop - src_slop;
-
- // ideally (i << -1) would yield (i >> 1), but it
- // doesn't, so we need an extra branch here
-
- if (shift < 0)
- {
- src_bits <<= -shift;
- mask <<= -shift;
- }
- else
- {
- src_bits >>= shift;
- mask >>= shift;
- }
-
- // clear source '0' bits in the target
- i_target[trg_idx] &= ~mask;
- // set source '1' bits in the target
- i_target[trg_idx] |= src_bits;
-
- i_source_start_bit += cnt;
- i_target_start_bit += cnt;
-
- i_length -= cnt;
- } while (0 < i_length);
-
- return fapi2::FAPI2_RC_SUCCESS;
- }
- /// @endcond
-
- /// @brief Class representing a FAPI variable_buffer.
- /// @remark Variable buffers are buffers which can be variable in length
- /// (and "odd sized.") These best represent the FAPI 1.X ecmdDataBuffer,
- /// however they are implemented using the same template techniques
- /// as the new fapi::buffer.
- /// @note Variable buffers are not (presently) declared as std::bitset
- /// as bitsets' size is fixed at runtime. It is not clear if this is
- /// acceptable for variable_buffers at this time.
- /// @note Variable buffers are not (presently) declared as std::vector<bool>
- /// as it would need to be implemented separate from std::vector, and
- /// it's not clear it would give us any real advantage. Howevever, its is
- /// more likely this will become a std::vector<bool> than a std::bitset.
- class variable_buffer : public buffer_base<bits_container>
- {
-
- public:
-
- ///
- /// @brief Variable buffer constructor
- /// @param[in] i_value number of *bits* (sizeof(uint_type) * 8)
- /// needed.
- variable_buffer(bits_type i_value = 0);
-
- ///
- /// @brief Variable buffer list constructor
- /// @param[in] i_value an initializer list to initialize the container.
- ///
- variable_buffer(const std::initializer_list<unit_type>& i_value);
-
- /// @name Bit/Word Manipulation Functions
- ///@{
-
- ///
- /// @brief Return the length of the buffer in bits
- /// @return Length in bits
- ///
- inline uint32_t getBitLength(void) const
- { return iv_perceived_bit_length; }
-
- ///
- /// @brief Return the length of the buffer in OT units
- /// @return Length in OT units rounded up
- /// @tparam OT the type to get the length of. For example, if one
- /// wanted the length in double words, OT would be uint64_t
- /// (getLength<uint64_t>().) Similarly, to get the length in words,
- /// getLength<uin32_t>().
- ///
- template< typename OT >
- inline uint32_t getLength(void) const
- {
- static const uint32_t bits_in_ot = sizeof(OT) * 8;
- return (getBitLength() + (bits_in_ot - 1)) / bits_in_ot;
- }
-
- ///
- /// @brief Set a bit in the buffer
- /// @param[in] i_bit the bit number to set.
- /// @note 0 is left-most
- /// @return FAPI2_RC_SUCCESS if OK
- ///
- inline fapi2::ReturnCode setBit(const bits_type& i_bit)
- {
- const bits_type index = i_bit / bits_per_unit;
-
- if (index > iv_data.size())
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- iv_data[index] |=
- unit_type(1) << (bits_per_unit - 1) -
- (i_bit - (index * bits_per_unit));
-
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Clear a bit in buffer
- /// @tparam SB Start bit in buffer to clear.
- /// @tparam L Number of consecutive bits from start bit to
- /// clear
- /// @return FAPI2_RC_SUCCESS on success
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type SB, bits_type L >
- fapi2::ReturnCode clearBit(void);
-
- ///
- /// @brief Invert bit
- /// @tparam SB Start bit in buffer to invert.
- /// @tparam L Number of consecutive bits from start bit to
- /// invert, defaults to 1
- /// @return FAPI2_RC_SUCCESS on success
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type SB, bits_type L = 1 >
- fapi2::ReturnCode flipBit(void);
-
- ///
- /// @brief Get the value of a bit in the buffer
- /// @tparam B Bit in buffer to get.
- /// @return true/1 if bit is on, false/0 if bit is off
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B >
- inline bool getBit(void) const
- {
- const bits_type index = B / bits_per_unit;
- const unit_type mask = unit_type(1) << (bits_per_unit - 1) - (B - (index * bits_per_unit));
- return iv_data[index] & mask;
- }
-
- ///
- /// @brief Test if multiple bits are set
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return true if all bits in range are set - false if any
- /// bit is clear
- ///
- template< bits_type SB, bits_type L = 1 >
- bool isBitSet(void) const;
-
- ///
- /// @brief Test if multiple bits are clear
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return true if bit is clear - false if bit is set
- ///
- template< bits_type SB, bits_type L = 1 >
- bool isBitClear(void) const;
-
- ///
- /// @brief Count number of bits set in a range
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return Number of bits set in range
- ///
- template< bits_type SB, bits_type L = 1 >
- bits_type getNumBitsSet(void) const;
-
- ///@}
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- // Note: Many (all?) of these are not needed and the compiler complains
- // as the cast to T yields a better operator. There are here mainly for
- // documenation purposes.
-
- ///
- /// @brief operator>>()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator>>(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator<<()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator<<(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator+()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator+(const T& rhs);
-#endif
-
- ///
- /// @brief operator+=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator+=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator|=(const T& rhs);
-#endif
-
- ///
- /// @brief operator&=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator&=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator|(const T& rhs);
-#endif
-
- ///
- /// @brief operator&()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator&(const T& rhs);
-#endif
-
- ///
- /// @brief operator^=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator^=(const T& rhs);
-#endif
-
- ///
- /// @brief operator!=()
- ///
-#ifdef DOXYGEN
- bool operator!=(const T& rhs) const;
-#endif
-
- ///
- /// @brief operator==()
- /// @return true if and only if lhs == rhs
- ///
- inline bool operator==(const fapi2::bits_container& rhs) const
- {
- if (&iv_data == &rhs)
- {
- return true;
- }
-
- return iv_data == rhs;
- }
-
- ///
- /// @brief Copy part of an element into the DataBuffer
- /// @param[in] i_data OT value to copy into DataBuffer
- /// @param[in] i_targetStart The position in this where the copy starts
- /// @param[in] i_len How many bits to copy
- /// @param[in] i_sourceStart The start positon in i_data, defaults to 0
- /// @return FAPI2_RC_SUCCESS on success, FAPi2_RC_OVERFLOW otherwise
- ///
- template<typename OT>
- fapi2::ReturnCode insert(const OT& i_data,
- bits_type i_targetStart = 0,
- bits_type i_len = ~0,
- bits_type i_sourceStart = 0);
-
- ///
- /// @brief Copy in a right aligned (decimal) element
- /// @param[in] i_data the incoming data
- /// - data is taken right aligned
- /// @param[in] i_targetStart The starting bit position in this
- /// - Defaultst to 0
- /// @param[in] i_len The length, in bits, the user wants copied.
- /// - Defaults to all of the bits in the source which fit
- /// @return FAPI2_RC_SUCCESS on success, FAPI2_RC_OVERFLOW otherwise
- ///
- template<typename OT>
- fapi2::ReturnCode insertFromRight(const OT& i_data,
- bits_type i_targetStart = 0,
- bits_type i_len = ~0);
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam OT the type of the outgoing data
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @param[in] i_start Start bit to copy from - defaults to 0
- /// @param[in] i_len Length of bits to copy - defaults to filling o_out
- /// @return FAPI2_RC_SUCCESS on success
- ///
- template< typename OT >
- fapi2::ReturnCode extract(OT& o_out,
- bits_type i_start = 0,
- bits_type i_len = ~0) const;
-
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam OT the type of the outgoing data
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @param[in] i_start Start bit to copy from - defaults to 0
- /// @param[in] i_len Length of bits to copy - defaults to filling o_out
- /// @return FAPI2_RC_SUCCESS on success
- ///
- template< typename OT >
- fapi2::ReturnCode extractToRight(OT& o_out,
- bits_type i_start = 0,
- bits_type i_len = ~0) const;
- ///@}
-
- private:
- // Just shorthand ...
- static const bits_type bits_per_unit =
- bufferTraits<bits_container>::bits_per_unit;
-
- // The number of bits the user asked for. The actual size of the
- // container might be larger.
- bits_type iv_perceived_bit_length;
-
- ///
- /// @brief Internal bit extraction method.
- /// @tparam OT The type of the destination
- /// @param[in] i_start The starting bit position in this
- /// @param[in] i_count The length, in bits, the user wants copied.
- /// @param[out] o_dest Where to put the data
- ///
- template< typename OT >
- fapi2::ReturnCode _extract(bits_type i_start,
- bits_type i_count,
- OT* o_dest) const;
-
- ///
- /// @brief Internal insertFromRight
- /// @param[in] i_data, the incoming data
- /// @param[in] i_data_length The length in bits of the incoming data
- /// @param[in] i_target_start_bit The starting bit position in this
- /// @param[in] i_length The length, in bits, the user wants copied.
- ///
- template<typename OT>
- fapi2::ReturnCode _insertFromRight(const OT& i_data,
- bits_type i_data_length,
- bits_type i_targetStart,
- bits_type i_len);
-
- };
-
- inline variable_buffer::
- variable_buffer(bits_type i_value):
- buffer_base(i_value),
- iv_perceived_bit_length(i_value)
- {
- static_assert(std::is_same<unit_type, uint32_t>::value,
- "code currently needs unit_type to be a unit32_t");
- }
-
- inline variable_buffer::
- variable_buffer(const std::initializer_list<unit_type>& i_value):
- buffer_base(i_value),
- iv_perceived_bit_length(i_value.size() * sizeof(unit_type) * 8)
- {
- static_assert(std::is_same<unit_type, uint32_t>::value,
- "code currently needs unit_type to be a unit32_t");
- }
-
-
-
- /// @cond
- //
- // Generic insert
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::insert(const OT& i_source,
- bits_type i_targetStart,
- bits_type i_len,
- bits_type i_sourceStart)
- {
- return _insert((unit_type*)(&i_source), parameterTraits<OT>::bit_length,
- &(iv_data[0]), getBitLength(),
- i_sourceStart, i_targetStart, i_len);
- }
-
- //
- // Insert another variable_bufer
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::insert(
- const variable_buffer& i_data,
- bits_type i_targetStart,
- bits_type i_len,
- bits_type i_sourceStart)
- {
- return _insert((unit_type*)&(i_data()[0]), i_data.getBitLength(),
- &(iv_data[0]), getBitLength(),
- i_sourceStart, i_targetStart, i_len);
- }
-
- //
- // Generic insert from right
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::insertFromRight(
- const OT& i_data,
- bits_type i_targetStart,
- bits_type i_len)
- {
- _insertFromRight(i_data, parameterTraits<OT>::bit_length, i_targetStart, i_len);
- }
-
- //
- // variable_buffer insert from right
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::insertFromRight(
- const variable_buffer& i_data,
- bits_type i_targetStart,
- bits_type i_len)
- {
- const bits_type bit_length_of_source = i_data.getBitLength();
- _insertFromRight(i_data, bit_length_of_source, i_targetStart, i_len);
- }
-
-
-
-
- //
- // Generic extract. Extract is an insert with the arguments reversed.
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::extract(
- OT& i_data,
- bits_type i_start,
- bits_type i_len) const
- {
- // Needed to trick the compiler into matching the template below
- const bits_type max_length = parameterTraits<OT>::bit_length;
-
- // If thy didn't pass an i_len, assume they want all the data
- // which will fit.
- if (i_len == ~0)
- {
- i_len = max_length;
- }
-
- return _insert((container_unit*)&iv_data[0], getBitLength(),
- &i_data, max_length,
- i_start, 0U, i_len);
- }
-
- //
- // Extract in to another variable_bufer
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::extract(
- variable_buffer& i_data,
- bits_type i_start,
- bits_type i_len) const
- {
- // If thy didn't pass an i_len, assume they want all the data
- // which will fit.
- if (i_len == ~0)
- {
- i_len = i_data.getBitLength();
- }
- return _insert((container_unit*)&iv_data[0], getBitLength(),
- &(i_data()[0]), i_data.getBitLength(),
- i_start, 0U, i_len);
- }
-
-
-
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::_insertFromRight(
- const OT& i_data,
- bits_type i_data_length,
- bits_type i_targetStart,
- bits_type i_len)
- {
- // If they didn't pass in a length, assume they want all the i_data
- // which will fit.
- if( i_len == ~0 )
- {
- // The longest the length can be is the length of the data
- // This is the miniumum of the length of the data or the
- // number of available bits
- i_len = std::min(i_data_length, getBitLength() - i_targetStart);
- }
-
- // Source start is the length, counted from the right
- return insert(i_data, i_targetStart, i_len, i_data_length - i_len);
- }
-
- //
- // Invalid specializations of set
- //
- /// @cond
- // Sepcialize the variable_buffer version to to "undefined" so the
- // linker complains loudly if anyone calls it.
-#if 0
- template<>
- inline fapi2::ReturnCode buffer_base::set(
- const variable_buffer& i_value,
- bits_type i_offset);
-#endif
- /// @endcond
-};
-
-
-#endif
diff --git a/hwpf/fapi/src/error_info.C b/hwpf/fapi/src/error_info.C
deleted file mode 100755
index b4e35029..00000000
--- a/hwpf/fapi/src/error_info.C
+++ /dev/null
@@ -1,410 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file error_info.C
- * @brief Implements the error information classes
- */
-
-#include <stdint.h>
-#include <string.h>
-#include <plat_trace.H>
-#include <error_info.H>
-#include <buffer.H>
-
-namespace fapi2
-{
- ///
- /// @brief Constructor
- ///
- /// @param[in] i_ffdcId FFDC Identifier (used to decode FFDC)
- /// @param[in] i_pFfdc Pointer to the FFDC to copy
- /// @param[in] i_size Size of the FFDC to copy
- ///
- ErrorInfoFfdc::ErrorInfoFfdc(const uint32_t i_ffdcId,
- const void* i_pFfdc,
- const uint32_t i_size):
- iv_ffdcId(i_ffdcId),
- iv_size(i_size)
- {
- iv_pFfdc = std::shared_ptr<uint8_t>(new uint8_t[i_size]());
-
- // If they passed us a NULL pointer they want to fill
- // in the data themselves later.
- if (i_pFfdc != nullptr)
- {
- memcpy(iv_pFfdc.get(), i_pFfdc, i_size);
- }
- }
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_hw Hardware to callout
- /// @param[in] i_calloutPriority Priority of callout
- /// @param[in] i_refTarget Reference to reference target
- ///
- ErrorInfoHwCallout::ErrorInfoHwCallout(
- const HwCallouts::HwCallout i_hw,
- const CalloutPriorities::CalloutPriority i_calloutPriority,
- const Target<TARGET_TYPE_ALL> & i_refTarget):
- iv_hw(i_hw),
- iv_calloutPriority(i_calloutPriority),
- iv_refTarget(i_refTarget)
- {}
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_procedure Procedure to callout
- /// @param[in] i_calloutPriority Priority of callout
- ///
- ErrorInfoProcedureCallout::ErrorInfoProcedureCallout(
- const ProcedureCallouts::ProcedureCallout i_procedure,
- const CalloutPriorities::CalloutPriority i_calloutPriority):
- iv_procedure(i_procedure),
- iv_calloutPriority(i_calloutPriority)
- {}
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_target1 Reference to target on one end of the bus
- /// @param[in] i_target2 Reference to target on other end of the bus
- /// @param[in] i_calloutPriority Priority of callout
- ///
- ErrorInfoBusCallout::ErrorInfoBusCallout(
- const Target<TARGET_TYPE_ALL> & i_target1,
- const Target<TARGET_TYPE_ALL> & i_target2,
- const CalloutPriorities::CalloutPriority i_calloutPriority):
- iv_target1(i_target1),
- iv_target2(i_target2),
- iv_calloutPriority(i_calloutPriority)
- {}
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_target Reference to the target to c/d/g
- /// @param[in] i_callout True if Target should be called out
- /// @param[in] i_deconfigure True if Target should be deconfigured
- /// @param[in] i_gard True if Target should be GARDed
- /// @param[in] i_priority The priority of any callout
- ///
- ErrorInfoCDG::ErrorInfoCDG(
- const Target<TARGET_TYPE_ALL> & i_target,
- const bool i_callout,
- const bool i_deconfigure,
- const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority):
- iv_target(i_target),
- iv_callout(i_callout),
- iv_deconfigure(i_deconfigure),
- iv_gard(i_gard),
- iv_calloutPriority(i_priority)
- {}
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_parent Reference to the parent target
- /// @oaram[in] i_childType Child target type to c/d/g
- /// @param[in] i_callout True if Target should be called out
- /// @param[in] i_deconfigure True if Target should be deconfigured
- /// @param[in] i_gard True if Target should be GARDed
- /// @param[in] i_priority The priority of any callout
- /// @param[in] i_childPort Child Port
- /// For DIMM children, the MBA port number
- /// @param[in] i_childNum Child Number
- /// For DIMM children, the dimm socket number
- /// For Chip children, the chip position
- /// For Chiplet children, the chiplet unit pos
- ///
- ErrorInfoChildrenCDG::ErrorInfoChildrenCDG(
- const Target<TARGET_TYPE_ALL> & i_parentChip,
- const TargetType i_childType,
- const bool i_callout,
- const bool i_deconfigure,
- const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority,
- const uint8_t i_childPort, const uint8_t i_childNum):
- iv_parent(i_parentChip),
- iv_childType(i_childType),
- iv_callout(i_callout),
- iv_calloutPriority(i_priority),
- iv_deconfigure(i_deconfigure),
- iv_gard(i_gard),
- iv_childPort(i_childPort),
- iv_childNumber(i_childNum)
- {}
-
- ///
- /// @brief Constructor.
- ///
- /// @param[in] i_trace
- ///
- ErrorInfoCollectTrace::ErrorInfoCollectTrace(
- CollectTraces::CollectTrace i_traceId):
- iv_eiTraceId(i_traceId)
- {}
-
-
- ///
- /// @brief Collect target, buffer or generic FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryFfdc::addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_objects) const
- {
- // "variable buffer ffdc not yet implemented");
- assert(iv_ffdcSize != EI_FFDC_SIZE_VBUF);
-
- switch(iv_ffdcSize)
- {
- case EI_FFDC_SIZE_BUF:
- {
- const buffer<uint64_t>* object =
- static_cast<const buffer<uint64_t>*>(i_objects[iv_ffdcObjIndex]);
-
- i_info->iv_ffdcs.push_back(std::shared_ptr<ErrorInfoFfdc>(
- new ErrorInfoFfdc(iv_ffdcId, object,
- sizeof(object))));
-
- FAPI_DBG("addErrorInfo: Adding buffer id: 0x%x size: %lu buf: 0x%lx",
- iv_ffdcId, sizeof(object), uint64_t(*object));
- }
- break;
-
- case EI_FFDC_SIZE_TARGET:
- {
- Target<TARGET_TYPE_ALL> object =
- *(static_cast<const Target<TARGET_TYPE_ALL>*>
- (i_objects[iv_ffdcObjIndex]));
-
- // Allocate an ErrorInfoFfdc but don't copy anything in to it.
- // We can copy the target string once if we copy directly into
- // the error info
- ErrorInfoFfdc* e =
- new ErrorInfoFfdc(iv_ffdcId, nullptr, MAX_ECMD_STRING_LEN);
-
- toString(object, static_cast<char*>(e->getData()),
- MAX_ECMD_STRING_LEN);
- i_info->iv_ffdcs.push_back(std::shared_ptr<ErrorInfoFfdc>(e));
-
- FAPI_DBG("addErrorInfo: Adding target ffdc id: 0x%x %s",
- iv_ffdcId, static_cast<char*>(e->getData()));
- }
- break;
-
- default:
- i_info->iv_ffdcs.push_back(std::shared_ptr<ErrorInfoFfdc>(
- new ErrorInfoFfdc(
- iv_ffdcId,
- i_objects[iv_ffdcObjIndex],
- iv_ffdcSize)));
- FAPI_DBG("addErrorInfo: Adding ffdc id 0x%x size: %d",
- iv_ffdcId, iv_ffdcSize);
- break;
-
- };
-
- return;
- }
-
- ///
- /// @brief Collect h/w callout FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryHwCallout::addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- // If the index is 0xFF, we use an empty target. Otherwise the
- // target is taken from the object arrary with the given index.
- const fapi2::Target<TARGET_TYPE_ALL> target =
- iv_refObjIndex == 0xFF ?
- fapi2::Target<TARGET_TYPE_ALL>() :
- *(static_cast<const fapi2::Target<TARGET_TYPE_ALL>*>
- (i_object[iv_refObjIndex]));
-
- ErrorInfoHwCallout* ei = new ErrorInfoHwCallout(
- static_cast<HwCallouts::HwCallout>(iv_hw),
- static_cast<CalloutPriorities::CalloutPriority>(iv_calloutPriority),
- target);
-
- FAPI_DBG("addErrorInfo: Adding hw callout target: 0x%lx hw: %d, pri: %d",
- ei->iv_refTarget.get(), ei->iv_hw, ei->iv_calloutPriority);
-
- i_info->iv_hwCallouts.push_back(std::shared_ptr<ErrorInfoHwCallout>(ei));
- }
-
- ///
- /// @brief Collect proc callout FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryProcCallout::addErrorInfo(
- std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- ErrorInfoProcedureCallout* ei = new ErrorInfoProcedureCallout(
- static_cast<ProcedureCallouts::ProcedureCallout>(iv_procedure),
- static_cast<CalloutPriorities::CalloutPriority>(iv_calloutPriority));
-
- // Add the ErrorInfo
- FAPI_DBG("addErrorInfo: Adding proc callout, proc: %d, pri: %d",
- ei->iv_procedure, ei->iv_calloutPriority);
-
- i_info->iv_procedureCallouts.push_back(
- std::shared_ptr<ErrorInfoProcedureCallout>(ei));
- }
-
- ///
- /// @brief Collect bus callout FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryBusCallout::addErrorInfo(
- std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- // We need to add a procedure callout as well as a bus callout
- ErrorInfoEntryProcCallout(ProcedureCallouts::BUS_CALLOUT,
- iv_calloutPriority).addErrorInfo(i_info,
- i_object);
-
- // Now add our bus callout, but drop the priority by one.
- ErrorInfoBusCallout* ei = new ErrorInfoBusCallout(
- // First target
- *(static_cast<const fapi2::Target<TARGET_TYPE_ALL>*>
- (i_object[iv_endpoint1ObjIndex])),
-
- // Second target
- *(static_cast<const fapi2::Target<TARGET_TYPE_ALL>*>
- (i_object[iv_endpoint2ObjIndex])),
-
- // Priority, one lower.
- (iv_calloutPriority == CalloutPriorities::HIGH) ?
- CalloutPriorities::MEDIUM : CalloutPriorities::LOW);
-
- FAPI_DBG("addErrorInfo: Adding bus callout t1: 0x%lx t2: 0x%lx, pri: %d",
- ei->iv_target1.get(), ei->iv_target2.get(),
- ei->iv_calloutPriority);
-
- i_info->iv_busCallouts.push_back(
- std::shared_ptr<ErrorInfoBusCallout>(ei));
- }
-
- ///
- /// @brief Collect h/w target cdg FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryTargetCDG::addErrorInfo(
- std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- ErrorInfoCDG* ei = new
- ErrorInfoCDG(
- *(static_cast<const fapi2::Target<TARGET_TYPE_ALL>*>
- (i_object[iv_targetObjIndex])),
- iv_callout,
- iv_deconfigure,
- iv_gard,
- static_cast<CalloutPriorities::CalloutPriority>
- (iv_calloutPriority)
- );
-
- FAPI_DBG("addErrorInfo: Adding target 0x%lx cdg (%d:%d:%d), pri: %d",
- ei->iv_target.get(),
- ei->iv_callout, ei->iv_deconfigure,
- ei->iv_gard, ei->iv_calloutPriority);
-
- // Add the ErrorInfo
- i_info->iv_CDGs.push_back(std::shared_ptr<ErrorInfoCDG>(ei));
- }
-
- ///
- /// @brief Collect h/w children cdg FFDC information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryChildrenCDG::addErrorInfo(
- std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- ErrorInfoChildrenCDG* ei = new ErrorInfoChildrenCDG(
- *(static_cast<const fapi2::Target<TARGET_TYPE_ALL>*>
- (i_object[iv_parentObjIndex])),
- static_cast<fapi2::TargetType>(iv_childType),
- iv_callout,
- iv_deconfigure,
- iv_gard,
- static_cast<CalloutPriorities::CalloutPriority>
- (iv_calloutPriority),
- iv_childPort,
- iv_childNumber);
-
- FAPI_DBG("addErrorInfo: Adding children cdg (%d:%d:%d), type:"
- " 0x%08x, pri: %d",
- ei->iv_callout, ei->iv_deconfigure, ei->iv_gard,
- ei->iv_childType, ei->iv_calloutPriority);
-
- // Add the ErrorInfo
- i_info->iv_childrenCDGs.push_back(
- std::shared_ptr<ErrorInfoChildrenCDG>(ei));
- }
-
- ///
- /// @brief Collect trace information to this ffdc
- /// object
- /// @param[in] A pointer to the error info we're collecting
- /// @param[in] A pointer to the objects
- /// @return void
- ///
- void ErrorInfoEntryCollectTrace::addErrorInfo(
- std::shared_ptr<ErrorInfo> i_info,
- const void* const* i_object) const
- {
- ErrorInfoCollectTrace* ei = new ErrorInfoCollectTrace(
- static_cast<CollectTraces::CollectTrace>(iv_eieTraceId));
-
- FAPI_DBG("addErrorInfo: Adding trace: 0x%x", ei->iv_eiTraceId);
-
- // Add the ErrorInfo
- i_info->iv_traces.push_back(std::shared_ptr<ErrorInfoCollectTrace>(ei));
- }
-
-};
diff --git a/hwpf/fapi/src/plat_utils.C b/hwpf/fapi/src/plat_utils.C
deleted file mode 100755
index d22a6350..00000000
--- a/hwpf/fapi/src/plat_utils.C
+++ /dev/null
@@ -1,117 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file plat_utils.C
- * @brief Implements fapi2 common utilities
- */
-
-#include <stdint.h>
-#include <plat_trace.H>
-#include <return_code.H>
-#include <error_info.H>
-
-namespace fapi2
-{
- ///
- /// @brief Log an error.
- ///
- void logError(
- fapi2::ReturnCode & io_rc,
- fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE,
- bool i_unitTestError = false )
- {
- FAPI_DBG("logging 0x%lx.", uint64_t(io_rc));
-
- // Iterate over the vectors and output what is in them.
- const ErrorInfo* ei = io_rc.getErrorInfo();
-
- FAPI_DBG("ffdcs: %lu", ei->iv_ffdcs.size());
- for( auto i = ei->iv_ffdcs.begin(); i != ei->iv_ffdcs.end(); ++i )
- {
- uint32_t sz;
- (*i)->getData(sz);
- FAPI_DBG("\tid: 0x%x size %d", (*i)->getFfdcId(), sz);
- }
-
- FAPI_DBG("hwCallouts: %lu", ei->iv_hwCallouts.size());
- for( auto i = ei->iv_hwCallouts.begin(); i != ei->iv_hwCallouts.end();
- ++i )
- {
- FAPI_DBG("\thw: %d pri %d target: 0x%lx",
- (*i)->iv_hw, (*i)->iv_calloutPriority,
- (*i)->iv_refTarget.get());
- }
-
- FAPI_DBG("procedureCallouts: %lu", ei->iv_procedureCallouts.size());
- for( auto i = ei->iv_procedureCallouts.begin();
- i != ei->iv_procedureCallouts.end(); ++i )
- {
- FAPI_DBG("\tprocedure: %d pri %d",
- (*i)->iv_procedure, (*i)->iv_calloutPriority);
- }
-
- FAPI_DBG("busCallouts: %lu", ei->iv_busCallouts.size());
- for( auto i = ei->iv_busCallouts.begin(); i != ei->iv_busCallouts.end();
- ++i )
- {
- FAPI_DBG("\tbus: t1: 0x%lx t2: 0x%lx pri: %d",
- (*i)->iv_target1.get(), (*i)->iv_target2.get(),
- (*i)->iv_calloutPriority);
- }
-
-
- FAPI_DBG("cdgs: %lu", ei->iv_CDGs.size());
- for( auto i = ei->iv_CDGs.begin(); i != ei->iv_CDGs.end(); ++i )
- {
- FAPI_DBG("\ttarget: 0x%lx co: %d dc: %d gard: %d pri: %d",
- (*i)->iv_target.get(),
- (*i)->iv_callout,
- (*i)->iv_deconfigure,
- (*i)->iv_gard,
- (*i)->iv_calloutPriority);
-
- }
-
- FAPI_DBG("childrenCDGs: %lu", ei->iv_childrenCDGs.size());
- for( auto i = ei->iv_childrenCDGs.begin();
- i != ei->iv_childrenCDGs.end(); ++i )
- {
- FAPI_DBG("\tchildren: parent 0x%lx co: %d dc: %d gard: %d pri: %d",
- (*i)->iv_parent.get(),
- (*i)->iv_callout,
- (*i)->iv_deconfigure,
- (*i)->iv_gard,
- (*i)->iv_calloutPriority);
- }
-
- FAPI_DBG("traces: %lu", ei->iv_traces.size());
- for( auto i = ei->iv_traces.begin(); i != ei->iv_traces.end(); ++i )
- {
- FAPI_DBG("\ttraces: 0x%x", (*i)->iv_eiTraceId);
- }
-
- // Release the ffdc information now that we're done with it.
- io_rc.forgetData();
-
- }
-};
diff --git a/hwpf/fapi/tools/parseErrorInfo.pl b/hwpf/fapi/tools/parseErrorInfo.pl
deleted file mode 100755
index 1e3dcbba..00000000
--- a/hwpf/fapi/tools/parseErrorInfo.pl
+++ /dev/null
@@ -1,1479 +0,0 @@
-#!/usr/bin/perl
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/hwpf/fapi/fapiParseErrorInfo.pl $
-#
-# OpenPOWER HostBoot Project
-#
-# Contributors Listed Below - COPYRIGHT 2011,2014
-# [+] International Business Machines Corp.
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# permissions and limitations under the License.
-#
-# IBM_PROLOG_END_TAG
-# $Id: fapiParseErrorInfo.pl,v 1.30 2014/07/25 00:36:41 jmcgill Exp $
-# Purpose: This perl script will parse HWP Error XML files and create required
-# FAPI code.
-#
-# Author: CamVan Nguyen and Mike Jones
-# Reworked for fapi2/P9
-#
-# Usage:
-# fapiParseErrorInfo.pl <output dir> <filename1> <filename2> ...
-
-use strict;
-
-#------------------------------------------------------------------------------
-# Set PREFERRED_PARSER to XML::Parser. Otherwise it uses XML::SAX which contains
-# bugs that result in XML parse errors that can be fixed by adjusting white-
-# space (i.e. parse errors that do not make sense).
-#------------------------------------------------------------------------------
-$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
-
-#------------------------------------------------------------------------------
-# Specify perl modules to use
-#------------------------------------------------------------------------------
-use Digest::MD5 qw(md5_hex);
-use XML::Simple;
-my $xml = new XML::Simple (KeyAttr=>[]);
-
-# Uncomment to enable debug output
-use Data::Dumper;
-use Getopt::Long;
-
-my $target_ffdc_type = "fapi2::Target<fapi2::TARGET_TYPE_ALL>";
-my $buffer_ffdc_type = "fapi2::buffer";
-my $variable_buffer_ffdc_type = "fapi2::variable_buffer";
-my $ffdc_type = "fapi2::ffdc_t";
-
-# We want to keep the signatures for the ffdc gathering hwp so that
-# we can create members of the proper types for the ffdc classes.
-my %signatures = ("proc_extract_pore_halt_ffdc" => ["por_base_state",
- "por_halt_type_t",
- "por_ffdc_offset_t"],
- "hwpTestFfdc1" => [$target_ffdc_type],
- "proc_extract_pore_base_ffdc" => ["por_base_state", "por_sbe_base_state"],
- "proc_tp_collect_dbg_data" => [$target_ffdc_type],
- );
-
-# There are some names used in the XML files which exist in either
-# c++ keywords (case, for example) or macros (DOMAIN). The one's which
-# cause problems and need to be changed are here.
-#
-# DOMAIN is defined to 1 in math.h
-my %mangle_names = ("DOMAIN" => "FAPI2_DOMAIN");
-
-# A list of deprecated elements. These will report messages to the
-# user, and not define anything. They have not been found to be used,
-# but that doesn't mean they're not ...
-my %deprecated = ("RC_PROCPM_PMCINIT_TIMEOUT" => "CHIP_IN_ERROR is defined as a callout procedure");
-
-#------------------------------------------------------------------------------
-# Print Command Line Help
-#------------------------------------------------------------------------------
-my $arg_empty_ffdc = undef;
-my $arg_output_dir = undef;
-my $arg_use_variable_buffers = undef;
-
-# Get the options from the command line - the rest of @ARGV will
-# be filenames
-GetOptions("empty-ffdc-classes" => \$arg_empty_ffdc,
- "output-dir=s" => \$arg_output_dir,
- "use-variable-buffers" => \$arg_use_variable_buffers);
-
-my $numArgs = $#ARGV + 1;
-if (($numArgs < 1) || ($arg_output_dir eq undef))
-{
- print ("Usage: parseErrorInfo.pl [--empty-ffdc-classes] [--use-variable-buffers] --output-dir=<output dir> <filename1> <filename2> ...\n");
- print (" This perl script will parse HWP Error XML files and creates\n");
- print (" the following files:\n");
- print (" - hwp_return_codes.H. HwpReturnCode enumeration (HWP generated errors)\n");
- print (" - hwp_error_info.H. Error information (used by FAPI_SET_HWP_ERROR\n");
- print (" when a HWP generates an error)\n");
- print (" - collect_reg_ffdc.C. Function to collect register FFDC\n");
- print (" - set_sbe_error.H. Macro to create an SBE error\n");
- print (" The --empty-ffdc-classes option is for platforms which don't collect ffdc.\n");
- exit(1);
-}
-
-#------------------------------------------------------------------------------
-# Hashes containing error names/enum-values
-#------------------------------------------------------------------------------
-my %errNameToValueHash;
-my %errValuePresentHash;
-
-#------------------------------------------------------------------------------
-# Hashes containing ffdc names/enum-values
-#------------------------------------------------------------------------------
-my %ffdcNameToValueHash;
-my %ffdcValuePresentHash;
-
-#------------------------------------------------------------------------------
-# Subroutine that checks if an entry exists in an array. If it doesn't exist
-# then it is added. The index of the entry within the array is returned
-#------------------------------------------------------------------------------
-sub addEntryToArray
-{
- my ($arrayref, $entry ) = @_;
-
- my $match = 0;
- my $index = 0;
-
- foreach my $element (@$arrayref)
- {
- if ($element eq $entry)
- {
- $match = 1;
- last;
- }
- else
- {
- $index++;
- }
- }
-
- if (!($match))
- {
- push(@$arrayref, $entry);
- }
-
- return $index;
-}
-
-#------------------------------------------------------------------------------
-# Subroutine that figures out an error enum value from an error name and stores
-# it in global hashes
-#------------------------------------------------------------------------------
-sub setErrorEnumValue
-{
- my $name = $_[0];
-
- #--------------------------------------------------------------------------
- # Check that the error name is not a duplicate
- #--------------------------------------------------------------------------
- if (exists($errNameToValueHash{$name}))
- {
- # Two different errors with the same name!
- print ("fapiParseErrorInfo.pl ERROR. Duplicate error name ", $name, "\n");
- exit(1);
- }
-
- #--------------------------------------------------------------------------
- # Figure out the error enum-value. This is a hash value generated from
- # the error name. A hash is used for Cronus so that if a HWP is not
- # recompiled against a new eCMD/Cronus version where the errors have
- # changed then there will not be a mismatch in error values.
- # This is a 24bit hash value because FAPI has a requirement that the
- # top byte of the 32 bit error value be zero to store flags indicating
- # the creator of the error
- #--------------------------------------------------------------------------
- my $errHash128Bit = md5_hex($name);
- my $errHash24Bit = substr($errHash128Bit, 0, 6);
-
- #--------------------------------------------------------------------------
- # Check that the error enum-value is not a duplicate
- #--------------------------------------------------------------------------
- if (exists($errValuePresentHash{$errHash24Bit}))
- {
- # Two different errors generate the same hash-value!
- print ("fapiParseAttributeInfo.pl ERROR. Duplicate error hash value\n");
- exit(1);
- }
-
- #--------------------------------------------------------------------------
- # Update the hashes with the error name and ID
- #--------------------------------------------------------------------------
- $errValuePresentHash{$errHash24Bit} = 1;
- $errNameToValueHash{$name} = $errHash24Bit;
-}
-
-#------------------------------------------------------------------------------
-# Subroutine that figures out an FFDC ID value from an FFDC name and stores it
-# in global hashes for use when creating the enumeration of FFDC IDs
-#------------------------------------------------------------------------------
-sub setFfdcIdValue
-{
- my $name = $_[0];
-
- #--------------------------------------------------------------------------
- # Check that the FFDC name is not a duplicate
- #--------------------------------------------------------------------------
- if (exists($ffdcNameToValueHash{$name}))
- {
- # Two different FFDCs with the same name!
- print ("fapiParseErrorInfo.pl ERROR. Duplicate FFDC name ", $name, "\n");
- exit(1);
- }
-
- #--------------------------------------------------------------------------
- # Figure out the FFDC enum-value. This is a hash value generated from
- # the FFDC name.
- #--------------------------------------------------------------------------
- my $ffdcHash128Bit = md5_hex($name);
- my $ffdcHash32Bit = substr($ffdcHash128Bit, 0, 8);
-
- #--------------------------------------------------------------------------
- # Check that the error enum-value is not a duplicate
- #--------------------------------------------------------------------------
- if (exists($ffdcValuePresentHash{$ffdcHash32Bit}))
- {
- # Two different FFDCs generate the same hash-value!
- print ("fapiParseAttributeInfo.pl ERROR. Duplicate FFDC hash value\n");
- exit(1);
- }
-
- #--------------------------------------------------------------------------
- # Update the hashes with the error name and ID
- #--------------------------------------------------------------------------
- $ffdcValuePresentHash{$ffdcHash32Bit} = 1;
- $ffdcNameToValueHash{$name} = $ffdcHash32Bit;
-}
-
-#------------------------------------------------------------------------------
-# Subroutine to create ffdc methods
-#------------------------------------------------------------------------------
-sub addFfdcMethod
-{
- my $methods = shift;
- my $ffdc_uc = shift;
- my $class_name = shift;
- my $type = shift;
- my $ffdc_lc = lc($ffdc_uc);
-
- # If we didn't get a type passed in, this element will get an ffdc_t pair.
- $type = $ffdc_type if ($type eq undef);
-
- # Mangle the uppercase name if needed
- $ffdc_uc = $mangle_names{$ffdc_uc} if ($mangle_names{$ffdc_uc} ne undef);
-
- my $key = $ffdc_lc.$type;
- my $key_target = $ffdc_lc.$target_ffdc_type;
- my $key_ffdc = $ffdc_lc.$ffdc_type;
-
- # Check to see if this element already has been recorded with this
- # type or a target type. Note the effect we're shooting for here is
- # to define the member if it's not been defined before *or* it's
- # changing from an ffdc_t to a target due to other information in the xml
- return if ($methods->{$key}{type} eq $type);
- return if ($methods->{$key_target}{type} eq $target_ffdc_type);
-
- # Just leave if this is a variable_buffer ans we're not supporting that.
- return if (($type eq $variable_buffer_ffdc_type) && ($arg_use_variable_buffers eq undef));
-
- # Set the proper type, and clear out any previous members/methods if
- # we're going from an ffdc_t to a target.
- $methods->{$key}{type} = $type;
- delete $methods->{$key_ffdc} if ($type eq $target_ffdc_type);
-
- my $method = "";
- my $method_body = "";
-
- if ($type eq $ffdc_type)
- {
- $method = "\n template< typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr >\n";
- $method .= " $class_name& set_$ffdc_lc(const T& i_value)\n";
- $method_body = " {$ffdc_uc.ptr() = &i_value; $ffdc_uc.size() = fapi2::getErrorInfoFfdcSize(i_value); return *this;}\n\n";
-
- $methods->{$key}{member} = "$ffdc_type $ffdc_uc;\n ";
- }
-
- elsif ($type eq $buffer_ffdc_type)
- {
- # Two methods - one for integral buffers and one for variable_buffers
- $method = "\n template< typename T >\n";
- $method .= " $class_name& set_$ffdc_lc(const fapi2::buffer<T>& i_value)\n";
- $method_body = " {$ffdc_uc.ptr() = &i_value(); $ffdc_uc.size() = i_value.template getLength<uint8_t>(); return *this;}\n\n";
-
- $methods->{$key}{member} = "$ffdc_type $ffdc_uc;\n ";
- }
-
- elsif ($type eq $variable_buffer_ffdc_type)
- {
- $method = "\n $class_name& set_$ffdc_lc(const fapi2::variable_buffer& i_value)\n";
- $method_body = " {$ffdc_uc.ptr() = &i_value(); $ffdc_uc.size() = i_value.template getLength<uint8_t>(); return *this;}\n\n";
-
- # No need to add the member here, it was added with fapi2::buffer. And we can't have variable
- # buffer support with out integral buffer support (can we?)
- }
-
- else
- {
- $method = "\n $class_name& set_$ffdc_lc(const $type& i_value)\n";
- $method_body .= " {$ffdc_uc = &i_value; return *this;}\n\n";
-
- $methods->{$key}{member} = "const $type* $ffdc_uc;\n ";
- }
-
- $method .= ($arg_empty_ffdc eq undef) ? $method_body : " {}\n\n";
- $methods->{$key}{method} = $method;
-}
-
-#------------------------------------------------------------------------------
-# Open output files for writing
-#------------------------------------------------------------------------------
-my $rcFile = $arg_output_dir;
-$rcFile .= "/";
-$rcFile .= "hwp_return_codes.H";
-open(RCFILE, ">", $rcFile);
-
-my $eiFile = $arg_output_dir;
-$eiFile .= "/";
-$eiFile .= "hwp_error_info.H";
-open(EIFILE, ">", $eiFile);
-
-my $ecFile = $arg_output_dir;
-$ecFile .= "/";
-$ecFile .= "hwp_ffdc_classes.H";
-open(ECFILE, ">", $ecFile);
-
-my $crFile = $arg_output_dir;
-$crFile .= "/";
-$crFile .= "collect_reg_ffdc.C";
-open(CRFILE, ">", $crFile);
-
-my $sbFile = $arg_output_dir;
-$sbFile .= "/";
-$sbFile .= "set_sbe_error.H";
-open(SBFILE, ">", $sbFile);
-
-#------------------------------------------------------------------------------
-# Print start of file information to hwp_error_info.H
-#------------------------------------------------------------------------------
-print EIFILE "// hwp_error_info.H\n";
-print EIFILE "// This file is generated by the perl script parseErrorInfo.pl\n\n";
-print EIFILE "#ifndef FAPI2_HWPERRORINFO_H_\n";
-print EIFILE "#define FAPI2_HWPERRORINFO_H_\n\n";
-print EIFILE "#include <target.H>\n";
-print EIFILE "#include <return_code.H>\n";
-print EIFILE "#include <plat_trace.H>\n";
-print EIFILE "/**\n";
-print EIFILE " * \@brief Error Information macros and HwpFfdcId enumeration\n";
-print EIFILE " *\/\n";
-
-#------------------------------------------------------------------------------
-# Print start of file information to hwp_ffdc_classes.H
-#------------------------------------------------------------------------------
-print ECFILE "// hwp_ffdc_classes.H\n";
-print ECFILE "// This file is generated by the perl script parseErrorInfo.pl\n\n";
-print ECFILE "#ifndef FAPI2_HWP_FFDC_CLASSES_H_\n";
-print ECFILE "#define FAPI2_HWP_FFDC_CLASSES_H_\n\n";
-print ECFILE "#include <ffdc.H>\n";
-print ECFILE "#include <buffer.H>\n";
-print ECFILE "#include <variable_buffer.H>\n" if ($arg_use_variable_buffers ne undef);
-print ECFILE "#include <error_info.H>\n";
-print ECFILE "#include <utils.H>\n";
-print ECFILE "#include <hwp_error_info.H>\n";
-print ECFILE "#include <collect_reg_ffdc.H>\n";
-#print ECFILE "#include <proc_extract_sbe_rc.H>\n\n";
-print ECFILE "/**\n";
-print ECFILE " * \@brief FFDC gathering classes\n";
-print ECFILE " *\/\n";
-print ECFILE "namespace fapi2\n{\n";
-
-#------------------------------------------------------------------------------
-# Print start of file information to collectRegFfdc.C
-#------------------------------------------------------------------------------
-print CRFILE "// collect_reg_ffdc.C\n";
-print CRFILE "// This file is generated by the perl script parseErrorInfo.pl\n\n";
-print CRFILE "#include <stdint.h>\n";
-print CRFILE "#include <vector>\n";
-
-print CRFILE "#include <buffer.H>\n";
-print CRFILE "#include <collect_reg_ffdc.H>\n";
-print CRFILE "#include <target.H>\n";
-print CRFILE "#include <return_code.H>\n";
-print CRFILE "#include <hw_access.H>\n";
-print CRFILE "#include <plat_trace.H>\n\n";
-
-print CRFILE "namespace fapi2\n";
-print CRFILE "{\n";
-print CRFILE "void collectRegFfdc(const fapi2::Target<TARGET_TYPE_ALL>* i_target,\n";
-print CRFILE " const fapi2::HwpFfdcId i_ffdcId,\n";
-print CRFILE " fapi2::ReturnCode & o_rc,\n";
-print CRFILE " const TargetType i_child,\n";
-print CRFILE " const TargetType i_presChild,\n";
-print CRFILE " uint32_t i_childOffsetMult)\n";
-print CRFILE "{\n";
-print CRFILE " FAPI_INF(\"collectRegFfdc. FFDC ID: 0x%x\", i_ffdcId);\n";
-print CRFILE " fapi2::ReturnCode l_rc;\n";
-print CRFILE " fapi2::buffer<uint64_t> l_buf;\n";
-print CRFILE " uint32_t l_cfamData = 0;\n";
-print CRFILE " uint64_t l_scomData = 0;\n";
-print CRFILE " std::vector<uint32_t> l_cfamAddresses;\n";
-print CRFILE " std::vector<uint64_t> l_scomAddresses;\n";
-print CRFILE " uint32_t l_ffdcSize = 0;\n\n";
-print CRFILE " switch (i_ffdcId)\n";
-print CRFILE " {\n";
-
-#------------------------------------------------------------------------------
-# Print start of file information to setSbeError.H
-#------------------------------------------------------------------------------
-print SBFILE "// setSbeError.H\n";
-print SBFILE "// This file is generated by the perl script parseErrorInfo.pl\n\n";
-print SBFILE "// When SBE code creates an error, it produces an error value\n";
-print SBFILE "// that matches a value in the HwpReturnCode enum in\n";
-print SBFILE "// fapiHwpReturnCodes.H. The SBE uses the __ASSEMBLER__\n";
-print SBFILE "// primitives in hwpReturnCodes.H to do this. The function\n";
-print SBFILE "// that extracts the error value from the SBE needs to call\n";
-print SBFILE "// FAPI_SET_HWP_ERROR to create the error and get all the\n";
-print SBFILE "// actions in the error XML file performed, but that macro can\n";
-print SBFILE "// only be called with the enumerator, not the value. This\n";
-print SBFILE "// FAPI_SET_SBE_ERROR macro can be called instead, it calls\n";
-print SBFILE "// FAPI_SET_HWP_ERROR with the correct error enumerator.\n";
-print SBFILE "// Errors containing <sbeError/> in their XML are supported\n";
-print SBFILE "// in this macro.\n\n";
-print SBFILE "// Note that it is expected that this macro will be called\n";
-print SBFILE "// in one place (the function that extracts the error from\n";
-print SBFILE "// the SBE), if this changes and it is called in multiple\n";
-print SBFILE "// places then the macro could be turned into a function to\n";
-print SBFILE "// avoid the code size increase of expanding the macro in\n";
-print SBFILE "// multiple places. The function approach is slightly more\n";
-print SBFILE "// complicated, there is an extra C file and the function\n";
-print SBFILE "// must take a parameter for the generic chip ID in the error\n";
-print SBFILE "// XML.\n\n";
-print SBFILE "#ifndef FAPI2_SETSBEERROR_H_\n";
-print SBFILE "#define FAPI2_SETSBEERROR_H_\n\n";
-print SBFILE "#define FAPI_SET_SBE_ERROR(RC, ERRVAL)\\\n";
-print SBFILE "{\\\n";
-print SBFILE "switch (ERRVAL)\\\n";
-print SBFILE "{\\\n";
-
-#------------------------------------------------------------------------------
-# For each XML file
-#------------------------------------------------------------------------------
-foreach my $argnum (0 .. $#ARGV)
-{
- my $infile = $ARGV[$argnum];
- my $count = 0;
-
- #--------------------------------------------------------------------------
- # Read XML file. The ForceArray option ensures that there is an array of
- # elements even if there is only one element
- #--------------------------------------------------------------------------
- my $errors = $xml->XMLin($infile, ForceArray =>
- ['hwpError', 'collectFfdc', 'ffdc', 'callout', 'deconfigure', 'gard',
- 'registerFfdc', 'collectRegisterFfdc', 'cfamRegister', 'scomRegister',
- 'id','collectTrace', 'buffer']);
-
- # Uncomment to get debug output of all errors
- #print "\nFile: ", $infile, "\n", Dumper($errors), "\n";
-
- #--------------------------------------------------------------------------
- # For each Error
- #--------------------------------------------------------------------------
- foreach my $err (@{$errors->{hwpError}})
- {
- # Hash of methods for the ffdc-gathering class
- my %methods;
-
- #----------------------------------------------------------------------
- # Check that expected fields are present
- #----------------------------------------------------------------------
- if (! exists $err->{rc})
- {
- print ("parseErrorInfo.pl ERROR. rc missing\n");
- exit(1);
- }
-
- if (! exists $err->{description})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. description missing\n");
- exit(1);
- }
-
- #----------------------------------------------------------------------
- # Check that this rc hasn't been deprecated
- #----------------------------------------------------------------------
- if ($deprecated{$err->{rc}} ne undef)
- {
- print "WARNING: $err->{rc} has been deprecated because $deprecated{$err->{rc}}\n";
- next;
- }
-
- #----------------------------------------------------------------------
- # Set the error enum value in a global hash
- #---------------------------------------------------------------------
- setErrorEnumValue($err->{rc});
-
- #----------------------------------------------------------------------
- # If this is an SBE error, add it to set_sbe_error.H
- #----------------------------------------------------------------------
- if (exists $err->{sbeError})
- {
- print SBFILE " case fapi2::$err->{rc}:\\\n";
- print SBFILE " FAPI_SET_HWP_ERROR(RC, $err->{rc});\\\n";
- print SBFILE " break;\\\n";
- }
-
- #----------------------------------------------------------------------
- # Print the CALL_FUNCS_TO_COLLECT_FFDC macro to hwp_error_info.H
- #----------------------------------------------------------------------
- print EIFILE "#define $err->{rc}_CALL_FUNCS_TO_COLLECT_FFDC(RC) ";
-
- # For now, this code is removed. It appears to work just fine but
- # will require more of the fapi2 infrastructure to be in place.
- # Because the ffdc collection classes create members with real types,
- # the declarations of the types need to be visible - and they're not
- # right now. When we get further along, we can enable this code.
-=begin NO_FFDC_COLLECT_HWP
- $count = 0;
-
- foreach my $collectFfdc (@{$err->{collectFfdc}})
- {
- if ($count == 0)
- {
- print EIFILE "{ fapi2::ReturnCode l_tempRc; ";
- }
- $count++;
-
- print EIFILE "FAPI_EXEC_HWP(l_tempRc, $collectFfdc, RC); ";
-
- # collectFfdc is a string we're going to stuff into FAPI_EXEC_HWP
- # but we need to create the arguments in the ffdc class. The first
- # element inthe collectFfdc string is the function to call.
- my @elements = split /,/, $collectFfdc;
- my @signature = @{$signatures{@elements[0]}};
- for (my $i = 1; $i <= $#elements; $i++)
- {
- @elements[$i] =~ s/^\s+|\s+$//g;
- addFfdcMethod(\%methods, @elements[$i], lc($err->{rc}), @signature[$i-1]);
- }
- }
-
- if ($count > 0)
- {
- print EIFILE "}";
- }
-=cut NO_FFDC_COLLECT_HWP
- print EIFILE "\n";
-
- #----------------------------------------------------------------------
- # Print the CALL_FUNCS_TO_COLLECT_REG_FFDC macro to hwp_error_info.H
- #----------------------------------------------------------------------
- print EIFILE "#define $err->{rc}_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC) ";
-
- foreach my $collectRegisterFfdc (@{$err->{collectRegisterFfdc}})
- {
- #------------------------------------------------------------------
- # Check that expected fields are present
- #------------------------------------------------------------------
- if (! exists $collectRegisterFfdc->{id}[0])
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. id(s) missing from collectRegisterFfdc\n");
- exit(1);
- }
- foreach my $id (@{$collectRegisterFfdc->{id}})
- {
- #---------------------------------------------------------------------------------
- # Check FFDC register collection type: target, child, or based on present children
- #---------------------------------------------------------------------------------
- if (exists $collectRegisterFfdc->{target})
- {
- print EIFILE "fapi2::collectRegFfdc($collectRegisterFfdc->{target}, ";
- print EIFILE "fapi2::$id, RC, fapi2::TARGET_TYPE_NONE, fapi2::TARGET_TYPE_NONE); ";
- addFfdcMethod(\%methods, $collectRegisterFfdc->{target},
- lc($err->{rc}), $target_ffdc_type);
- }
- elsif (exists $collectRegisterFfdc->{childTargets})
- {
- if (! exists $collectRegisterFfdc->{childTargets}->{parent})
- {
- print ("parseErrorInfo.pl ERROR: parent missing from collectRegisterFfdc\n");
- exit(1);
- }
- if (! exists $collectRegisterFfdc->{childTargets}->{childType})
- {
- print ("parseErrorInfo.pl ERROR: childType missing from collectRegisterFfdc\n");
- exit(1);
- }
- print EIFILE "fapi2::collectRegFfdc($collectRegisterFfdc->{childTargets}->{parent}, fapi2::$id, ";
- print EIFILE "RC, fapi2::$collectRegisterFfdc->{childTargets}->{childType}, fapi2::TARGET_TYPE_NONE); ";
- addFfdcMethod(\%methods, $collectRegisterFfdc->{childTargets}->{parent},
- lc($err->{rc}), $target_ffdc_type);
- }
- elsif (exists $collectRegisterFfdc->{basedOnPresentChildren})
- {
- if (! exists $collectRegisterFfdc->{basedOnPresentChildren}->{target})
- {
- print ("parseErrorInfo.pl ERROR: target missing from collectRegisterFfdc\n");
- exit(1);
- }
- if (! exists $collectRegisterFfdc->{basedOnPresentChildren}->{childType})
- {
- print ("parseErrorInfo.pl ERROR: childType missing from collectRegisterFfdc\n");
- exit(1);
- }
- if (! exists $collectRegisterFfdc->{basedOnPresentChildren}->{childPosOffsetMultiplier})
- {
- print ("parseErrorInfo.pl ERROR: childPosOffsetMultiplier missing from collectRegisterFfdc\n");
- exit(1);
- }
- print EIFILE "fapi2::collectRegFfdc($collectRegisterFfdc->{basedOnPresentChildren}->{target}, fapi2::$id, RC, ";
- print EIFILE "fapi2::TARGET_TYPE_NONE, fapi2::$collectRegisterFfdc->{basedOnPresentChildren}->{childType}, ";
- print EIFILE "$collectRegisterFfdc->{basedOnPresentChildren}->{childPosOffsetMultiplier}); ";
- addFfdcMethod(\%methods, $collectRegisterFfdc->{basedOnPresentChildren}->{target},
- lc($err->{rc}), $target_ffdc_type);
- }
- else
- {
- print ("parseErrorInfo.pl ERROR: Invalid collectRegisterFfdc configuration\n");
- exit(1);
- }
- }
- }
-
- print EIFILE "\n";
-
- #----------------------------------------------------------------------
- # Print the ADD_ERROR_INFO macro to hwp_error_info.H
- #----------------------------------------------------------------------
- print EIFILE "#define $err->{rc}_ADD_ERROR_INFO(RC) ";
-
- # Array of EI Objects
- my @eiObjects;
-
- my $eiObjectStr = "const void * l_objects[] = {";
- my $eiEntryStr = "";
- my $eiEntryCount = 0;
- my %cdgTargetHash; # Records the callout/deconfigure/gards for Targets
- my %cdgChildHash; # Records the callout/deconfigure/gards for Children
-
- # collect firmware trace
- foreach my $collectTrace (@{$err->{collectTrace}})
- {
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_COLLECT_TRACE; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].collect_trace.iv_eieTraceId = fapi2::CollectTraces::$collectTrace; \\\n";
- $eiEntryCount++;
- }
-
- # Local FFDC
- foreach my $ffdc (@{$err->{ffdc}})
- {
- # Set the FFDC ID value in a global hash. The name is <rc>_<ffdc>
- my $ffdcName = $err->{rc} . "_";
- $ffdcName = $ffdcName . $ffdc;
- setFfdcIdValue($ffdcName);
-
- # Add the FFDC data to the EI Object array if it doesn't already exist
- my $objNum = addEntryToArray(\@eiObjects, $ffdc);
-
- # Add a method to the ffdc-gathering class
- addFfdcMethod(\%methods, $ffdc, lc($err->{rc}));
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_FFDC; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcObjIndex = $objNum; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcId = fapi2::$ffdcName; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcSize = fapi2::getErrorInfoFfdcSize($ffdc); \\\n";
- $eiEntryCount++;
- }
-
- # Buffers, looks a lot like local ffdc
- foreach my $buffer (@{$err->{buffer}})
- {
- # Set the FFDC ID value in a global hash. The name is <rc>_<ffdc>
- my $bufferName = $err->{rc} . "_";
- $bufferName = $bufferName . $buffer;
- setFfdcIdValue($bufferName);
-
- # Add the FFDC data to the EI Object array if it doesn't already exist
- my $objNum = addEntryToArray(\@eiObjects, $buffer);
-
- # Add a method to the ffdc-gathering class - one for each buffer type
- addFfdcMethod(\%methods, $buffer, lc($err->{rc}), $buffer_ffdc_type);
- addFfdcMethod(\%methods, $buffer, lc($err->{rc}), $variable_buffer_ffdc_type);
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_FFDC; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcObjIndex = $objNum; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcId = fapi2::$bufferName; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].ffdc.iv_ffdcSize = fapi2::getErrorInfoFfdcSize($buffer); \\\n";
- $eiEntryCount++;
- }
-
- # Procedure/Target/Bus/Child callouts
- foreach my $callout (@{$err->{callout}})
- {
- if (! exists $callout->{priority})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Callout priority missing\n");
- exit(1);
- }
-
- my $elementsFound = 0;
- if (exists $callout->{hw})
- {
- # HW Callout
- if (! exists $callout->{hw}->{hwid})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. HW Callout hwid missing\n");
- exit(1);
- }
-
- # Check that those HW callouts that need reference targets have them
- if (($callout->{hw}->{hwid} eq "TOD_CLOCK") ||
- ($callout->{hw}->{hwid} eq "MEM_REF_CLOCK") ||
- ($callout->{hw}->{hwid} eq "PROC_REF_CLOCK") ||
- ($callout->{hw}->{hwid} eq "PCI_REF_CLOCK"))
- {
- if (! exists $callout->{hw}->{refTarget})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Callout missing refTarget\n");
- exit(1);
- }
- }
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_HW_CALLOUT; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].hw_callout.iv_hw = fapi2::HwCallouts::$callout->{hw}->{hwid}; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].hw_callout.iv_calloutPriority = fapi2::CalloutPriorities::$callout->{priority}; \\\n";
- if (exists $callout->{hw}->{refTarget})
- {
- # Add the Targets to the objectlist if they don't already exist
- my $objNum = addEntryToArray(\@eiObjects, $callout->{hw}->{refTarget});
- $eiEntryStr .= " l_entries[$eiEntryCount].hw_callout.iv_refObjIndex = $objNum; \\\n";
-
- # Add a method to the ffdc-gathering class
- addFfdcMethod(\%methods, $callout->{hw}->{refTarget}, lc($err->{rc}));
- }
- else
- {
- $eiEntryStr .= " l_entries[$eiEntryCount].hw_callout.iv_refObjIndex = 0xff; \\\n";
- }
- $eiEntryCount++;
- $elementsFound++;
- }
- if (exists $callout->{procedure})
- {
- # Procedure Callout
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_PROCEDURE_CALLOUT; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].proc_callout.iv_procedure = fapi2::ProcedureCallouts::$callout->{procedure}; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].proc_callout.iv_calloutPriority = fapi2::CalloutPriorities::$callout->{priority}; \\\n";
- $eiEntryCount++;
- $elementsFound++;
- }
- if (exists $callout->{bus})
- {
- # A Bus Callout consists of two targets separated by
- # commas/spaces
- my @targets = split(/\s*,\s*|\s+/, $callout->{bus});
-
- if (scalar @targets != 2)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. did not find two targets in bus callout\n");
- exit(1);
- }
-
- # Check the type of the Targets
- print EIFILE "fapi2::checkType<const $target_ffdc_type *>($targets[0]); \\\n";
- print EIFILE "fapi2::checkType<const $target_ffdc_type *>($targets[1]); \\\n";
-
- # Add the Targets to the objectlist if they don't already exist
- my $objNum1 = addEntryToArray(\@eiObjects, $targets[0]);
-
- my $objNum2 = addEntryToArray(\@eiObjects, $targets[1]);
-
- # Add a method to the ffdc-gathering class
- addFfdcMethod(\%methods, $targets[0], lc($err->{rc}), $target_ffdc_type);
- addFfdcMethod(\%methods, $targets[1], lc($err->{rc}), $target_ffdc_type);
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_BUS_CALLOUT; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].bus_callout.iv_endpoint1ObjIndex = $objNum1; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].bus_callout.iv_endpoint2ObjIndex = $objNum2; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].bus_callout.iv_calloutPriority = fapi2::CalloutPriorities::$callout->{priority}; \\\n";
- $eiEntryCount++;
- $elementsFound++;
- }
- if (exists $callout->{target})
- {
- # Add the Target to cdgTargetHash to be processed with any
- # deconfigure and GARD requests
- $cdgTargetHash{$callout->{target}}{callout} = 1;
- $cdgTargetHash{$callout->{target}}{priority} =
- $callout->{priority};
-
- $elementsFound++;
- }
- if (exists $callout->{childTargets})
- {
- # Check that the parent and childType subelements exist
- if (! exists $callout->{childTargets}->{parent})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child Callout parent missing\n");
- exit(1);
- }
-
- if (! exists $callout->{childTargets}->{childType})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child Callout childType missing\n");
- exit(1);
- }
-
- # Add the child info to cdgChildHash to be processed with
- # any deconfigure and GARD requests
- my $parent = $callout->{childTargets}->{parent};
- my $childType = $callout->{childTargets}->{childType};
- $cdgChildHash{$parent}{$childType}{callout} = 1;
- $cdgChildHash{$parent}{$childType}{priority} =
- $callout->{priority};
-
- $elementsFound++;
-
- if (exists $callout->{childTargets}->{childPort})
- {
- my $childPort = $callout->{childTargets}->{childPort};
-
- $cdgChildHash{$parent}{$childType}{childPort} = $childPort;
- }
-
- if (exists $callout->{childTargets}->{childNumber})
- {
- my $childNum = $callout->{childTargets}->{childNumber};
- $cdgChildHash{$parent}{$childType}{childNumber} = $childNum;
- }
-
- }
- if ($elementsFound == 0)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Callout incomplete\n");
- exit(1);
- }
- elsif ($elementsFound > 1)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Callout has multiple elements\n");
- exit(1);
- }
- } # callout
-
- # Target/Child deconfigures
- foreach my $deconfigure (@{$err->{deconfigure}})
- {
- my $elementsFound = 0;
- if (exists $deconfigure->{target})
- {
- # Add the Target to cdgTargetHash to be processed with any
- # callout and GARD requests
- $cdgTargetHash{$deconfigure->{target}}{deconf} = 1;
- $elementsFound++;
- }
- if (exists $deconfigure->{childTargets})
- {
- # Check that the parent and childType subelements exist
- if (! exists $deconfigure->{childTargets}->{parent})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child Deconfigure parent missing\n");
- exit(1);
- }
- if (! exists $deconfigure->{childTargets}->{childType})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child Deconfigure childType missing\n");
- exit(1);
- }
-
- # Add the child info to cdgChildHash to be processed with
- # any callout and GARD requests
- my $parent = $deconfigure->{childTargets}->{parent};
- my $childType = $deconfigure->{childTargets}->{childType};
- $cdgChildHash{$parent}{$childType}{deconf} = 1;
-
- $elementsFound++;
-
- if ( exists $deconfigure->{childTargets}->{childPort})
- {
- my $childPort = $deconfigure->{childTargets}->{childPort};
-
- $cdgChildHash{$parent}{$childType}{childPort} = $childPort;
- }
-
- if ( exists $deconfigure->{childTargets}->{childNumber})
- {
- my $childNum = $deconfigure->{childTargets}->{childNumber};
- $cdgChildHash{$parent}{$childType}{childNumber} = $childNum;
-
- }
- }
- if ($elementsFound == 0)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Deconfigure incomplete\n");
- exit(1);
- }
- elsif ($elementsFound > 1)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Deconfigure has multiple elements\n");
- exit(1);
- }
- } # deconfigure
-
- # Target/Child Gards
- foreach my $gard (@{$err->{gard}})
- {
- my $elementsFound = 0;
- if (exists $gard->{target})
- {
- # Add the Target to cdgTargetHash to be processed with any
- # callout and deconfigure requests
- $cdgTargetHash{$gard->{target}}{gard} = 1;
- $elementsFound++;
- }
- if (exists $gard->{childTargets})
- {
- # Check that the parent and childType subelements exist
- if (! exists $gard->{childTargets}->{parent})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child GARD parent missing\n");
- exit(1);
- }
- if (! exists $gard->{childTargets}->{childType})
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. Child GARD childType missing\n");
- exit(1);
- }
-
- # Add the child info to cdgChildHash to be processed with
- # any callout and deconfigure requests
- my $parent = $gard->{childTargets}->{parent};
- my $childType = $gard->{childTargets}->{childType};
- $cdgChildHash{$parent}{$childType}{gard} = 1;
-
- $elementsFound++;
-
- if ( exists $gard->{childTargets}->{childPort})
- {
- my $childPort = $gard->{childTargets}->{childPort};
-
- $cdgChildHash{$parent}{$childType}{childPort} = $childPort;
-
- }
-
- if ( exists $gard->{childTargets}->{childNumber})
- {
- my $childNum = $gard->{childTargets}->{childNumber};
- $cdgChildHash{$parent}{$childType}{childNumber} = $childNum;
- }
- }
- if ($elementsFound == 0)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. GARD incomplete\n");
- exit(1);
- }
- elsif ($elementsFound > 1)
- {
- print ("parseErrorInfo.pl ERROR in $err->{rc}. GARD has multiple elements\n");
- exit(1);
- }
- } # gard
-
- # Process the callout, deconfigures and GARDs for each Target
- foreach my $cdg (keys %cdgTargetHash)
- {
- # Check the type
- print EIFILE "fapi2::checkType<const $target_ffdc_type *>($cdg); \\\n";
-
- my $callout = 0;
- my $priority = 'LOW';
- my $deconf = 0;
- my $gard = 0;
-
- if (exists $cdgTargetHash{$cdg}->{callout})
- {
- $callout = 1;
- }
- if (exists $cdgTargetHash{$cdg}->{priority})
- {
- $priority = $cdgTargetHash{$cdg}->{priority};
- }
- if (exists $cdgTargetHash{$cdg}->{deconf})
- {
- $deconf = 1;
- }
- if (exists $cdgTargetHash{$cdg}->{gard})
- {
- $gard = 1;
- }
-
- # Add the Target to the objectlist if it doesn't already exist
- my $objNum = addEntryToArray(\@eiObjects, $cdg);
-
- # Add a method to the ffdc-gathering class
- addFfdcMethod(\%methods, $cdg, lc($err->{rc}), $target_ffdc_type);
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_CDG; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_targetObjIndex = $objNum; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_callout = $callout; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_deconfigure = $deconf; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_gard = $gard; \\\n";
- $eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_calloutPriority = fapi2::CalloutPriorities::$priority; \\\n";
- $eiEntryCount++;
- }
-
- # Process the callout, deconfigures and GARDs for Child Targets
- foreach my $parent (keys %cdgChildHash)
- {
- # Check the type
- print EIFILE "fapi2::checkType<const $target_ffdc_type *>($parent); \\\n";
-
- foreach my $childType (keys %{$cdgChildHash{$parent}})
- {
- my $callout = 0;
- my $priority = 'LOW';
- my $deconf = 0;
- my $gard = 0;
- my $childPort = 0xFF;
- my $childNumber = 0xFF;
-
- if (exists $cdgChildHash{$parent}{$childType}->{callout})
- {
- $callout = 1;
- }
- if (exists $cdgChildHash{$parent}->{$childType}->{priority})
- {
- $priority =
- $cdgChildHash{$parent}->{$childType}->{priority};
- }
- if (exists $cdgChildHash{$parent}->{$childType}->{deconf})
- {
- $deconf = 1;
- }
- if (exists $cdgChildHash{$parent}->{$childType}->{childPort})
- {
- $childPort =
- $cdgChildHash{$parent}->{$childType}->{childPort} ;
- addFfdcMethod(\%methods, $childPort, lc($err->{rc}));
- }
- if (exists $cdgChildHash{$parent}->{$childType}->{childNumber})
- {
- $childNumber =
- $cdgChildHash{$parent}->{$childType}->{childNumber} ;
- addFfdcMethod(\%methods, $childNumber, lc($err->{rc}));
- }
- if (exists $cdgChildHash{$parent}->{$childType}->{gard})
- {
- $gard = 1;
- }
-
-
- # Add the Target to the objectlist if it doesn't already exist
- my $objNum = addEntryToArray(\@eiObjects, $parent);
- addFfdcMethod(\%methods, $parent, lc($err->{rc}), $target_ffdc_type);
-
- # Add an EI entry to eiEntryStr
- $eiEntryStr .=
- " l_entries[$eiEntryCount].iv_type = fapi2::EI_TYPE_CHILDREN_CDG; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_parentObjIndex = $objNum; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_callout = $callout; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_deconfigure = $deconf; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_childType = fapi2::$childType; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_childPort = $childPort; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_childNumber = $childNumber; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_gard = $gard; \\\n";
- $eiEntryStr .=
- " l_entries[$eiEntryCount].children_cdg.iv_calloutPriority = fapi2::CalloutPriorities::$priority; \\\n";
- $eiEntryCount++;
- }
- }
-
- # Add all objects to $eiObjectStr
- my $objCount = 0;
-
- foreach my $eiObject (@eiObjects)
- {
- if ($objCount > 0)
- {
- $eiObjectStr .= ", ";
- }
-
- if ($mangle_names{$eiObject} eq undef)
- {
- $eiObjectStr .= "$eiObject"
- }
- else
- {
- $eiObjectStr .= $mangle_names{$eiObject};
- }
-
- $objCount++;
- }
- $eiObjectStr .= "};";
-
- # Print info to file
- if ($eiEntryCount > 0)
- {
- print EIFILE "\\\n{ \\\n $eiObjectStr \\\n";
- print EIFILE " fapi2::ErrorInfoEntry l_entries[$eiEntryCount]; \\\n";
- print EIFILE "$eiEntryStr";
- print EIFILE " RC.addErrorInfo(l_objects, l_entries, $eiEntryCount); \\\n}";
- }
-
- print EIFILE "\n";
-
- #----------------------------------------------------------------------
- # Print the return code class to hwp_error_info.H
- #----------------------------------------------------------------------
- # Remove the repeated whitespace and newlines other characters from the description
- $err->{description} =~ s/^\s+|\s+$|"//g;
- $err->{description} =~ tr{\n}{ };
- $err->{description} =~ s/\h+/ /g;
-
- #----------------------------------------------------------------------
- # Print the return code class to hwp_error_info.H
- #----------------------------------------------------------------------
- my $class_name = lc($err->{rc});
-
- # Class declaration
- print ECFILE "\nclass $class_name\n{\n public:\n";
-
- # Constructor. This traces the description. If this is too much, we can
- # remove it.
- if ($arg_empty_ffdc eq undef)
- {
- print ECFILE " $class_name(fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE, fapi2::ReturnCode& i_rc = fapi2::current_err):\n";
- print ECFILE " iv_rc(i_rc),\n";
- print ECFILE " iv_sev(i_sev)\n";
- print ECFILE " { FAPI_ERR(\"$err->{description}\"); }\n";
- }
- else
- {
- print ECFILE " $class_name(fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE, fapi2::ReturnCode& i_rc = fapi2::current_err)\n";
- print ECFILE " {}\n";
- }
-
- # Methods
- foreach my $key (keys %methods)
- {
- print ECFILE $methods{$key}{method};
- }
-
- # Stick the execute method at the end of the other methods.
- print ECFILE " void execute(void)\n";
- print ECFILE " {\n";
- print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n" if ($arg_empty_ffdc eq undef);
- print ECFILE " fapi2::logError(iv_rc, iv_sev);\n" if ($arg_empty_ffdc eq undef);
- print ECFILE " }\n\n";
-
- # Instance variables
- if ($arg_empty_ffdc eq undef)
- {
- print ECFILE " private:\n ";
- foreach my $key (keys %methods)
- {
- print ECFILE $methods{$key}{member};
- }
-
- print ECFILE "fapi2::ReturnCode& iv_rc;\n";
- print ECFILE " fapi2::errlSeverity_t iv_sev;\n";
- }
-
- print ECFILE "};\n\n\n\n";
- }
-
- #--------------------------------------------------------------------------
- # For each registerFfdc.
- #--------------------------------------------------------------------------
- foreach my $registerFfdc (@{$errors->{registerFfdc}})
- {
- #----------------------------------------------------------------------
- # Check that expected fields are present
- #----------------------------------------------------------------------
- if (! exists $registerFfdc->{id}[0])
- {
- print ("parseErrorInfo.pl ERROR. id missing from registerFfdc\n");
- exit(1);
- }
-
- if (scalar @{$registerFfdc->{id}} > 1)
- {
- print ("parseErrorInfo.pl ERROR. multiple ids in registerFfdc\n");
- exit(1);
- }
-
- #----------------------------------------------------------------------
- # Set the FFDC ID value in a global hash
- #----------------------------------------------------------------------
- setFfdcIdValue($registerFfdc->{id}[0]);
-
- #----------------------------------------------------------------------
- # Generate code to capture the registers in collect_reg_ffdc.C
- #----------------------------------------------------------------------
- print CRFILE " case $registerFfdc->{id}[0]:\n";
-
-=begin NEED_P9_REGISTERS
- # Look for CFAM Register addresses
- foreach my $cfamRegister (@{$registerFfdc->{cfamRegister}})
- {
- print CRFILE " l_cfamAddresses.push_back($cfamRegister);\n";
- print CRFILE " l_ffdcSize += sizeof(l_cfamData);\n";
- }
-
- # Look for SCOM Register addresses
- foreach my $scomRegister (@{$registerFfdc->{scomRegister}})
- {
- print CRFILE " l_scomAddresses.push_back($scomRegister);\n";
- print CRFILE " l_ffdcSize += sizeof(l_scomData);\n";
- }
-=cut NEED_P9_REGISTERS
-
- print CRFILE " break;\n";
- }
-
-}
-
-#------------------------------------------------------------------------------
-# Print end of file information to collect_reg_ffdc.C
-#------------------------------------------------------------------------------
-print CRFILE " default:\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: Invalid FFDC ID 0x%x\", ";
-print CRFILE "i_ffdcId);\n";
-print CRFILE " return;\n";
-print CRFILE " }\n\n";
-
-=begin NEED_P9_REGISTERS
-
-print CRFILE " uint8_t * l_pBuf = NULL;\n";
-print CRFILE " uint8_t * l_pData = NULL;\n";
-print CRFILE " std::vector<fapi::Target> l_targets;\n";
-print CRFILE " uint32_t l_chipletPos32 = 0;\n";
-#---------------------------------------------------------------------------------------------------------
-# Populate chiplet vectors (if required by register collection method) and adjust buffer sizes accordingly
-#---------------------------------------------------------------------------------------------------------
-print CRFILE " if (fapi2::TARGET_TYPE_NONE != i_child)\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetChildChiplets(i_target, i_child, l_targets, TARGET_STATE_FUNCTIONAL);\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: Error: fapiGetChildChiplets: failed to get chiplets.\");\n";
-print CRFILE " return;\n";
-print CRFILE " }\n";
-print CRFILE " if (l_targets.empty())\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_INF(\"collect_reg_ffdc.C: Error: No functional chiplets found. \");\n";
-print CRFILE " return;\n";
-print CRFILE " }\n";
-print CRFILE " l_ffdcSize += sizeof(l_chipletPos32);\n";
-print CRFILE " l_ffdcSize *= l_targets.size();\n";
-print CRFILE " l_pBuf = new uint8_t[l_ffdcSize];\n";
-print CRFILE " l_pData = l_pBuf;\n";
-print CRFILE " }\n";
-print CRFILE " else if (fapi2::TARGET_TYPE_NONE != i_presChild)\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetChildChiplets(i_target, i_presChild, l_targets, TARGET_STATE_PRESENT);\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: Error: fapiGetChildChiplets: failed to get chiplets.\");\n";
-print CRFILE " return;\n";
-print CRFILE " }\n";
-print CRFILE " if (l_targets.empty())\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_INF(\"collect_reg_ffdc.C: Error: No functional chiplets found. \");\n";
-print CRFILE " return;\n";
-print CRFILE " }\n";
-print CRFILE " l_ffdcSize += sizeof(l_chipletPos32);\n";
-print CRFILE " l_ffdcSize *= l_targets.size();\n";
-print CRFILE " l_pBuf = new uint8_t[l_ffdcSize];\n";
-print CRFILE " l_pData = l_pBuf;\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_ffdcSize += sizeof(l_chipletPos32);\n";
-print CRFILE " l_pBuf = new uint8_t[l_ffdcSize];\n";
-print CRFILE " l_pData = l_pBuf;\n";
-print CRFILE " l_targets.push_back(i_target);\n";
-print CRFILE " }\n\n";
-#---------------------------------------------------------------------------------------------------------
-# Obtain target position and insert as the first word in the buffer
-#---------------------------------------------------------------------------------------------------------
-print CRFILE " bool l_targIsChiplet = i_target.isChiplet();\n\n";
-print CRFILE " for (std::vector<fapi::Target>::const_iterator targetIter = l_targets.begin();\n";
-print CRFILE " targetIter != l_targets.end(); ++targetIter)\n";
-print CRFILE " {\n";
-print CRFILE " if ((fapi2::TARGET_TYPE_NONE != i_child) ||\n";
-print CRFILE " (fapi2::TARGET_TYPE_NONE != i_presChild) ||\n";
-print CRFILE " (true == l_targIsChiplet))\n";
-print CRFILE " {\n";
-print CRFILE " uint8_t l_chipletPos = 0;\n";
-print CRFILE " l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &(*targetIter), l_chipletPos);\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: Error getting chiplet position\");\n";
-print CRFILE " l_chipletPos = 0xFF;\n";
-print CRFILE " }\n";
- #-------------------------------------------------------------------------
- # We print the target's position in the error log whether the target is a
- # chip or chiplet, so we need to store the chiplet position in a uint32_t
- # to have consitency in the buffer as ATTR_POS below returns a uint32_t
- #-------------------------------------------------------------------------
-print CRFILE " l_chipletPos32 = l_chipletPos;\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = FAPI_ATTR_GET(ATTR_POS, &(*targetIter), l_chipletPos32);\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: Error getting chip position\");\n";
-print CRFILE " l_chipletPos32 = 0xFFFFFFFF;\n";
-print CRFILE " }\n";
-print CRFILE " }\n";
-print CRFILE " *(reinterpret_cast<uint32_t *>(l_pData)) = l_chipletPos32;\n";
-print CRFILE " l_pData += sizeof(l_chipletPos32);\n";
-#---------------------------------------------------------------------------------------------------------
-# Instert cfam data (if any) related to this chip / chiplet into the buffer
-# If collecting FFDC based on present children, adjust the register address by the appropriate offset
-#---------------------------------------------------------------------------------------------------------
-print CRFILE " for (std::vector<uint32_t>::const_iterator cfamIter = l_cfamAddresses.begin();\n";
-print CRFILE " cfamIter != l_cfamAddresses.end(); ++cfamIter)\n";
-print CRFILE " {\n";
-print CRFILE " if (fapi2::TARGET_TYPE_NONE != i_presChild)\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetCfamRegister(i_target, (*cfamIter + (l_chipletPos32 * i_childOffsetMult)), l_buf);\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetCfamRegister(*targetIter, *cfamIter, l_buf);\n";
-print CRFILE " }\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: CFAM error for 0x%x\",";
-print CRFILE "*cfamIter);\n";
-print CRFILE " l_cfamData = 0xbaddbadd;\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_cfamData = l_buf.getWord(0);\n";
-print CRFILE " }\n";
-print CRFILE " *(reinterpret_cast<uint32_t *>(l_pData)) = l_cfamData;\n";
-print CRFILE " l_pData += sizeof(l_cfamData);\n";
-print CRFILE " }\n\n";
-#---------------------------------------------------------------------------------------------------------
-# Instert any scom data (if any) related to this chip / chiplet into the buffer
-# If collecting FFDC based on present children, adjust the register address by the appropriate offset
-#---------------------------------------------------------------------------------------------------------
-print CRFILE " for (std::vector<uint64_t>::const_iterator scomIter = l_scomAddresses.begin();\n";
-print CRFILE " scomIter != l_scomAddresses.end(); ++scomIter)\n";
-print CRFILE " {\n";
-print CRFILE " if (fapi2::TARGET_TYPE_NONE != i_presChild)\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetScom(i_target, (*scomIter + (l_chipletPos32 * i_childOffsetMult)), l_buf);\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_rc = fapiGetScom(*targetIter, *scomIter, l_buf);\n";
-print CRFILE " }\n";
-print CRFILE " if (l_rc)\n";
-print CRFILE " {\n";
-print CRFILE " FAPI_ERR(\"collect_reg_ffdc.C: SCOM error for 0x%llx\",";
-print CRFILE "*scomIter);\n";
-print CRFILE " l_scomData = 0xbaddbaddbaddbaddULL;\n";
-print CRFILE " }\n";
-print CRFILE " else\n";
-print CRFILE " {\n";
-print CRFILE " l_scomData = l_buf.getDoubleWord(0);\n";
-print CRFILE " }\n";
-print CRFILE " *(reinterpret_cast<uint64_t *>(l_pData)) = l_scomData;\n";
-print CRFILE " l_pData += sizeof(l_scomData);\n";
-print CRFILE " }\n";
-print CRFILE " }\n\n";
-print CRFILE " o_rc.addEIFfdc(i_ffdcId, l_pBuf, l_ffdcSize);\n";
-print CRFILE " delete [] l_pBuf;\n";
-=cut NEED_P9_REGISTERS
-
-print CRFILE "}\n";
-print CRFILE "}\n";
-
-
-#------------------------------------------------------------------------------
-# Print the fapiHwpReturnCodes.H file
-#------------------------------------------------------------------------------
-print RCFILE "// fapiHwpReturnCodes.H\n";
-print RCFILE "// This file is generated by perl script parseErrorInfo.pl\n\n";
-print RCFILE "#ifndef FAPI2_HWPRETURNCODES_H_\n";
-print RCFILE "#define FAPI2_HWPRETURNCODES_H_\n\n";
-print RCFILE "#ifndef __ASSEMBLER__\n";
-print RCFILE "namespace fapi2\n";
-print RCFILE "{\n\n";
-print RCFILE "/**\n";
-print RCFILE " * \@brief Enumeration of HWP return codes\n";
-print RCFILE " *\/\n";
-print RCFILE "enum HwpReturnCode\n";
-print RCFILE "{\n";
-foreach my $key (keys %errNameToValueHash)
-{
- print RCFILE " $key = 0x$errNameToValueHash{$key},\n";
-}
-print RCFILE "};\n\n";
-print RCFILE "}\n\n";
-print RCFILE "#else\n";
-foreach my $key (keys %errNameToValueHash)
-{
- print RCFILE " .set $key, 0x$errNameToValueHash{$key}\n";
-}
-print RCFILE "#endif\n";
-print RCFILE "#endif\n";
-
-#------------------------------------------------------------------------------
-# Print the HwpFfdcId enumeration to hwp_error_info.H
-#------------------------------------------------------------------------------
-print EIFILE "namespace fapi2\n";
-print EIFILE "{\n\n";
-print EIFILE "/**\n";
-print EIFILE " * \@brief Enumeration of FFDC identifiers\n";
-print EIFILE " *\/\n";
-print EIFILE "enum HwpFfdcId\n";
-print EIFILE "{\n";
-foreach my $key (keys %ffdcNameToValueHash)
-{
- print EIFILE " $key = 0x$ffdcNameToValueHash{$key},\n";
-}
-print EIFILE "};\n\n";
-print EIFILE "}\n\n";
-
-#------------------------------------------------------------------------------
-# Print end of file information to hwp_error_info.H
-#------------------------------------------------------------------------------
-print EIFILE "\n\n#endif\n";
-
-#------------------------------------------------------------------------------
-# Print end of file information to hwp_ffdc_classes.H
-#------------------------------------------------------------------------------
-print ECFILE "\n};\n"; # close the namespace
-print ECFILE "\n\n#endif\n";
-
-#------------------------------------------------------------------------------
-# Print end of file information to set_sbe_error.H
-#------------------------------------------------------------------------------
-print SBFILE " default:\\\n";
-print SBFILE " FAPI_SET_HWP_ERROR(RC, RC_SBE_UNKNOWN_ERROR);\\\n";
-print SBFILE " break;\\\n";
-print SBFILE "}\\\n";
-print SBFILE "}\n\n";
-print SBFILE "#endif\n";
-
-#------------------------------------------------------------------------------
-# Close output files
-#------------------------------------------------------------------------------
-close(RCFILE);
-close(EIFILE);
-close(ECFILE);
-close(CRFILE);
-close(SBFILE);
diff --git a/hwpf/fapi/xml/buffer_errors.xml b/hwpf/fapi/xml/buffer_errors.xml
deleted file mode 100755
index b03b77e4..00000000
--- a/hwpf/fapi/xml/buffer_errors.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!-- IBM_PROLOG_BEGIN_TAG -->
-<!-- This is an automatically generated prolog. -->
-<!-- -->
-<!-- $Source: src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml $ -->
-<!-- -->
-<!-- OpenPOWER HostBoot Project -->
-<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2012,2015 -->
-<!-- [+] International Business Machines Corp. -->
-<!-- -->
-<!-- -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
-<!-- you may not use this file except in compliance with the License. -->
-<!-- You may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. See the License for the specific language governing -->
-<!-- permissions and limitations under the License. -->
-<!-- -->
-<!-- IBM_PROLOG_END_TAG -->
-
-<hwpErrors>
-
- <hwpError>
- <rc>RC_FAPI2_BUFFER</rc>
- <description>
- fapi2 error from a buffer operation
- </description>
- <buffer>BUFFER</buffer>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
-
-</hwpErrors>
diff --git a/hwpf/plat/include/array.H b/hwpf/include/array.H
index 1b976f2b..1b976f2b 100644
--- a/hwpf/plat/include/array.H
+++ b/hwpf/include/array.H
diff --git a/hwpf/plat/include/buffer_traits.H b/hwpf/include/buffer_traits.H
index 7cab81ff..7cab81ff 100644
--- a/hwpf/plat/include/buffer_traits.H
+++ b/hwpf/include/buffer_traits.H
diff --git a/hwpf/include/error_info_defs.H b/hwpf/include/error_info_defs.H
new file mode 100644
index 00000000..d7f418a2
--- /dev/null
+++ b/hwpf/include/error_info_defs.H
@@ -0,0 +1,252 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+///
+/// @file error_info_defs.H
+/// @brief Defines to support the Error Information class
+///
+
+#ifndef FAPI2_ERRORINFO_DEFS_H_
+#define FAPI2_ERRORINFO_DEFS_H_
+
+#include <stdint.h>
+#include <target.H>
+
+#ifndef __PPE__
+#include <variable_buffer.H>
+#include <iostream>
+#endif // __PPE__
+
+namespace fapi2
+{
+ ///
+ /// @brief Type to hold the ffdc element in the ffdc class
+ /// Needed so that the size can be squirled away before the
+ /// macro is called.
+ ///
+ class ffdc_t
+ {
+ public:
+ ffdc_t(void)
+ {}
+
+ operator const void*() const { return iv_value.first; }
+ operator uint8_t() const
+ { return *(reinterpret_cast<const uint8_t*>(iv_value.first)); }
+
+ int16_t size(void) const { return iv_value.second; }
+ int16_t& size(void) { return iv_value.second; }
+
+ const void* ptr(void) const { return iv_value.first; }
+ const void*& ptr(void) { return iv_value.first; }
+
+ private:
+ std::pair<const void*, int16_t> iv_value;
+ };
+
+ ///
+ /// @brief Enumeration of ErrorInfo FFDC sizes that are used to indicate a
+ /// special type that cannot simply be memcopied
+ enum ErrorInfoFfdcSize
+ {
+ EI_FFDC_SIZE_BUF = 0xffff, // fapi2::buffer<T>
+ EI_FFDC_SIZE_TARGET = 0xfffe, // fapi2::Target
+ EI_FFDC_SIZE_VBUF = 0xfffd, // fapi2::variable_buffer
+ EI_FFDC_MAX_SIZE = 0x1000, // Limit regular FFDC capture to 4kb
+ };
+
+ ///
+ /// @brief Enumeration of error log severity.
+ ///
+ enum errlSeverity_t
+ {
+ FAPI2_ERRL_SEV_UNDEFINED = 0x00, /// Used internally by ffdc mechanism
+ FAPI2_ERRL_SEV_RECOVERED = 0x10, /// Not seen by customer
+ FAPI2_ERRL_SEV_PREDICTIVE = 0x20, /// Error recovered but customer will see
+ FAPI2_ERRL_SEV_UNRECOVERABLE = 0x40 /// Unrecoverable, general
+ };
+
+ ///
+ /// @brief Enumeration of ErrorInfo types
+ ///
+ enum ErrorInfoType
+ {
+ EI_TYPE_FFDC = 0,
+ EI_TYPE_HW_CALLOUT = 1,
+ EI_TYPE_PROCEDURE_CALLOUT = 2,
+ EI_TYPE_BUS_CALLOUT = 3,
+ EI_TYPE_CDG = 4, // Target Callout/Deconfig/GARD
+ EI_TYPE_CHILDREN_CDG = 5, // Children Callout/Deconfig/GARD
+ EI_TYPE_COLLECT_TRACE = 6,
+ EI_LAST_TYPE = EI_TYPE_COLLECT_TRACE + 1,
+ };
+
+ ///
+ /// @enum HwCallout
+ ///
+ /// This enumeration defines the possible Hardware Callouts that are not
+ /// represented by fapi2::Targets
+ ///
+ /// Note that platform code may depend on the enum values starting at 0 and
+ /// incrementing in order to efficiently convert to a platform callout value
+ /// so do not reorder without consulting all platforms
+ ///
+ namespace HwCallouts
+ {
+ enum HwCallout
+ {
+ // Where indicated, a HW Callout in FAPI Error XML must include a
+ // reference target that is used to identify the HW. e.g. for
+ // TOD_CLOCK, the proc chip that the clock is attached to must be
+ // specified
+ TOD_CLOCK = 0, // Include proc-chip ref (or child chiplet)
+ MEM_REF_CLOCK = 1, // Include membuf-chip ref (or child chiplet)
+ PROC_REF_CLOCK = 2, // Include proc-chip ref (or child chiplet)
+ PCI_REF_CLOCK = 3, // Include proc-chip ref (or child chiplet)
+ FLASH_CONTROLLER_PART = 4,
+ PNOR_PART = 5,
+ SBE_SEEPROM_PART = 6,
+ VPD_PART = 7,
+ LPC_SLAVE_PART = 8,
+ GPIO_EXPANDER_PART = 9,
+ SPIVID_SLAVE_PART = 10,
+ };
+ }
+
+ ///
+ /// @enum ProcedureCallout
+ ///
+ /// This enumeration defines the possible Procedure Callouts
+ /// These instruct the customer/customer-engineer what to do
+ ///
+ /// Note that platform code may depend on the enum values starting at 0 and
+ /// incrementing in order to efficiently convert to a platform callout value
+ /// so do not reorder without consulting all platforms
+ ///
+ namespace ProcedureCallouts
+ {
+ enum ProcedureCallout
+ {
+ CODE = 0, // Code problem
+ LVL_SUPPORT = 1, // Call next level of support
+ MEMORY_PLUGGING_ERROR = 2, // DIMM Plugging error
+ BUS_CALLOUT = 3, // Bus Called Out
+ };
+ }
+
+ ///
+ /// @enum CalloutPriority
+ ///
+ /// This enumeration defines the possible Procedure and Target callout priorities
+ ///
+ /// Note that platform code may depend on the enum values starting at 0 and
+ /// incrementing in order to efficiently convert to a platform priority value
+ /// so do not reorder without consulting all platforms
+ ///
+ namespace CalloutPriorities
+ {
+ enum CalloutPriority
+ {
+ LOW = 0,
+ MEDIUM = 1,
+ HIGH = 2,
+ };
+ }
+
+ ///
+ /// @enum Collect Trace
+ ///
+ /// This enumeration defines the possible firmware traces to collect
+ ///
+ namespace CollectTraces
+ {
+ const uint32_t TRACE_SIZE = 256; // limit collected trace size
+ enum CollectTrace
+ {
+ FSI = 1,
+ SCOM = 2,
+ SCAN = 3,
+ MBOX = 4,
+ };
+ }
+
+ ///
+ /// @brief Get FFDC Size
+ ///
+ /// This is called by the FAPI_SET_HWP_ERROR macro to find out the size of
+ /// FFDC data. If the data is of a special type that is handled differently
+ /// than types that are simply memcopied then it is handled by a template
+ /// specialization.
+ /// If this function template is instantiated with a pointer, the compile
+ /// will fail.
+ ///
+ /// @return uint16_t. Size of the FFDC data
+ ///
+ template<typename T>
+ inline uint16_t getErrorInfoFfdcSize(const T &)
+ {
+ static_assert(sizeof(T) <= EI_FFDC_MAX_SIZE,
+ "FFDC too large to capture");
+ return sizeof(T);
+ }
+
+ ///
+ /// @brief Compile error if caller tries to get the FFDC size of a pointer
+ ///
+ template<typename T>
+ inline uint16_t getErrorInfoFfdcSize(const T*)
+ {
+ static_assert(std::is_pointer<T>::value,
+ "pointer passed to getErrorInfoFfdcSize");
+ return 0;
+ }
+
+ ///
+ /// @brief Get FFDC Size specialization for fapi2::Target
+ ///
+ template<fapi2::TargetType T>
+ inline uint16_t getErrorInfoFfdcSize(const fapi2::Target<T>&)
+ {
+ return EI_FFDC_SIZE_TARGET;
+ }
+
+#ifndef __PPE__
+ ///
+ /// @brief Get FFDC Size specialization for variable buffers
+ ///
+ template<>
+ inline uint16_t getErrorInfoFfdcSize(const fapi2::variable_buffer& i_thing)
+ {
+ // Limit a variable buffer to 4kb bytes, and we can memcpy the storage.
+ return std::min(static_cast<uint32_t>(EI_FFDC_MAX_SIZE),
+ i_thing.getLength<uint8_t>());
+ }
+#endif // __PPE__
+
+};
+
+
+
+#endif // FAPI2_ERRORINFO_DEFS_H_
diff --git a/hwpf/include/fapi2.H b/hwpf/include/fapi2.H
new file mode 100644
index 00000000..eeef6b4c
--- /dev/null
+++ b/hwpf/include/fapi2.H
@@ -0,0 +1,72 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: hwpf/fapi2/include/fapi2.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2015 */
+/* [+] 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 fapi2.H
+/// @brief top level header for fapi2
+///
+
+#ifndef __FAPI2_TOP_LEVEL__
+#define __FAPI2_TOP_LEVEL__
+
+// Define which platforms will not have FAPI Return Codes
+#undef __noRC__
+#if defined (__CME__) || defined (__SGPE__) || defined (__PGPE__)
+#define __noRC__
+#endif
+
+// Determine if running on a PPE platform
+#ifndef __PPE__
+#if defined (__SBE__) || defined (__CME__) || defined (__SGPE__) || defined (__PGPE__)
+#define __PPE__
+#endif
+#endif
+
+#include <plat_trace.H>
+#include <target.H>
+#include <return_code.H>
+#include <buffer.H>
+#include <hw_access.H>
+#include <utils.H>
+
+// In turn includes the needed generated headers (hwp_ffd_classes, etc.)
+#include <error_scope.H>
+#include <set_sbe_error.H> // Generated file
+#include <plat_attributes.H>
+#include <plat_target_utils.H>
+
+// Not supported by PPE
+#ifndef __PPE__
+#include <mvpdAccess.H>
+#endif
+
+#include <fapi2_hwp_executor.H>
+
+// Block of headers not currently in fapi2
+#ifdef FAPI2_MISSING_HEADERS
+ #include <mbvpdAccess.H>
+#endif
+
+
+#endif // __FAPI2_TOP_LEVEL__
+
+
+
+
+
+
diff --git a/hwpf/include/fapi2AttrEnumInfo.csv b/hwpf/include/fapi2AttrEnumInfo.csv
new file mode 100644
index 00000000..2d740720
--- /dev/null
+++ b/hwpf/include/fapi2AttrEnumInfo.csv
@@ -0,0 +1,15 @@
+# fapiAttrEnumInfo.csv
+# This file is generated by perl script fapiParseAttributeInfo.pl
+# It lists information about FAPI attribute enumeratorss and is
+# used to process FAPI Attribute text files (overrides/syncs)
+# Format:
+# <ENUM-STR>,<ENUM-VAL>
+ATTR_SCRATCH_UINT64_2_VAL_A,0
+ATTR_SCRATCH_UINT64_2_VAL_B,5
+ATTR_SCRATCH_UINT64_2_VAL_C,0xffffffffffffffff
+ATTR_SCRATCH_INT64_2_VAL_A,0
+ATTR_SCRATCH_INT64_2_VAL_B,5
+ATTR_SCRATCH_INT64_2_VAL_C,0xffffffffffffffff
+ATTR_SYSTEM_IPL_PHASE_HB_IPL,0x1
+ATTR_SYSTEM_IPL_PHASE_HB_RUNTIME,0x2
+ATTR_SYSTEM_IPL_PHASE_CACHE_CONTAINED,0x4
diff --git a/hwpf/include/fapi2AttrInfo.csv b/hwpf/include/fapi2AttrInfo.csv
new file mode 100644
index 00000000..0ebe9e41
--- /dev/null
+++ b/hwpf/include/fapi2AttrInfo.csv
@@ -0,0 +1,87 @@
+# fapiAttrInfo.csv
+# This file is generated by perl script fapiParseAttributeInfo.pl
+# It lists information about FAPI attributes and is used to
+# process FAPI Attribute text files (overrides/syncs)
+# Format:
+# <FAPI-ATTR-ID-STR>,<LAYER-ATTR-ID-STR>,<ATTR-ID-VAL>,<ATTR-TYPE>
+# Note that for the AttributeTanks at the FAPI layer, the
+# FAPI-ATTR-ID-STR and LAYER-ATTR-ID-STR will be identical
+ATTR_SCRATCH_UINT8_1,ATTR_SCRATCH_UINT8_1,0xd16a035,u8
+ATTR_SCRATCH_UINT8_2,ATTR_SCRATCH_UINT8_2,0xd53bc45,u8
+ATTR_SCRATCH_UINT32_1,ATTR_SCRATCH_UINT32_1,0x6e35711,u32
+ATTR_SCRATCH_UINT32_2,ATTR_SCRATCH_UINT32_2,0xb6b04cf,u32
+ATTR_SCRATCH_UINT64_1,ATTR_SCRATCH_UINT64_1,0x97c0c12,u64
+ATTR_SCRATCH_UINT64_2,ATTR_SCRATCH_UINT64_2,0xa09fac0,u64
+ATTR_SCRATCH_INT8_1,ATTR_SCRATCH_INT8_1,0x8d69f35,8
+ATTR_SCRATCH_INT8_2,ATTR_SCRATCH_INT8_2,0xd0a271b,8
+ATTR_SCRATCH_INT32_1,ATTR_SCRATCH_INT32_1,0xb5d67e7,32
+ATTR_SCRATCH_INT32_2,ATTR_SCRATCH_INT32_2,0xedc4c34,32
+ATTR_SCRATCH_INT64_1,ATTR_SCRATCH_INT64_1,0x439b62e,64
+ATTR_SCRATCH_INT64_2,ATTR_SCRATCH_INT64_2,0x1201173,64
+ATTR_SCRATCH_UINT32_ARRAY,ATTR_SCRATCH_UINT32_ARRAY,0xc4ffba2,u32[64]
+ATTR_SCRATCH_UINT32_PERV_ARRAY,ATTR_SCRATCH_UINT32_PERV_ARRAY,0xb53ac5c,u32[64]
+ATTR_REPR_RING,ATTR_REPR_RING,0xb4a5f78,u32
+ATTR_TIME_RING,ATTR_TIME_RING,0x3b26e38,u32
+ATTR_GPTR_RING,ATTR_GPTR_RING,0xe41805b,u32
+ATTR_PLL_RING,ATTR_PLL_RING,0x2548674,u32
+ATTR_CORE_REPR_RING,ATTR_CORE_REPR_RING,0x938b8fc,u32
+ATTR_CORE_TIME_RING,ATTR_CORE_TIME_RING,0xd3f938f,u32
+ATTR_CORE_GPTR_RING,ATTR_CORE_GPTR_RING,0x94e6329,u32
+ATTR_L2_REPR_RING,ATTR_L2_REPR_RING,0x9db7d8a,u32
+ATTR_L2_TIME_RING,ATTR_L2_TIME_RING,0x5999526,u32
+ATTR_L2_GPTR_RING,ATTR_L2_GPTR_RING,0x780f3d2,u32
+ATTR_L3_REPR_RING,ATTR_L3_REPR_RING,0x1364905,u32
+ATTR_L3_TIME_RING,ATTR_L3_TIME_RING,0x514ea87,u32
+ATTR_L3_GPTR_RING,ATTR_L3_GPTR_RING,0x2179cb4,u32
+ATTR_DPLL_RING,ATTR_DPLL_RING,0xad1e658,u32
+ATTR_PG_FSI,ATTR_PG_FSI,0xa484728,u8
+ATTR_PG_PRV,ATTR_PG_PRV,0xf1e3768,u8
+ATTR_PG_N0,ATTR_PG_N0,0x6e7e43d,u8
+ATTR_PG_N1,ATTR_PG_N1,0x916d851,u8
+ATTR_PG_N2,ATTR_PG_N2,0x311b213,u8
+ATTR_PG_N3,ATTR_PG_N3,0x196b4d6,u8
+ATTR_PG_XB,ATTR_PG_XB,0xbdda26f,u8
+ATTR_PG_MC01,ATTR_PG_MC01,0xc307a5c,u8
+ATTR_PG_MC23,ATTR_PG_MC23,0xe2ae686,u8
+ATTR_PG_OB0,ATTR_PG_OB0,0x4b73198,u8
+ATTR_PG_OB1,ATTR_PG_OB1,0x51edd9c,u8
+ATTR_PG_OB2,ATTR_PG_OB2,0x8588771,u8
+ATTR_PG_OB3,ATTR_PG_OB3,0x5f2d7ec,u8
+ATTR_PG_PCI0,ATTR_PG_PCI0,0x16db49c,u8
+ATTR_PG_PCI1,ATTR_PG_PCI1,0x3056952,u8
+ATTR_PG_PCI2,ATTR_PG_PCI2,0x122b6d7,u8
+ATTR_PG_EQ0,ATTR_PG_EQ0,0x878b5c8,u8
+ATTR_PG_EQ1,ATTR_PG_EQ1,0x03c3069,u8
+ATTR_PG_EQ2,ATTR_PG_EQ2,0xc013357,u8
+ATTR_PG_EQ3,ATTR_PG_EQ3,0xf230319,u8
+ATTR_PG_EQ4,ATTR_PG_EQ4,0xbbac8d0,u8
+ATTR_PG_EQ5,ATTR_PG_EQ5,0x2dc5723,u8
+ATTR_PG_EC00,ATTR_PG_EC00,0x901df3a,u8
+ATTR_PG_EC01,ATTR_PG_EC01,0x47d022a,u8
+ATTR_PG_EC02,ATTR_PG_EC02,0x08de5af,u8
+ATTR_PG_EC03,ATTR_PG_EC03,0xb7fc8f5,u8
+ATTR_PG_EC04,ATTR_PG_EC04,0xb5fcba5,u8
+ATTR_PG_EC05,ATTR_PG_EC05,0x83a3441,u8
+ATTR_PG_EC06,ATTR_PG_EC06,0x1b6bebf,u8
+ATTR_PG_EC07,ATTR_PG_EC07,0x1eb958b,u8
+ATTR_PG_EC08,ATTR_PG_EC08,0x09e32c8,u8
+ATTR_PG_EC09,ATTR_PG_EC09,0x6775c2d,u8
+ATTR_PG_EC10,ATTR_PG_EC10,0xddbba81,u8
+ATTR_PG_EC11,ATTR_PG_EC11,0xfc76788,u8
+ATTR_PG_EC12,ATTR_PG_EC12,0x3f34e1f,u8
+ATTR_PG_EC13,ATTR_PG_EC13,0x9ff5ec8,u8
+ATTR_PG_EC14,ATTR_PG_EC14,0x0aa4ad3,u8
+ATTR_PG_EC15,ATTR_PG_EC15,0x30379c7,u8
+ATTR_PG_EC16,ATTR_PG_EC16,0x0f4b161,u8
+ATTR_PG_EC17,ATTR_PG_EC17,0xcf99c88,u8
+ATTR_PG_EC18,ATTR_PG_EC18,0x9867191,u8
+ATTR_PG_EC19,ATTR_PG_EC19,0xeb29d56,u8
+ATTR_PG_EC20,ATTR_PG_EC20,0xeb32b14,u8
+ATTR_PG_EC21,ATTR_PG_EC21,0x31c5be4,u8
+ATTR_PG_EC22,ATTR_PG_EC22,0x0563eb4,u8
+ATTR_PG_EC23,ATTR_PG_EC23,0x8477c54,u8
+ATTR_CHIP_UNIT_POS,ATTR_CHIP_UNIT_POS,0x07f067a,u8
+ATTR_FABRIC_SYSTEM_ID,ATTR_FABRIC_SYSTEM_ID,0x6856732,u8
+ATTR_SYSTEM_IPL_PHASE,ATTR_SYSTEM_IPL_PHASE,0xf9c1ac6,u8
+ATTR_BACKUP_SEEPROM_SELECT,ATTR_BACKUP_SEEPROM_SELECT,0x4ca9b40,u8
+ATTR_MC_SYNC_MODE,ATTR_MC_SYNC_MODE,0x0472be6,u8
diff --git a/hwpf/include/fapi2AttributeIds.H b/hwpf/include/fapi2AttributeIds.H
new file mode 100644
index 00000000..4a36c506
--- /dev/null
+++ b/hwpf/include/fapi2AttributeIds.H
@@ -0,0 +1,746 @@
+// fapi2AttributeIds.H
+// This file is generated by perl script fapiParseAttributeInfo.pl
+
+#ifndef FAPI2ATTRIBUTEIDS_H_
+#define FAPI2ATTRIBUTEIDS_H_
+
+#ifndef __ASSEMBLER__
+
+#include <target.H>
+#include <target_types.H>
+
+namespace fapi2
+{
+
+/**
+ * @brief Enumeration of attribute IDs
+ */
+enum AttributeId
+{
+ ATTR_SCRATCH_UINT8_1 = 0xd16a035,
+ ATTR_SCRATCH_UINT8_2 = 0xd53bc45,
+ ATTR_SCRATCH_UINT32_1 = 0x6e35711,
+ ATTR_SCRATCH_UINT32_2 = 0xb6b04cf,
+ ATTR_SCRATCH_UINT64_1 = 0x97c0c12,
+ ATTR_SCRATCH_UINT64_2 = 0xa09fac0,
+ ATTR_SCRATCH_INT8_1 = 0x8d69f35,
+ ATTR_SCRATCH_INT8_2 = 0xd0a271b,
+ ATTR_SCRATCH_INT32_1 = 0xb5d67e7,
+ ATTR_SCRATCH_INT32_2 = 0xedc4c34,
+ ATTR_SCRATCH_INT64_1 = 0x439b62e,
+ ATTR_SCRATCH_INT64_2 = 0x1201173,
+ ATTR_SCRATCH_UINT32_ARRAY = 0xc4ffba2,
+ ATTR_SCRATCH_UINT32_PERV_ARRAY = 0xb53ac5c,
+ ATTR_REPR_RING = 0xb4a5f78,
+ ATTR_TIME_RING = 0x3b26e38,
+ ATTR_GPTR_RING = 0xe41805b,
+ ATTR_PLL_RING = 0x2548674,
+ ATTR_CORE_REPR_RING = 0x938b8fc,
+ ATTR_CORE_TIME_RING = 0xd3f938f,
+ ATTR_CORE_GPTR_RING = 0x94e6329,
+ ATTR_L2_REPR_RING = 0x9db7d8a,
+ ATTR_L2_TIME_RING = 0x5999526,
+ ATTR_L2_GPTR_RING = 0x780f3d2,
+ ATTR_L3_REPR_RING = 0x1364905,
+ ATTR_L3_TIME_RING = 0x514ea87,
+ ATTR_L3_GPTR_RING = 0x2179cb4,
+ ATTR_DPLL_RING = 0xad1e658,
+ ATTR_PG_FSI = 0xa484728,
+ ATTR_PG_PRV = 0xf1e3768,
+ ATTR_PG_N0 = 0x6e7e43d,
+ ATTR_PG_N1 = 0x916d851,
+ ATTR_PG_N2 = 0x311b213,
+ ATTR_PG_N3 = 0x196b4d6,
+ ATTR_PG_XB = 0xbdda26f,
+ ATTR_PG_MC01 = 0xc307a5c,
+ ATTR_PG_MC23 = 0xe2ae686,
+ ATTR_PG_OB0 = 0x4b73198,
+ ATTR_PG_OB1 = 0x51edd9c,
+ ATTR_PG_OB2 = 0x8588771,
+ ATTR_PG_OB3 = 0x5f2d7ec,
+ ATTR_PG_PCI0 = 0x16db49c,
+ ATTR_PG_PCI1 = 0x3056952,
+ ATTR_PG_PCI2 = 0x122b6d7,
+ ATTR_PG_EQ0 = 0x878b5c8,
+ ATTR_PG_EQ1 = 0x03c3069,
+ ATTR_PG_EQ2 = 0xc013357,
+ ATTR_PG_EQ3 = 0xf230319,
+ ATTR_PG_EQ4 = 0xbbac8d0,
+ ATTR_PG_EQ5 = 0x2dc5723,
+ ATTR_PG_EC00 = 0x901df3a,
+ ATTR_PG_EC01 = 0x47d022a,
+ ATTR_PG_EC02 = 0x08de5af,
+ ATTR_PG_EC03 = 0xb7fc8f5,
+ ATTR_PG_EC04 = 0xb5fcba5,
+ ATTR_PG_EC05 = 0x83a3441,
+ ATTR_PG_EC06 = 0x1b6bebf,
+ ATTR_PG_EC07 = 0x1eb958b,
+ ATTR_PG_EC08 = 0x09e32c8,
+ ATTR_PG_EC09 = 0x6775c2d,
+ ATTR_PG_EC10 = 0xddbba81,
+ ATTR_PG_EC11 = 0xfc76788,
+ ATTR_PG_EC12 = 0x3f34e1f,
+ ATTR_PG_EC13 = 0x9ff5ec8,
+ ATTR_PG_EC14 = 0x0aa4ad3,
+ ATTR_PG_EC15 = 0x30379c7,
+ ATTR_PG_EC16 = 0x0f4b161,
+ ATTR_PG_EC17 = 0xcf99c88,
+ ATTR_PG_EC18 = 0x9867191,
+ ATTR_PG_EC19 = 0xeb29d56,
+ ATTR_PG_EC20 = 0xeb32b14,
+ ATTR_PG_EC21 = 0x31c5be4,
+ ATTR_PG_EC22 = 0x0563eb4,
+ ATTR_PG_EC23 = 0x8477c54,
+ ATTR_CHIP_UNIT_POS = 0x07f067a,
+ ATTR_FABRIC_SYSTEM_ID = 0x6856732,
+ ATTR_SYSTEM_IPL_PHASE = 0xf9c1ac6,
+ ATTR_BACKUP_SEEPROM_SELECT = 0x4ca9b40,
+ ATTR_MC_SYNC_MODE = 0x0472be6,
+};
+
+/**
+ * @brief Attribute Information
+ */
+/* ATTR_SCRATCH_UINT8_1 */
+typedef uint8_t ATTR_SCRATCH_UINT8_1_Type;
+const bool ATTR_SCRATCH_UINT8_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT8_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT8_1_PlatInit = true;
+const bool ATTR_SCRATCH_UINT8_1_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT8_2 */
+typedef uint8_t ATTR_SCRATCH_UINT8_2_Type;
+const bool ATTR_SCRATCH_UINT8_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT8_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT8_2_PlatInit = true;
+const bool ATTR_SCRATCH_UINT8_2_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT32_1 */
+typedef uint32_t ATTR_SCRATCH_UINT32_1_Type;
+const bool ATTR_SCRATCH_UINT32_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT32_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT32_1_PlatInit = true;
+const bool ATTR_SCRATCH_UINT32_1_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT32_2 */
+typedef uint32_t ATTR_SCRATCH_UINT32_2_Type;
+const bool ATTR_SCRATCH_UINT32_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT32_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT32_2_PlatInit = true;
+const bool ATTR_SCRATCH_UINT32_2_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT64_1 */
+typedef uint64_t ATTR_SCRATCH_UINT64_1_Type;
+const bool ATTR_SCRATCH_UINT64_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT64_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT64_1_PlatInit = true;
+const bool ATTR_SCRATCH_UINT64_1_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT64_2 */
+typedef uint64_t ATTR_SCRATCH_UINT64_2_Type;
+const bool ATTR_SCRATCH_UINT64_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT64_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT64_2_PlatInit = true;
+const bool ATTR_SCRATCH_UINT64_2_InitToZero = false;
+enum ATTR_SCRATCH_UINT64_2_Enum
+{
+ ENUM_ATTR_SCRATCH_UINT64_2_VAL_A = 0ULL,
+ ENUM_ATTR_SCRATCH_UINT64_2_VAL_B = 5ULL,
+ ENUM_ATTR_SCRATCH_UINT64_2_VAL_C = 0xffffffffffffffffULL,
+};
+#define ATTR_SCRATCH_UINT64_2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SCRATCH_INT8_1 */
+typedef int8_t ATTR_SCRATCH_INT8_1_Type;
+const bool ATTR_SCRATCH_INT8_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT8_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT8_1_PlatInit = true;
+const bool ATTR_SCRATCH_INT8_1_InitToZero = false;
+#define ATTR_SCRATCH_INT8_1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SCRATCH_INT8_2 */
+typedef int8_t ATTR_SCRATCH_INT8_2_Type;
+const bool ATTR_SCRATCH_INT8_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT8_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT8_2_PlatInit = true;
+const bool ATTR_SCRATCH_INT8_2_InitToZero = false;
+#define ATTR_SCRATCH_INT8_2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SCRATCH_INT32_1 */
+typedef int32_t ATTR_SCRATCH_INT32_1_Type;
+const bool ATTR_SCRATCH_INT32_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT32_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT32_1_PlatInit = true;
+const bool ATTR_SCRATCH_INT32_1_InitToZero = false;
+
+/* ATTR_SCRATCH_INT32_2 */
+typedef int32_t ATTR_SCRATCH_INT32_2_Type;
+const bool ATTR_SCRATCH_INT32_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT32_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT32_2_PlatInit = true;
+const bool ATTR_SCRATCH_INT32_2_InitToZero = false;
+
+/* ATTR_SCRATCH_INT64_1 */
+typedef int64_t ATTR_SCRATCH_INT64_1_Type;
+const bool ATTR_SCRATCH_INT64_1_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT64_1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT64_1_PlatInit = true;
+const bool ATTR_SCRATCH_INT64_1_InitToZero = false;
+#define ATTR_SCRATCH_INT64_1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SCRATCH_INT64_2 */
+typedef int64_t ATTR_SCRATCH_INT64_2_Type;
+const bool ATTR_SCRATCH_INT64_2_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_INT64_2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_INT64_2_PlatInit = true;
+const bool ATTR_SCRATCH_INT64_2_InitToZero = false;
+enum ATTR_SCRATCH_INT64_2_Enum
+{
+ ENUM_ATTR_SCRATCH_INT64_2_VAL_A = 0,
+ ENUM_ATTR_SCRATCH_INT64_2_VAL_B = 5,
+ ENUM_ATTR_SCRATCH_INT64_2_VAL_C = 0xffffffffffffffff,
+};
+#define ATTR_SCRATCH_INT64_2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SCRATCH_UINT32_ARRAY */
+typedef uint32_t ATTR_SCRATCH_UINT32_ARRAY_Type[64];
+const bool ATTR_SCRATCH_UINT32_ARRAY_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT32_ARRAY_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_SCRATCH_UINT32_ARRAY_PlatInit = true;
+const bool ATTR_SCRATCH_UINT32_ARRAY_InitToZero = false;
+
+/* ATTR_SCRATCH_UINT32_PERV_ARRAY */
+typedef uint32_t ATTR_SCRATCH_UINT32_PERV_ARRAY_Type[64];
+const bool ATTR_SCRATCH_UINT32_PERV_ARRAY_Privileged = false;
+const TargetTypes_t ATTR_SCRATCH_UINT32_PERV_ARRAY_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_SCRATCH_UINT32_PERV_ARRAY_PlatInit = true;
+const bool ATTR_SCRATCH_UINT32_PERV_ARRAY_InitToZero = false;
+
+/* ATTR_REPR_RING */
+typedef uint32_t ATTR_REPR_RING_Type;
+const bool ATTR_REPR_RING_Privileged = false;
+const TargetTypes_t ATTR_REPR_RING_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_REPR_RING_PlatInit = true;
+const bool ATTR_REPR_RING_InitToZero = false;
+#define ATTR_REPR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_TIME_RING */
+typedef uint32_t ATTR_TIME_RING_Type;
+const bool ATTR_TIME_RING_Privileged = false;
+const TargetTypes_t ATTR_TIME_RING_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_TIME_RING_PlatInit = true;
+const bool ATTR_TIME_RING_InitToZero = false;
+#define ATTR_TIME_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_GPTR_RING */
+typedef uint32_t ATTR_GPTR_RING_Type;
+const bool ATTR_GPTR_RING_Privileged = false;
+const TargetTypes_t ATTR_GPTR_RING_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_GPTR_RING_PlatInit = true;
+const bool ATTR_GPTR_RING_InitToZero = false;
+#define ATTR_GPTR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PLL_RING */
+typedef uint32_t ATTR_PLL_RING_Type;
+const bool ATTR_PLL_RING_Privileged = false;
+const TargetTypes_t ATTR_PLL_RING_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_PLL_RING_PlatInit = true;
+const bool ATTR_PLL_RING_InitToZero = false;
+#define ATTR_PLL_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_CORE_REPR_RING */
+typedef uint32_t ATTR_CORE_REPR_RING_Type;
+const bool ATTR_CORE_REPR_RING_Privileged = false;
+const TargetTypes_t ATTR_CORE_REPR_RING_TargetTypes = TARGET_TYPE_CORE;
+const bool ATTR_CORE_REPR_RING_PlatInit = true;
+const bool ATTR_CORE_REPR_RING_InitToZero = false;
+
+/* ATTR_CORE_TIME_RING */
+typedef uint32_t ATTR_CORE_TIME_RING_Type;
+const bool ATTR_CORE_TIME_RING_Privileged = false;
+const TargetTypes_t ATTR_CORE_TIME_RING_TargetTypes = TARGET_TYPE_CORE;
+const bool ATTR_CORE_TIME_RING_PlatInit = true;
+const bool ATTR_CORE_TIME_RING_InitToZero = false;
+
+/* ATTR_CORE_GPTR_RING */
+typedef uint32_t ATTR_CORE_GPTR_RING_Type;
+const bool ATTR_CORE_GPTR_RING_Privileged = false;
+const TargetTypes_t ATTR_CORE_GPTR_RING_TargetTypes = TARGET_TYPE_CORE;
+const bool ATTR_CORE_GPTR_RING_PlatInit = true;
+const bool ATTR_CORE_GPTR_RING_InitToZero = false;
+
+/* ATTR_L2_REPR_RING */
+typedef uint32_t ATTR_L2_REPR_RING_Type;
+const bool ATTR_L2_REPR_RING_Privileged = false;
+const TargetTypes_t ATTR_L2_REPR_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L2_REPR_RING_PlatInit = true;
+const bool ATTR_L2_REPR_RING_InitToZero = false;
+#define ATTR_L2_REPR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_L2_TIME_RING */
+typedef uint32_t ATTR_L2_TIME_RING_Type;
+const bool ATTR_L2_TIME_RING_Privileged = false;
+const TargetTypes_t ATTR_L2_TIME_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L2_TIME_RING_PlatInit = true;
+const bool ATTR_L2_TIME_RING_InitToZero = false;
+#define ATTR_L2_TIME_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_L2_GPTR_RING */
+typedef uint32_t ATTR_L2_GPTR_RING_Type;
+const bool ATTR_L2_GPTR_RING_Privileged = false;
+const TargetTypes_t ATTR_L2_GPTR_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L2_GPTR_RING_PlatInit = true;
+const bool ATTR_L2_GPTR_RING_InitToZero = false;
+#define ATTR_L2_GPTR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_L3_REPR_RING */
+typedef uint32_t ATTR_L3_REPR_RING_Type;
+const bool ATTR_L3_REPR_RING_Privileged = false;
+const TargetTypes_t ATTR_L3_REPR_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L3_REPR_RING_PlatInit = true;
+const bool ATTR_L3_REPR_RING_InitToZero = false;
+#define ATTR_L3_REPR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_L3_TIME_RING */
+typedef uint32_t ATTR_L3_TIME_RING_Type;
+const bool ATTR_L3_TIME_RING_Privileged = false;
+const TargetTypes_t ATTR_L3_TIME_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L3_TIME_RING_PlatInit = true;
+const bool ATTR_L3_TIME_RING_InitToZero = false;
+#define ATTR_L3_TIME_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_L3_GPTR_RING */
+typedef uint32_t ATTR_L3_GPTR_RING_Type;
+const bool ATTR_L3_GPTR_RING_Privileged = false;
+const TargetTypes_t ATTR_L3_GPTR_RING_TargetTypes = TARGET_TYPE_EX;
+const bool ATTR_L3_GPTR_RING_PlatInit = true;
+const bool ATTR_L3_GPTR_RING_InitToZero = false;
+#define ATTR_L3_GPTR_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_DPLL_RING */
+typedef uint32_t ATTR_DPLL_RING_Type;
+const bool ATTR_DPLL_RING_Privileged = false;
+const TargetTypes_t ATTR_DPLL_RING_TargetTypes = TARGET_TYPE_EQ;
+const bool ATTR_DPLL_RING_PlatInit = true;
+const bool ATTR_DPLL_RING_InitToZero = false;
+#define ATTR_DPLL_RING_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_FSI */
+typedef uint16_t ATTR_PG_FSI_Type;
+const bool ATTR_PG_FSI_Privileged = false;
+const TargetTypes_t ATTR_PG_FSI_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_FSI_PlatInit = false;
+const bool ATTR_PG_FSI_InitToZero = false;
+#define ATTR_PG_FSI_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_PRV */
+typedef uint16_t ATTR_PG_PRV_Type;
+const bool ATTR_PG_PRV_Privileged = false;
+const TargetTypes_t ATTR_PG_PRV_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_PRV_PlatInit = false;
+const bool ATTR_PG_PRV_InitToZero = false;
+#define ATTR_PG_PRV_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_N0 */
+typedef uint16_t ATTR_PG_N0_Type;
+const bool ATTR_PG_N0_Privileged = false;
+const TargetTypes_t ATTR_PG_N0_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_N0_PlatInit = false;
+const bool ATTR_PG_N0_InitToZero = false;
+#define ATTR_PG_N0_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_N1 */
+typedef uint16_t ATTR_PG_N1_Type;
+const bool ATTR_PG_N1_Privileged = false;
+const TargetTypes_t ATTR_PG_N1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_N1_PlatInit = false;
+const bool ATTR_PG_N1_InitToZero = false;
+#define ATTR_PG_N1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_N2 */
+typedef uint16_t ATTR_PG_N2_Type;
+const bool ATTR_PG_N2_Privileged = false;
+const TargetTypes_t ATTR_PG_N2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_N2_PlatInit = false;
+const bool ATTR_PG_N2_InitToZero = false;
+#define ATTR_PG_N2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_N3 */
+typedef uint16_t ATTR_PG_N3_Type;
+const bool ATTR_PG_N3_Privileged = false;
+const TargetTypes_t ATTR_PG_N3_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_N3_PlatInit = false;
+const bool ATTR_PG_N3_InitToZero = false;
+#define ATTR_PG_N3_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_XB */
+typedef uint16_t ATTR_PG_XB_Type;
+const bool ATTR_PG_XB_Privileged = false;
+const TargetTypes_t ATTR_PG_XB_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_XB_PlatInit = false;
+const bool ATTR_PG_XB_InitToZero = false;
+#define ATTR_PG_XB_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_MC01 */
+typedef uint16_t ATTR_PG_MC01_Type;
+const bool ATTR_PG_MC01_Privileged = false;
+const TargetTypes_t ATTR_PG_MC01_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_MC01_PlatInit = false;
+const bool ATTR_PG_MC01_InitToZero = false;
+#define ATTR_PG_MC01_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_MC23 */
+typedef uint16_t ATTR_PG_MC23_Type;
+const bool ATTR_PG_MC23_Privileged = false;
+const TargetTypes_t ATTR_PG_MC23_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_MC23_PlatInit = false;
+const bool ATTR_PG_MC23_InitToZero = false;
+#define ATTR_PG_MC23_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_OB0 */
+typedef uint16_t ATTR_PG_OB0_Type;
+const bool ATTR_PG_OB0_Privileged = false;
+const TargetTypes_t ATTR_PG_OB0_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_OB0_PlatInit = false;
+const bool ATTR_PG_OB0_InitToZero = false;
+#define ATTR_PG_OB0_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_OB1 */
+typedef uint16_t ATTR_PG_OB1_Type;
+const bool ATTR_PG_OB1_Privileged = false;
+const TargetTypes_t ATTR_PG_OB1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_OB1_PlatInit = false;
+const bool ATTR_PG_OB1_InitToZero = false;
+#define ATTR_PG_OB1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_OB2 */
+typedef uint16_t ATTR_PG_OB2_Type;
+const bool ATTR_PG_OB2_Privileged = false;
+const TargetTypes_t ATTR_PG_OB2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_OB2_PlatInit = false;
+const bool ATTR_PG_OB2_InitToZero = false;
+#define ATTR_PG_OB2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_OB3 */
+typedef uint16_t ATTR_PG_OB3_Type;
+const bool ATTR_PG_OB3_Privileged = false;
+const TargetTypes_t ATTR_PG_OB3_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_OB3_PlatInit = false;
+const bool ATTR_PG_OB3_InitToZero = false;
+#define ATTR_PG_OB3_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_PCI0 */
+typedef uint16_t ATTR_PG_PCI0_Type;
+const bool ATTR_PG_PCI0_Privileged = false;
+const TargetTypes_t ATTR_PG_PCI0_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_PCI0_PlatInit = false;
+const bool ATTR_PG_PCI0_InitToZero = false;
+#define ATTR_PG_PCI0_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_PCI1 */
+typedef uint16_t ATTR_PG_PCI1_Type;
+const bool ATTR_PG_PCI1_Privileged = false;
+const TargetTypes_t ATTR_PG_PCI1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_PCI1_PlatInit = false;
+const bool ATTR_PG_PCI1_InitToZero = false;
+#define ATTR_PG_PCI1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_PCI2 */
+typedef uint16_t ATTR_PG_PCI2_Type;
+const bool ATTR_PG_PCI2_Privileged = false;
+const TargetTypes_t ATTR_PG_PCI2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_PCI2_PlatInit = false;
+const bool ATTR_PG_PCI2_InitToZero = false;
+#define ATTR_PG_PCI2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ0 */
+typedef uint16_t ATTR_PG_EQ0_Type;
+const bool ATTR_PG_EQ0_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ0_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ0_PlatInit = false;
+const bool ATTR_PG_EQ0_InitToZero = false;
+#define ATTR_PG_EQ0_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ1 */
+typedef uint16_t ATTR_PG_EQ1_Type;
+const bool ATTR_PG_EQ1_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ1_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ1_PlatInit = false;
+const bool ATTR_PG_EQ1_InitToZero = false;
+#define ATTR_PG_EQ1_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ2 */
+typedef uint16_t ATTR_PG_EQ2_Type;
+const bool ATTR_PG_EQ2_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ2_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ2_PlatInit = false;
+const bool ATTR_PG_EQ2_InitToZero = false;
+#define ATTR_PG_EQ2_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ3 */
+typedef uint16_t ATTR_PG_EQ3_Type;
+const bool ATTR_PG_EQ3_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ3_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ3_PlatInit = false;
+const bool ATTR_PG_EQ3_InitToZero = false;
+#define ATTR_PG_EQ3_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ4 */
+typedef uint16_t ATTR_PG_EQ4_Type;
+const bool ATTR_PG_EQ4_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ4_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ4_PlatInit = false;
+const bool ATTR_PG_EQ4_InitToZero = false;
+#define ATTR_PG_EQ4_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EQ5 */
+typedef uint16_t ATTR_PG_EQ5_Type;
+const bool ATTR_PG_EQ5_Privileged = false;
+const TargetTypes_t ATTR_PG_EQ5_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EQ5_PlatInit = false;
+const bool ATTR_PG_EQ5_InitToZero = false;
+#define ATTR_PG_EQ5_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC00 */
+typedef uint16_t ATTR_PG_EC00_Type;
+const bool ATTR_PG_EC00_Privileged = false;
+const TargetTypes_t ATTR_PG_EC00_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC00_PlatInit = false;
+const bool ATTR_PG_EC00_InitToZero = false;
+#define ATTR_PG_EC00_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC01 */
+typedef uint16_t ATTR_PG_EC01_Type;
+const bool ATTR_PG_EC01_Privileged = false;
+const TargetTypes_t ATTR_PG_EC01_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC01_PlatInit = false;
+const bool ATTR_PG_EC01_InitToZero = false;
+#define ATTR_PG_EC01_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC02 */
+typedef uint16_t ATTR_PG_EC02_Type;
+const bool ATTR_PG_EC02_Privileged = false;
+const TargetTypes_t ATTR_PG_EC02_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC02_PlatInit = false;
+const bool ATTR_PG_EC02_InitToZero = false;
+#define ATTR_PG_EC02_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC03 */
+typedef uint16_t ATTR_PG_EC03_Type;
+const bool ATTR_PG_EC03_Privileged = false;
+const TargetTypes_t ATTR_PG_EC03_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC03_PlatInit = false;
+const bool ATTR_PG_EC03_InitToZero = false;
+#define ATTR_PG_EC03_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC04 */
+typedef uint16_t ATTR_PG_EC04_Type;
+const bool ATTR_PG_EC04_Privileged = false;
+const TargetTypes_t ATTR_PG_EC04_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC04_PlatInit = false;
+const bool ATTR_PG_EC04_InitToZero = false;
+#define ATTR_PG_EC04_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC05 */
+typedef uint16_t ATTR_PG_EC05_Type;
+const bool ATTR_PG_EC05_Privileged = false;
+const TargetTypes_t ATTR_PG_EC05_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC05_PlatInit = false;
+const bool ATTR_PG_EC05_InitToZero = false;
+#define ATTR_PG_EC05_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC06 */
+typedef uint16_t ATTR_PG_EC06_Type;
+const bool ATTR_PG_EC06_Privileged = false;
+const TargetTypes_t ATTR_PG_EC06_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC06_PlatInit = false;
+const bool ATTR_PG_EC06_InitToZero = false;
+#define ATTR_PG_EC06_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC07 */
+typedef uint16_t ATTR_PG_EC07_Type;
+const bool ATTR_PG_EC07_Privileged = false;
+const TargetTypes_t ATTR_PG_EC07_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC07_PlatInit = false;
+const bool ATTR_PG_EC07_InitToZero = false;
+#define ATTR_PG_EC07_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC08 */
+typedef uint16_t ATTR_PG_EC08_Type;
+const bool ATTR_PG_EC08_Privileged = false;
+const TargetTypes_t ATTR_PG_EC08_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC08_PlatInit = false;
+const bool ATTR_PG_EC08_InitToZero = false;
+#define ATTR_PG_EC08_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC09 */
+typedef uint16_t ATTR_PG_EC09_Type;
+const bool ATTR_PG_EC09_Privileged = false;
+const TargetTypes_t ATTR_PG_EC09_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC09_PlatInit = false;
+const bool ATTR_PG_EC09_InitToZero = false;
+#define ATTR_PG_EC09_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC10 */
+typedef uint16_t ATTR_PG_EC10_Type;
+const bool ATTR_PG_EC10_Privileged = false;
+const TargetTypes_t ATTR_PG_EC10_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC10_PlatInit = false;
+const bool ATTR_PG_EC10_InitToZero = false;
+#define ATTR_PG_EC10_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC11 */
+typedef uint16_t ATTR_PG_EC11_Type;
+const bool ATTR_PG_EC11_Privileged = false;
+const TargetTypes_t ATTR_PG_EC11_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC11_PlatInit = false;
+const bool ATTR_PG_EC11_InitToZero = false;
+#define ATTR_PG_EC11_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC12 */
+typedef uint16_t ATTR_PG_EC12_Type;
+const bool ATTR_PG_EC12_Privileged = false;
+const TargetTypes_t ATTR_PG_EC12_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC12_PlatInit = false;
+const bool ATTR_PG_EC12_InitToZero = false;
+#define ATTR_PG_EC12_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC13 */
+typedef uint16_t ATTR_PG_EC13_Type;
+const bool ATTR_PG_EC13_Privileged = false;
+const TargetTypes_t ATTR_PG_EC13_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC13_PlatInit = false;
+const bool ATTR_PG_EC13_InitToZero = false;
+#define ATTR_PG_EC13_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC14 */
+typedef uint16_t ATTR_PG_EC14_Type;
+const bool ATTR_PG_EC14_Privileged = false;
+const TargetTypes_t ATTR_PG_EC14_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC14_PlatInit = false;
+const bool ATTR_PG_EC14_InitToZero = false;
+#define ATTR_PG_EC14_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC15 */
+typedef uint16_t ATTR_PG_EC15_Type;
+const bool ATTR_PG_EC15_Privileged = false;
+const TargetTypes_t ATTR_PG_EC15_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC15_PlatInit = false;
+const bool ATTR_PG_EC15_InitToZero = false;
+#define ATTR_PG_EC15_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC16 */
+typedef uint16_t ATTR_PG_EC16_Type;
+const bool ATTR_PG_EC16_Privileged = false;
+const TargetTypes_t ATTR_PG_EC16_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC16_PlatInit = false;
+const bool ATTR_PG_EC16_InitToZero = false;
+#define ATTR_PG_EC16_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC17 */
+typedef uint16_t ATTR_PG_EC17_Type;
+const bool ATTR_PG_EC17_Privileged = false;
+const TargetTypes_t ATTR_PG_EC17_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC17_PlatInit = false;
+const bool ATTR_PG_EC17_InitToZero = false;
+#define ATTR_PG_EC17_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC18 */
+typedef uint16_t ATTR_PG_EC18_Type;
+const bool ATTR_PG_EC18_Privileged = false;
+const TargetTypes_t ATTR_PG_EC18_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC18_PlatInit = false;
+const bool ATTR_PG_EC18_InitToZero = false;
+#define ATTR_PG_EC18_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC19 */
+typedef uint16_t ATTR_PG_EC19_Type;
+const bool ATTR_PG_EC19_Privileged = false;
+const TargetTypes_t ATTR_PG_EC19_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC19_PlatInit = false;
+const bool ATTR_PG_EC19_InitToZero = false;
+#define ATTR_PG_EC19_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC20 */
+typedef uint16_t ATTR_PG_EC20_Type;
+const bool ATTR_PG_EC20_Privileged = false;
+const TargetTypes_t ATTR_PG_EC20_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC20_PlatInit = false;
+const bool ATTR_PG_EC20_InitToZero = false;
+#define ATTR_PG_EC20_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC21 */
+typedef uint16_t ATTR_PG_EC21_Type;
+const bool ATTR_PG_EC21_Privileged = false;
+const TargetTypes_t ATTR_PG_EC21_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC21_PlatInit = false;
+const bool ATTR_PG_EC21_InitToZero = false;
+#define ATTR_PG_EC21_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC22 */
+typedef uint16_t ATTR_PG_EC22_Type;
+const bool ATTR_PG_EC22_Privileged = false;
+const TargetTypes_t ATTR_PG_EC22_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC22_PlatInit = false;
+const bool ATTR_PG_EC22_InitToZero = false;
+#define ATTR_PG_EC22_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_PG_EC23 */
+typedef uint16_t ATTR_PG_EC23_Type;
+const bool ATTR_PG_EC23_Privileged = false;
+const TargetTypes_t ATTR_PG_EC23_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_PG_EC23_PlatInit = false;
+const bool ATTR_PG_EC23_InitToZero = false;
+#define ATTR_PG_EC23_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_CHIP_UNIT_POS */
+typedef uint8_t ATTR_CHIP_UNIT_POS_Type;
+const bool ATTR_CHIP_UNIT_POS_Privileged = false;
+const TargetTypes_t ATTR_CHIP_UNIT_POS_TargetTypes = TARGET_TYPE_PERV;
+const bool ATTR_CHIP_UNIT_POS_PlatInit = false;
+const bool ATTR_CHIP_UNIT_POS_InitToZero = false;
+#define ATTR_CHIP_UNIT_POS_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_FABRIC_SYSTEM_ID */
+typedef uint8_t ATTR_FABRIC_SYSTEM_ID_Type;
+const bool ATTR_FABRIC_SYSTEM_ID_Privileged = false;
+const TargetTypes_t ATTR_FABRIC_SYSTEM_ID_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_FABRIC_SYSTEM_ID_PlatInit = true;
+const bool ATTR_FABRIC_SYSTEM_ID_InitToZero = false;
+#define ATTR_FABRIC_SYSTEM_ID_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_SYSTEM_IPL_PHASE */
+typedef uint8_t ATTR_SYSTEM_IPL_PHASE_Type;
+const bool ATTR_SYSTEM_IPL_PHASE_Privileged = false;
+const TargetTypes_t ATTR_SYSTEM_IPL_PHASE_TargetTypes = TARGET_TYPE_SYSTEM;
+const bool ATTR_SYSTEM_IPL_PHASE_PlatInit = true;
+const bool ATTR_SYSTEM_IPL_PHASE_InitToZero = false;
+enum ATTR_SYSTEM_IPL_PHASE_Enum
+{
+ ENUM_ATTR_SYSTEM_IPL_PHASE_HB_IPL = 0x1,
+ ENUM_ATTR_SYSTEM_IPL_PHASE_HB_RUNTIME = 0x2,
+ ENUM_ATTR_SYSTEM_IPL_PHASE_CACHE_CONTAINED = 0x4,
+};
+#define ATTR_SYSTEM_IPL_PHASE_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_BACKUP_SEEPROM_SELECT */
+typedef uint8_t ATTR_BACKUP_SEEPROM_SELECT_Type;
+const bool ATTR_BACKUP_SEEPROM_SELECT_Privileged = false;
+const TargetTypes_t ATTR_BACKUP_SEEPROM_SELECT_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_BACKUP_SEEPROM_SELECT_PlatInit = false;
+const bool ATTR_BACKUP_SEEPROM_SELECT_InitToZero = false;
+#define ATTR_BACKUP_SEEPROM_SELECT_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+/* ATTR_MC_SYNC_MODE */
+typedef uint8_t ATTR_MC_SYNC_MODE_Type;
+const bool ATTR_MC_SYNC_MODE_Privileged = false;
+const TargetTypes_t ATTR_MC_SYNC_MODE_TargetTypes = TARGET_TYPE_PROC_CHIP;
+const bool ATTR_MC_SYNC_MODE_PlatInit = false;
+const bool ATTR_MC_SYNC_MODE_InitToZero = false;
+#define ATTR_MC_SYNC_MODE_SETMACRO ATTRIBUTE_NOT_WRITABLE
+
+} //fapi2
+
+#endif // __ASSEMBLER__
+
+#endif
diff --git a/hwpf/include/fapi2AttributePlatCheck.H b/hwpf/include/fapi2AttributePlatCheck.H
new file mode 100644
index 00000000..f02c02cc
--- /dev/null
+++ b/hwpf/include/fapi2AttributePlatCheck.H
@@ -0,0 +1,361 @@
+// fapiAttributePlatCheck.H
+// This file is generated by perl script fapiParseAttributeInfo.pl
+// A platform can include it to ensure that it handles all HWPF
+// attributes
+
+#ifndef FAPIATTRIBUTEPLATCHECK_H_
+#define FAPIATTRIBUTEPLATCHECK_H_
+
+#ifndef ATTR_SCRATCH_UINT8_1_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT8_1
+#endif
+#ifndef ATTR_SCRATCH_UINT8_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT8_1
+#endif
+
+#ifndef ATTR_SCRATCH_UINT8_2_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT8_2
+#endif
+#ifndef ATTR_SCRATCH_UINT8_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT8_2
+#endif
+
+#ifndef ATTR_SCRATCH_UINT32_1_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT32_1
+#endif
+#ifndef ATTR_SCRATCH_UINT32_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT32_1
+#endif
+
+#ifndef ATTR_SCRATCH_UINT32_2_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT32_2
+#endif
+#ifndef ATTR_SCRATCH_UINT32_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT32_2
+#endif
+
+#ifndef ATTR_SCRATCH_UINT64_1_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT64_1
+#endif
+#ifndef ATTR_SCRATCH_UINT64_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT64_1
+#endif
+
+#ifndef ATTR_SCRATCH_UINT64_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT64_2
+#endif
+
+#ifndef ATTR_SCRATCH_INT8_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT8_1
+#endif
+
+#ifndef ATTR_SCRATCH_INT8_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT8_2
+#endif
+
+#ifndef ATTR_SCRATCH_INT32_1_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_INT32_1
+#endif
+#ifndef ATTR_SCRATCH_INT32_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT32_1
+#endif
+
+#ifndef ATTR_SCRATCH_INT32_2_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_INT32_2
+#endif
+#ifndef ATTR_SCRATCH_INT32_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT32_2
+#endif
+
+#ifndef ATTR_SCRATCH_INT64_1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT64_1
+#endif
+
+#ifndef ATTR_SCRATCH_INT64_2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_INT64_2
+#endif
+
+#ifndef ATTR_SCRATCH_UINT32_ARRAY_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT32_ARRAY
+#endif
+#ifndef ATTR_SCRATCH_UINT32_ARRAY_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT32_ARRAY
+#endif
+
+#ifndef ATTR_SCRATCH_UINT32_PERV_ARRAY_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_SCRATCH_UINT32_PERV_ARRAY
+#endif
+#ifndef ATTR_SCRATCH_UINT32_PERV_ARRAY_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SCRATCH_UINT32_PERV_ARRAY
+#endif
+
+#ifndef ATTR_REPR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_REPR_RING
+#endif
+
+#ifndef ATTR_TIME_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_TIME_RING
+#endif
+
+#ifndef ATTR_GPTR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_GPTR_RING
+#endif
+
+#ifndef ATTR_PLL_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PLL_RING
+#endif
+
+#ifndef ATTR_CORE_REPR_RING_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_CORE_REPR_RING
+#endif
+#ifndef ATTR_CORE_REPR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_CORE_REPR_RING
+#endif
+
+#ifndef ATTR_CORE_TIME_RING_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_CORE_TIME_RING
+#endif
+#ifndef ATTR_CORE_TIME_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_CORE_TIME_RING
+#endif
+
+#ifndef ATTR_CORE_GPTR_RING_SETMACRO
+#error Platform does not support set of HWPF attr ATTR_CORE_GPTR_RING
+#endif
+#ifndef ATTR_CORE_GPTR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_CORE_GPTR_RING
+#endif
+
+#ifndef ATTR_L2_REPR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L2_REPR_RING
+#endif
+
+#ifndef ATTR_L2_TIME_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L2_TIME_RING
+#endif
+
+#ifndef ATTR_L2_GPTR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L2_GPTR_RING
+#endif
+
+#ifndef ATTR_L3_REPR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L3_REPR_RING
+#endif
+
+#ifndef ATTR_L3_TIME_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L3_TIME_RING
+#endif
+
+#ifndef ATTR_L3_GPTR_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_L3_GPTR_RING
+#endif
+
+#ifndef ATTR_DPLL_RING_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_DPLL_RING
+#endif
+
+#ifndef ATTR_PG_FSI_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_FSI
+#endif
+
+#ifndef ATTR_PG_PRV_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_PRV
+#endif
+
+#ifndef ATTR_PG_N0_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_N0
+#endif
+
+#ifndef ATTR_PG_N1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_N1
+#endif
+
+#ifndef ATTR_PG_N2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_N2
+#endif
+
+#ifndef ATTR_PG_N3_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_N3
+#endif
+
+#ifndef ATTR_PG_XB_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_XB
+#endif
+
+#ifndef ATTR_PG_MC01_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_MC01
+#endif
+
+#ifndef ATTR_PG_MC23_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_MC23
+#endif
+
+#ifndef ATTR_PG_OB0_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_OB0
+#endif
+
+#ifndef ATTR_PG_OB1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_OB1
+#endif
+
+#ifndef ATTR_PG_OB2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_OB2
+#endif
+
+#ifndef ATTR_PG_OB3_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_OB3
+#endif
+
+#ifndef ATTR_PG_PCI0_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_PCI0
+#endif
+
+#ifndef ATTR_PG_PCI1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_PCI1
+#endif
+
+#ifndef ATTR_PG_PCI2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_PCI2
+#endif
+
+#ifndef ATTR_PG_EQ0_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ0
+#endif
+
+#ifndef ATTR_PG_EQ1_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ1
+#endif
+
+#ifndef ATTR_PG_EQ2_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ2
+#endif
+
+#ifndef ATTR_PG_EQ3_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ3
+#endif
+
+#ifndef ATTR_PG_EQ4_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ4
+#endif
+
+#ifndef ATTR_PG_EQ5_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EQ5
+#endif
+
+#ifndef ATTR_PG_EC00_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC00
+#endif
+
+#ifndef ATTR_PG_EC01_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC01
+#endif
+
+#ifndef ATTR_PG_EC02_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC02
+#endif
+
+#ifndef ATTR_PG_EC03_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC03
+#endif
+
+#ifndef ATTR_PG_EC04_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC04
+#endif
+
+#ifndef ATTR_PG_EC05_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC05
+#endif
+
+#ifndef ATTR_PG_EC06_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC06
+#endif
+
+#ifndef ATTR_PG_EC07_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC07
+#endif
+
+#ifndef ATTR_PG_EC08_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC08
+#endif
+
+#ifndef ATTR_PG_EC09_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC09
+#endif
+
+#ifndef ATTR_PG_EC10_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC10
+#endif
+
+#ifndef ATTR_PG_EC11_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC11
+#endif
+
+#ifndef ATTR_PG_EC12_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC12
+#endif
+
+#ifndef ATTR_PG_EC13_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC13
+#endif
+
+#ifndef ATTR_PG_EC14_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC14
+#endif
+
+#ifndef ATTR_PG_EC15_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC15
+#endif
+
+#ifndef ATTR_PG_EC16_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC16
+#endif
+
+#ifndef ATTR_PG_EC17_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC17
+#endif
+
+#ifndef ATTR_PG_EC18_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC18
+#endif
+
+#ifndef ATTR_PG_EC19_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC19
+#endif
+
+#ifndef ATTR_PG_EC20_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC20
+#endif
+
+#ifndef ATTR_PG_EC21_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC21
+#endif
+
+#ifndef ATTR_PG_EC22_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC22
+#endif
+
+#ifndef ATTR_PG_EC23_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_PG_EC23
+#endif
+
+#ifndef ATTR_CHIP_UNIT_POS_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_CHIP_UNIT_POS
+#endif
+
+#ifndef ATTR_FABRIC_SYSTEM_ID_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_FABRIC_SYSTEM_ID
+#endif
+
+#ifndef ATTR_SYSTEM_IPL_PHASE_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_SYSTEM_IPL_PHASE
+#endif
+
+#ifndef ATTR_BACKUP_SEEPROM_SELECT_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_BACKUP_SEEPROM_SELECT
+#endif
+
+#ifndef ATTR_MC_SYNC_MODE_GETMACRO
+#error Platform does not support get of HWPF attr ATTR_MC_SYNC_MODE
+#endif
+
+#endif
diff --git a/hwpf/include/fapi2AttributeService.C b/hwpf/include/fapi2AttributeService.C
new file mode 100644
index 00000000..c58e7a62
--- /dev/null
+++ b/hwpf/include/fapi2AttributeService.C
@@ -0,0 +1,519 @@
+// fapi2AttributeService.C
+// This file is generated by perl script fapi2CreateIfAttrService.pl
+
+#include <fapi2AttributeService.H>
+//#include <fapi2ChipEcFeature.H>
+//#include <fapi2PlatTrace.H>
+
+namespace fapi2
+{
+
+ReturnCode fapiGetInitFileAttr(const AttributeId i_id,
+ const Target * i_pTarget,
+ uint64_t & o_val,
+ const uint32_t i_arrayIndex1,
+ const uint32_t i_arrayIndex2,
+ const uint32_t i_arrayIndex3,
+ const uint32_t i_arrayIndex4)
+{
+ ReturnCode l_rc;
+
+ if (i_id == ATTR_SCRATCH_UINT8_1)
+ {
+ ATTR_SCRATCH_UINT8_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT8_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT8_2)
+ {
+ ATTR_SCRATCH_UINT8_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT8_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT32_1)
+ {
+ ATTR_SCRATCH_UINT32_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT32_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT32_2)
+ {
+ ATTR_SCRATCH_UINT32_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT32_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT64_1)
+ {
+ ATTR_SCRATCH_UINT64_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT64_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT64_2)
+ {
+ ATTR_SCRATCH_UINT64_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT64_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT8_1)
+ {
+ ATTR_SCRATCH_INT8_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT8_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT8_2)
+ {
+ ATTR_SCRATCH_INT8_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT8_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT32_1)
+ {
+ ATTR_SCRATCH_INT32_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT32_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT32_2)
+ {
+ ATTR_SCRATCH_INT32_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT32_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT64_1)
+ {
+ ATTR_SCRATCH_INT64_1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT64_1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_INT64_2)
+ {
+ ATTR_SCRATCH_INT64_2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_INT64_2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SCRATCH_UINT32_ARRAY)
+ {
+ ATTR_SCRATCH_UINT32_ARRAY_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT32_ARRAY, i_pTarget, l_attr);
+ o_val = l_attr[i_arrayIndex1];
+ }
+ else if (i_id == ATTR_SCRATCH_UINT32_PERV_ARRAY)
+ {
+ ATTR_SCRATCH_UINT32_PERV_ARRAY_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SCRATCH_UINT32_PERV_ARRAY, i_pTarget, l_attr);
+ o_val = l_attr[i_arrayIndex1];
+ }
+ else if (i_id == ATTR_REPR_RING)
+ {
+ ATTR_REPR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_REPR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_TIME_RING)
+ {
+ ATTR_TIME_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_TIME_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_GPTR_RING)
+ {
+ ATTR_GPTR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_GPTR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PLL_RING)
+ {
+ ATTR_PLL_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PLL_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_CORE_REPR_RING)
+ {
+ ATTR_CORE_REPR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_CORE_REPR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_CORE_TIME_RING)
+ {
+ ATTR_CORE_TIME_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_CORE_TIME_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_CORE_GPTR_RING)
+ {
+ ATTR_CORE_GPTR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_CORE_GPTR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L2_REPR_RING)
+ {
+ ATTR_L2_REPR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L2_REPR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L2_TIME_RING)
+ {
+ ATTR_L2_TIME_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L2_TIME_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L2_GPTR_RING)
+ {
+ ATTR_L2_GPTR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L2_GPTR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L3_REPR_RING)
+ {
+ ATTR_L3_REPR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L3_REPR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L3_TIME_RING)
+ {
+ ATTR_L3_TIME_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L3_TIME_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_L3_GPTR_RING)
+ {
+ ATTR_L3_GPTR_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_L3_GPTR_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_DPLL_RING)
+ {
+ ATTR_DPLL_RING_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_DPLL_RING, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_FSI)
+ {
+ ATTR_PG_FSI_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_FSI, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_PRV)
+ {
+ ATTR_PG_PRV_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_PRV, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_N0)
+ {
+ ATTR_PG_N0_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_N0, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_N1)
+ {
+ ATTR_PG_N1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_N1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_N2)
+ {
+ ATTR_PG_N2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_N2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_N3)
+ {
+ ATTR_PG_N3_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_N3, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_XB)
+ {
+ ATTR_PG_XB_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_XB, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_MC01)
+ {
+ ATTR_PG_MC01_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_MC01, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_MC23)
+ {
+ ATTR_PG_MC23_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_MC23, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_OB0)
+ {
+ ATTR_PG_OB0_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_OB0, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_OB1)
+ {
+ ATTR_PG_OB1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_OB1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_OB2)
+ {
+ ATTR_PG_OB2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_OB2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_OB3)
+ {
+ ATTR_PG_OB3_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_OB3, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_PCI0)
+ {
+ ATTR_PG_PCI0_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_PCI0, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_PCI1)
+ {
+ ATTR_PG_PCI1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_PCI1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_PCI2)
+ {
+ ATTR_PG_PCI2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_PCI2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ0)
+ {
+ ATTR_PG_EQ0_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ0, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ1)
+ {
+ ATTR_PG_EQ1_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ1, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ2)
+ {
+ ATTR_PG_EQ2_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ2, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ3)
+ {
+ ATTR_PG_EQ3_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ3, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ4)
+ {
+ ATTR_PG_EQ4_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ4, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EQ5)
+ {
+ ATTR_PG_EQ5_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EQ5, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC00)
+ {
+ ATTR_PG_EC00_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC00, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC01)
+ {
+ ATTR_PG_EC01_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC01, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC02)
+ {
+ ATTR_PG_EC02_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC02, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC03)
+ {
+ ATTR_PG_EC03_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC03, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC04)
+ {
+ ATTR_PG_EC04_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC04, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC05)
+ {
+ ATTR_PG_EC05_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC05, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC06)
+ {
+ ATTR_PG_EC06_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC06, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC07)
+ {
+ ATTR_PG_EC07_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC07, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC08)
+ {
+ ATTR_PG_EC08_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC08, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC09)
+ {
+ ATTR_PG_EC09_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC09, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC10)
+ {
+ ATTR_PG_EC10_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC10, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC11)
+ {
+ ATTR_PG_EC11_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC11, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC12)
+ {
+ ATTR_PG_EC12_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC12, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC13)
+ {
+ ATTR_PG_EC13_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC13, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC14)
+ {
+ ATTR_PG_EC14_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC14, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC15)
+ {
+ ATTR_PG_EC15_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC15, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC16)
+ {
+ ATTR_PG_EC16_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC16, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC17)
+ {
+ ATTR_PG_EC17_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC17, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC18)
+ {
+ ATTR_PG_EC18_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC18, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC19)
+ {
+ ATTR_PG_EC19_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC19, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC20)
+ {
+ ATTR_PG_EC20_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC20, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC21)
+ {
+ ATTR_PG_EC21_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC21, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC22)
+ {
+ ATTR_PG_EC22_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC22, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_PG_EC23)
+ {
+ ATTR_PG_EC23_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_PG_EC23, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_CHIP_UNIT_POS)
+ {
+ ATTR_CHIP_UNIT_POS_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_FABRIC_SYSTEM_ID)
+ {
+ ATTR_FABRIC_SYSTEM_ID_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_FABRIC_SYSTEM_ID, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_SYSTEM_IPL_PHASE)
+ {
+ ATTR_SYSTEM_IPL_PHASE_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_SYSTEM_IPL_PHASE, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_BACKUP_SEEPROM_SELECT)
+ {
+ ATTR_BACKUP_SEEPROM_SELECT_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_BACKUP_SEEPROM_SELECT, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else if (i_id == ATTR_MC_SYNC_MODE)
+ {
+ ATTR_MC_SYNC_MODE_Type l_attr;
+ l_rc = FAPI_ATTR_GET(ATTR_MC_SYNC_MODE, i_pTarget, l_attr);
+ o_val = l_attr;
+ }
+ else
+ {
+ FAPI_ERR("fapiGetInitFileAttr: Unrecognized attr ID: 0x%x", i_id);
+ l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET);
+ l_rc.addEIFfdc(0, &i_id, sizeof(i_id));
+ }
+
+ if (l_rc)
+ {
+ if (i_pTarget)
+ {
+ FAPI_ERR("fapiGetInitFileAttr: Error getting attr ID 0x%x from targType 0x%x",
+ i_id, i_pTarget->getType());
+ }
+ else
+ {
+ FAPI_ERR("fapiGetInitFileAttr: Error getting attr ID 0x%x from system target",
+ i_id);
+ }
+ }
+
+ return l_rc;
+}
+
+}
diff --git a/hwpf/plat/include/fapi2AttributeService.H b/hwpf/include/fapi2AttributeService.H
index ab49c9ab..ab49c9ab 100644
--- a/hwpf/plat/include/fapi2AttributeService.H
+++ b/hwpf/include/fapi2AttributeService.H
diff --git a/hwpf/include/fapi2AttributesSupported.html b/hwpf/include/fapi2AttributesSupported.html
new file mode 100644
index 00000000..e07a7874
--- /dev/null
+++ b/hwpf/include/fapi2AttributesSupported.html
@@ -0,0 +1,13 @@
+<html>
+<body>
+
+<!-- fapiAttributesSupported.html -->
+<!-- This file is generated by perl script fapiParseAttributeInfo.pl -->
+<!-- It lists all HWPF attributes supported -->
+
+<h4>HWPF Attributes supported by this build.</h4>
+<table border="4">
+<tr><th>Attribute ID</th><th>Attribute Description</th></tr></table>
+
+</body>
+</html>
diff --git a/hwpf/include/fapi2ChipEcFeature.C b/hwpf/include/fapi2ChipEcFeature.C
new file mode 100644
index 00000000..820cf775
--- /dev/null
+++ b/hwpf/include/fapi2ChipEcFeature.C
@@ -0,0 +1,75 @@
+// fapiChipEcFeature.C
+// This file is generated by perl script fapiParseAttributeInfo.pl
+// It implements the fapiQueryChipEcFeature function
+
+#include <fapiChipEcFeature.H>
+#include <fapiAttributeService.H>
+#include <fapiSystemConfig.H>
+#include <fapiPlatTrace.H>
+
+namespace fapi2
+{
+
+fapi::ReturnCode fapiQueryChipEcFeature(fapi::AttributeId i_id,
+ const fapi::Target * i_pTarget,
+ uint8_t & o_hasFeature)
+{
+ o_hasFeature = false;
+ fapi::ReturnCode l_rc;
+ uint8_t l_chipName = 0;
+ uint8_t l_chipEc = 0;
+ fapi::Target l_target = *i_pTarget;
+
+ if (i_pTarget->isChiplet())
+ {
+ l_rc = fapiGetParentChip(*i_pTarget, l_target);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiQueryChipEcFeature: error getting parent chip");
+ }
+ }
+
+ if (!l_rc)
+ {
+ l_rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_NAME, &l_target, l_chipName);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiQueryChipEcFeature: error getting chip name");
+ }
+ else
+ {
+ l_rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_EC, &l_target, l_chipEc);
+
+ if (l_rc)
+ {
+ FAPI_ERR("fapiQueryChipEcFeature: error getting chip ec");
+ }
+ else
+ {
+ switch (i_id)
+ {
+ default:
+ FAPI_ERR("fapiQueryChipEcFeature: Unknown feature 0x%x",
+ i_id);
+ l_rc.setFapiError(FAPI_RC_INVALID_CHIP_EC_FEATURE_GET);
+ l_rc.addEIFfdc(0, &i_id, sizeof(i_id));
+ break;
+ }
+
+ if (o_hasFeature)
+ {
+ FAPI_INF("fapiQueryChipEcFeature: Chip (0x%x:0x%x) has feature (0x%x)", l_chipName, l_chipEc, i_id);
+ }
+ else
+ {
+ FAPI_INF("fapiQueryChipEcFeature: Chip (0x%x:0x%x) does not have feature (0x%x)", l_chipName, l_chipEc, i_id);
+ }
+ }
+ }
+ }
+ return l_rc;
+}
+
+}
diff --git a/hwpf/include/fapi2PlatAttributeService.H b/hwpf/include/fapi2PlatAttributeService.H
new file mode 100644
index 00000000..ae21a5f7
--- /dev/null
+++ b/hwpf/include/fapi2PlatAttributeService.H
@@ -0,0 +1,1575 @@
+/**
+ * @file fapiPlatAttributeService.H
+ *
+ * @brief Defines the PLAT attribute access macros and defines which macro
+ * handles each attribute.
+ *
+ */
+
+
+#ifndef FAPI2PLATATTRIBUTESERVICE_H_
+#define FAPI2PLATATTRIBUTESERVICE_H_
+
+#include <stdint.h>
+#include <stddef.h>
+#include <fapi2AttributeIds.H>
+#include <plat_includes.H>
+#include "proc_sbe_fixed.H"
+#include "plat_target_parms.H"
+
+#define PLAT_GET_CHIP_EC_FEATURE_OVERRIDE(ID, PTARGET, VAL) \
+ _getEcFeatureOverride<ID##_Type>(ID, PTARGET, VAL)
+
+/* INSERT NEW ATTRIBUTES HERE */
+
+#define ATTR_BACKUP_SEEPROM_SELECT_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_CHIP_UNIT_POS_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_CORE_GPTR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_CORE_GPTR_RING_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_CORE_REPR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_CORE_REPR_RING_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_CORE_TIME_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_CORE_TIME_RING_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_DPLL_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_FABRIC_SYSTEM_ID_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_GPTR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L2_GPTR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L2_REPR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L2_TIME_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L3_GPTR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L3_REPR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_L3_TIME_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_MC_SYNC_MODE_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC00_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC01_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC02_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC03_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC04_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC05_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC06_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC07_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC08_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC09_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC10_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC11_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC12_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC13_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC14_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC15_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC16_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC17_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC18_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC19_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC20_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC21_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC22_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EC23_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ0_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ3_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ4_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_EQ5_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_FSI_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_MC01_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_MC23_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_N0_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_N1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_N2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_N3_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_OB0_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_OB1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_OB2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_OB3_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_PCI0_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_PCI1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_PCI2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_PRV_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PG_XB_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_PLL_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_REPR_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT32_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT32_1_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_INT32_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT32_2_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_INT64_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT64_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT8_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_INT8_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT32_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT32_1_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT32_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT32_2_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT32_ARRAY_GETMACRO PLAT_ATTR_GET_UINT32_1D_ARRAY
+#define ATTR_SCRATCH_UINT32_ARRAY_SETMACRO PLAT_ATTR_SET_UINT32_1D_ARRAY
+#define ATTR_SCRATCH_UINT32_PERV_ARRAY_GETMACRO PLAT_ATTR_GET_UINT32_1D_ARRAY
+#define ATTR_SCRATCH_UINT32_PERV_ARRAY_SETMACRO PLAT_ATTR_SET_UINT32_1D_ARRAY
+#define ATTR_SCRATCH_UINT64_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT64_1_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT64_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT8_1_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT8_1_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT8_2_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_SCRATCH_UINT8_2_SETMACRO PLAT_ATTR_SET_GLOBAL_INT
+#define ATTR_SYSTEM_IPL_PHASE_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+#define ATTR_TIME_RING_GETMACRO PLAT_ATTR_GET_GLOBAL_INT
+
+
+/******************************************************************************/
+/* * Global macros * */
+/* These macros are called by the macros above to invoke the appropriate API. */
+/* These macros do not need to change when a new attribute is introduced. */
+/******************************************************************************/
+
+/* global get uint8_t 1D array macro */
+#define PLAT_ATTR_GET_UINT8_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayShort<ID##_Type, static_cast<fapi2::TargetType>(ID##_TargetTypes), ID> \
+ (ID, PTARGET, VAL)
+
+/* global set uint8_t 1D array macro */
+#define PLAT_ATTR_SET_UINT8_1D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayShort<ID##_Type, static_cast<fapi2::TargetType>(ID##_TargetTypes), ID> \
+ (ID, PTARGET, VAL)
+
+/* global get uint8_t 2D array macro */
+#define PLAT_ATTR_GET_UINT8_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayShort(ID, PTARGET, VAL[0])
+/* global set uint8_t 2D array macro */
+#define PLAT_ATTR_SET_UINT8_2D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayShort(ID, PTARGET, VAL[0])
+
+/* global get uint8_t 3D array macro */
+#define PLAT_ATTR_GET_UINT8_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayShort(ID, PTARGET, VAL[0][0])
+/* global set uint8_t 3D array macro */
+#define PLAT_ATTR_SET_UINT8_3D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayShort(ID, PTARGET, VAL[0][0])
+
+/* global get uint8_t 4D array macro */
+#define PLAT_ATTR_GET_UINT8_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayShort(ID, PTARGET, VAL[0][0][0])
+/* global set uint8_t 4D array macro */
+#define PLAT_ATTR_SET_UINT8_4D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayShort(ID, PTARGET, VAL[0][0][0])
+
+/* global get uint32_t 1D array macro */
+#define PLAT_ATTR_GET_UINT32_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayWord(ID, PTARGET, VAL)
+/* global set uint32_t 1D array macro */
+#define PLAT_ATTR_SET_UINT32_1D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayWord(ID, PTARGET, VAL)
+
+/* global get uint32_t 2D array macro */
+#define PLAT_ATTR_GET_UINT32_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayWord(ID, PTARGET, VAL[0])
+/* global set uint32_t 2D array macro */
+#define PLAT_ATTR_SET_UINT32_2D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayWord(ID, PTARGET, VAL[0])
+
+/* global get uint32_t 3D array macro */
+#define PLAT_ATTR_GET_UINT32_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayWord(ID, PTARGET, VAL[0][0])
+/* global set uint32_t 3D array macro */
+#define PLAT_ATTR_SET_UINT32_3D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayWord(ID, PTARGET, VAL[0][0])
+
+/* global get uint32_t 4D array macro */
+#define PLAT_ATTR_GET_UINT32_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayWord(ID, PTARGET, VAL[0][0][0])
+/* global set uint32_t 4D array macro */
+#define PLAT_ATTR_SET_UINT32_4D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayWord(ID, PTARGET, VAL[0][0][0])
+
+
+/* global get uint64_t 1D array macro */
+#define PLAT_ATTR_GET_UINT64_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayDoubleWord(ID, PTARGET, VAL)
+/* global set uint64_t 1D array macro */
+#define PLAT_ATTR_SET_UINT64_1D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayDoubleWord(ID, PTARGET, VAL)
+
+/* global get uint64_t 2D array macro */
+#define PLAT_ATTR_GET_UINT64_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayDoubleWord(ID, PTARGET, VAL[0])
+/* global set uint64_t 2D array macro */
+#define PLAT_ATTR_SET_UINT64_2D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayDoubleWord(ID, PTARGET, VAL[0])
+
+/* global get uint64_t 3D array macro */
+#define PLAT_ATTR_GET_UINT64_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayDoubleWord(ID, PTARGET, VAL[0][0])
+/* global set uint64_t 3D array macro */
+#define PLAT_ATTR_SET_UINT64_3D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayDoubleWord(ID, PTARGET, VAL[0][0])
+
+/* global get uint64_t 4D array macro */
+#define PLAT_ATTR_GET_UINT64_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeArrayDoubleWord(ID, PTARGET, VAL[0][0][0])
+/* global set uint64_t 4D array macro */
+#define PLAT_ATTR_SET_UINT64_4D_ARRAY(ID, PTARGET, VAL) \
+ _setAttributeArrayDoubleWord(ID, PTARGET, VAL[0][0][0])
+
+/* global get int macro (uint8_t, 16, 32 and 64) */
+#define PLAT_ATTR_GET_GLOBAL_INT(ID, PTARGET, VAL) \
+ _get<ID##_Type, static_cast<fapi2::TargetType>(ID##_TargetTypes), ID> \
+ (ID, PTARGET, VAL)
+
+/* global set int macro (uint8_t, 16, 32 and 64) */
+#define PLAT_ATTR_SET_GLOBAL_INT(ID, PTARGET, VAL) \
+ _set<ID##_Type, static_cast<fapi2::TargetType>(ID##_TargetTypes), ID> \
+ (ID, PTARGET, VAL)
+
+
+//here
+
+/******************************************************************************/
+// Get Override Macros
+/******************************************************************************/
+/* global get override uint8_t 1D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT8_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayShort(ID, PTARGET, VAL)
+/* global get override uint8_t 2D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT8_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayShort(ID, PTARGET, VAL[0])
+/* global get override uint8_t 3D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT8_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayShort(ID, PTARGET, VAL[0][0])
+/* global get override uint8_t 4D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT8_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayShort(ID, PTARGET, VAL[0][0][0])
+
+
+/* global get override uint32_t 1D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT32_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayWord(ID, PTARGET, VAL)
+/* global get override uint32_t 2D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT32_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayWord(ID, PTARGET, VAL[0])
+/* global get override uint32_t 3D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT32_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayWord(ID, PTARGET, VAL[0][0])
+/* global get override uint32_t 4D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT32_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayWord(ID, PTARGET, VAL[0][0][0])
+
+
+/* global get override uint64_t 1D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT64_1D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayDoubleWord(ID, PTARGET, VAL)
+/* global get override uint64_t 2D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT64_2D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayDoubleWord(ID, PTARGET, VAL[0])
+/* global get override uint64_t 3D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT64_3D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayDoubleWord(ID, PTARGET, VAL[0][0])
+/* global get override uint64_t 4D array macro */
+#define PLAT_ATTR_GET_OVERRIDE_UINT64_4D_ARRAY(ID, PTARGET, VAL) \
+ _getAttributeOverrideArrayDoubleWord(ID, PTARGET, VAL[0][0][0])
+
+/* global get override int macro (uint8_t, 32 and 64) */
+#define PLAT_ATTR_GET_OVERRIDE_GLOBAL_INT(ID, PTARGET, VAL) \
+ _getOverride<ID##_Type>(ID, PTARGET, VAL)
+
+/******************************************************************************/
+// Get string
+/******************************************************************************/
+
+extern "C"
+{
+ extern fapi2attr::SystemAttributes_t G_system_attributes asm("G_system_attributes") __attribute__ ((section (".fixed")));
+ extern fapi2attr::ProcChipAttributes_t G_proc_chip_attributes asm("G_proc_chip_attributes") __attribute__ ((section (".fixed")));
+ extern fapi2attr::PervAttributes_t G_perv_attributes asm("G_perv_attributes") __attribute__ ((section (".fixed")));
+ extern fapi2attr::CoreAttributes_t G_core_attributes asm("G_core_attributes") __attribute__ ((section (".fixed")));
+ extern fapi2attr::EQAttributes_t G_eq_attributes asm("G_eq_attributes") __attribute__ ((section (".fixed")));
+ extern fapi2attr::EXAttributes_t G_ex_attributes asm("G_ex_attributes") __attribute__ ((section (".fixed")));
+
+ extern fapi2attr::SystemAttributes_t* G_system_attributes_ptr;
+ extern fapi2attr::ProcChipAttributes_t* G_proc_chip_attributes_ptr;
+ extern fapi2attr::PervAttributes_t* G_perv_attributes_ptr;
+ extern fapi2attr::CoreAttributes_t* G_core_attributes_ptr;
+ extern fapi2attr::EQAttributes_t* G_eq_attributes_ptr;
+ extern fapi2attr::EXAttributes_t* G_ex_attributes_ptr;
+
+}
+
+namespace fapi2
+{
+
+
+// Parameters are done as pointers (vs references) to allow the attribute
+// storage to be relocated
+template<TargetType K, typename TAttrStruct, typename TValue, AttributeId AId>
+void __set( const Target<K>& i_ptarget, TAttrStruct* object, const AttributeId attrid, const TValue& value );
+
+template<TargetType K, typename TAttrStruct, typename TValue, AttributeId AId>
+void __get( const Target<K>& i_ptarget, const TAttrStruct* object, const AttributeId attrid, TValue* value );
+
+
+/* INSERT NEW GETTER AND SETTER FUNCTIONS HERE */
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_BACKUP_SEEPROM_SELECT> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint8_t, fapi2::ATTR_CHIP_UNIT_POS> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EQ, fapi2attr::EQAttributes_t, uint32_t, fapi2::ATTR_DPLL_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_ptarget, const fapi2attr::EQAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_FABRIC_SYSTEM_ID> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_MC_SYNC_MODE> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC00> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC01> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC02> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC03> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC04> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC05> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC06> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC07> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC08> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC09> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC10> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC11> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC12> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC13> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC14> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC15> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC16> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC17> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC18> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC19> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC20> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC21> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC22> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC23> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ4> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ5> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_FSI> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_MC01> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_MC23> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PRV> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_XB> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_PLL_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const int32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const int32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int64_t, fapi2::ATTR_SCRATCH_INT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int64_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int64_t, fapi2::ATTR_SCRATCH_INT64_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int64_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int8_t, fapi2::ATTR_SCRATCH_INT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int8_t, fapi2::ATTR_SCRATCH_INT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint64_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint64_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint64_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint8_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint8_t& i_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_SYSTEM, fapi2attr::SystemAttributes_t, uint8_t, fapi2::ATTR_SYSTEM_IPL_PHASE> ( const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& i_ptarget, const fapi2attr::SystemAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue );
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue );
+
+
+
+//******************************************************************************
+// Get base template
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ T& o_value)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get uint8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t& o_value)
+{
+ static_assert(std::is_same<T, uint8_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get uint16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint16_t& o_value)
+{
+ static_assert(std::is_same<T, uint16_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get uint32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint32_t& o_value)
+{
+ static_assert(std::is_same<T, uint32_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get uint64_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint64_t& o_value)
+{
+ static_assert(std::is_same<T, uint64_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override uint8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t& o_value)
+{
+ static_assert(std::is_same<T, uint8_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override uint16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint16_t& o_value)
+{
+ static_assert(std::is_same<T, uint16_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override uint32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint32_t& o_value)
+{
+ static_assert(std::is_same<T, uint32_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override uint64_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint64_t& o_value)
+{
+ static_assert(std::is_same<T, uint64_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get override EC Feature (uint8_t)
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getEcFeatureOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t& o_value)
+{
+ static_assert(std::is_same<T, uint8_t>::value, "Attribute type mismatch");
+
+ // The way this is implemented, we want to return a non-zero return code if we found an override.
+ // Return 0 if there was an error.
+ // This is how it's implemented:
+ // PLAT_GET_CHIP_EC_FEATURE_OVERRIDE(ID, PTARGET, VAL) ? fapi::FAPI_RC_SUCCESS : fapi::fapiQueryChipEcFeature(fapi::ID, PTARGET, VAL)
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get uint8_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeArrayShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t * o_pValues)
+{
+// fapi2::Attributeta o_data;
+// fapi2::ReturnCode l_fapi_rc(FAPI2_RC_SUCCESS);
+// uint32_t l_ecmd_rc = ECMD_SUCCESS;
+//
+// ecmdChipTarget l_ecmd_target;
+// fapiTargetPointerToEcmdTarget(i_pTarget, l_ecmd_target);
+//
+// o_data.faValidMask = FAPI_ATTRIBUTE_TYPE_UINT8ARY;
+// o_data.faUint8ary = o_pValues;
+//
+// l_ecmd_rc = fapi2GetAttribute(l_ecmd_target, i_id, o_data);
+// if (l_ecmd_rc)
+// {
+// l_fapi_rc = (ReturnCodes) l_ecmd_rc;
+// }
+// return l_fapi_rc;
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set uint8_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _setAttributeArrayShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t * i_pValues)
+{
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, *i_pValues );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, *i_pValues );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, *i_pValues );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, *i_pValues );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, *i_pValues );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, *i_pValues );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get uint16_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint16_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set uint16_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _setAttributeArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint16_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get uint32_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint32_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set uint32_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _setAttributeArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint32_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get uint64_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeArrayDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint64_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set uint64_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _setAttributeArrayDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint64_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override uint8_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeOverrideArrayShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint8_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override uint16_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeOverrideArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint16_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override uint32_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeOverrideArrayWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint32_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override uint64_t array
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getAttributeOverrideArrayDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ uint64_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set base template
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const T& i_value)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+
+//******************************************************************************
+// Set uint8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const uint8_t& i_value)
+{
+ static_assert(std::is_same<T, uint8_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set uint16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const uint16_t& i_value)
+{
+ static_assert(std::is_same<T, uint16_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set uint32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const uint32_t& i_value)
+{
+ static_assert(std::is_same<T, uint32_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id,i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set uint64_t
+//******************************************************************************
+
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const uint64_t & i_value)
+{
+ static_assert(std::is_same<T, uint64_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get int8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int8_t& o_value)
+{
+ static_assert(std::is_same<T, int8_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get int16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int16_t& o_value)
+{
+ static_assert(std::is_same<T, int16_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get int32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int32_t& o_value)
+{
+ static_assert(std::is_same<T, int32_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __get<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get int64_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _get(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int64_t& o_value)
+{
+ static_assert(std::is_same<T, int64_t>::value, "Attribute type mismatch");
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __get<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __get<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __get<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __get<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, &o_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __get<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, &o_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override int8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int8_t& o_value)
+{
+ static_assert(std::is_same<T, int8_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int16_t& o_value)
+{
+ static_assert(std::is_same<T, int16_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int32_t& o_value)
+{
+ static_assert(std::is_same<T, int32_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int64_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _getOverride(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int64_t& o_value)
+{
+ static_assert(std::is_same<T, int64_t>::value, "Attribute type mismatch");
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get int8_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeArraySignedShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int8_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set int8_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _setAttributeArraySignedShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int8_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get int16_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int16_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set int16_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _setAttributeArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int16_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get int32_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int32_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set int32_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _setAttributeArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int32_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get int64_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeArraySignedDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int64_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set int64_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _setAttributeArraySignedDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int64_t * i_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int8_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeOverrideArraySignedShort(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int8_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int16_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeOverrideArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int16_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Get Override int32_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeOverrideArraySignedWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int32_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Get Override int64_t array
+//******************************************************************************
+template<TargetType K>
+ReturnCode _getAttributeOverrideArraySignedDoubleWord(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ int64_t * o_pValues)
+{
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set int8_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const int8_t& i_value)
+{
+ static_assert(std::is_same<T, int8_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set int16_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const int16_t& i_value)
+{
+ static_assert(std::is_same<T, int16_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+//******************************************************************************
+// Set int32_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const int32_t& i_value)
+{
+ static_assert(std::is_same<T, int32_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+//******************************************************************************
+// Set int64_t
+//******************************************************************************
+template<typename T, TargetType K, AttributeId A>
+ReturnCode _set(const AttributeId i_id,
+ const Target<K> & i_pTarget,
+ const int64_t & i_value)
+{
+ static_assert(std::is_same<T, int64_t>::value, "Attribute type mismatch"); // May need to remove
+
+ if(K & TARGET_TYPE_SYSTEM)
+ {
+ __set<K, fapi2attr::SystemAttributes_t, T, A>( i_pTarget, G_system_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PROC_CHIP)
+ {
+ __set<K, fapi2attr::ProcChipAttributes_t, T, A>( i_pTarget, G_proc_chip_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_PERV)
+ {
+ __set<K, fapi2attr::PervAttributes_t, T, A>( i_pTarget, G_perv_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_CORE)
+ {
+ __set<K, fapi2attr::CoreAttributes_t, T, A>( i_pTarget, G_core_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EQ)
+ {
+ __set<K, fapi2attr::EQAttributes_t, T, A>( i_pTarget, G_eq_attributes_ptr, i_id, i_value );
+ }
+
+ if(K & TARGET_TYPE_EX)
+ {
+ __set<K, fapi2attr::EXAttributes_t, T, A>( i_pTarget, G_ex_attributes_ptr, i_id, i_value );
+ }
+
+ return FAPI2_RC_SUCCESS;
+}
+
+
+} // namespace fapi2
+#endif // FAPIPLATATTRIBUTESERVICE_H_
diff --git a/hwpf/plat/include/fapi2Structs.H b/hwpf/include/fapi2Structs.H
index 48d8062e..48d8062e 100644
--- a/hwpf/plat/include/fapi2Structs.H
+++ b/hwpf/include/fapi2Structs.H
diff --git a/hwpf/plat/include/fapi2_hw_access.H b/hwpf/include/fapi2_hw_access.H
index 44a592f8..44a592f8 100644
--- a/hwpf/plat/include/fapi2_hw_access.H
+++ b/hwpf/include/fapi2_hw_access.H
diff --git a/hwpf/plat/include/fapi2_target.H b/hwpf/include/fapi2_target.H
index 32b68618..32b68618 100644
--- a/hwpf/plat/include/fapi2_target.H
+++ b/hwpf/include/fapi2_target.H
diff --git a/hwpf/plat/include/hwp_ffdc_classes.H b/hwpf/include/hwp_ffdc_classes.H
index e69de29b..e69de29b 100644
--- a/hwpf/plat/include/hwp_ffdc_classes.H
+++ b/hwpf/include/hwp_ffdc_classes.H
diff --git a/hwpf/plat/include/hw_access.H b/hwpf/include/plat/hw_access.H
index 047176a7..047176a7 100644
--- a/hwpf/plat/include/hw_access.H
+++ b/hwpf/include/plat/hw_access.H
diff --git a/hwpf/plat/include/hwp_executor.H b/hwpf/include/plat/hwp_executor.H
index 5a451081..5a451081 100644
--- a/hwpf/plat/include/hwp_executor.H
+++ b/hwpf/include/plat/hwp_executor.H
diff --git a/hwpf/plat/include/plat_attributes.H b/hwpf/include/plat/plat_attributes.H
index 894d516d..894d516d 100644
--- a/hwpf/plat/include/plat_attributes.H
+++ b/hwpf/include/plat/plat_attributes.H
diff --git a/hwpf/plat/include/plat_error_scope.H b/hwpf/include/plat/plat_error_scope.H
index a2de6bd5..a2de6bd5 100644
--- a/hwpf/plat/include/plat_error_scope.H
+++ b/hwpf/include/plat/plat_error_scope.H
diff --git a/hwpf/plat/include/plat_hw_access.H b/hwpf/include/plat/plat_hw_access.H
index 7d8e3c86..7d8e3c86 100644
--- a/hwpf/plat/include/plat_hw_access.H
+++ b/hwpf/include/plat/plat_hw_access.H
diff --git a/hwpf/plat/include/plat_includes.H b/hwpf/include/plat/plat_includes.H
index 97074b67..97074b67 100644
--- a/hwpf/plat/include/plat_includes.H
+++ b/hwpf/include/plat/plat_includes.H
diff --git a/hwpf/plat/include/plat_target.H b/hwpf/include/plat/plat_target.H
index 1e6a5b70..3e28c1da 100644
--- a/hwpf/plat/include/plat_target.H
+++ b/hwpf/include/plat/plat_target.H
@@ -1,25 +1,19 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: $ */
+/* $Source: hwpf/fapi2/include/plat_target.H $ */
/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
+/* IBM CONFIDENTIAL */
/* */
+/* EKB Project */
/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
+/* COPYRIGHT 2012,2015 */
+/* [+] International Business Machines Corp. */
/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
+/* 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 */
/**
@@ -30,7 +24,7 @@
#ifndef __FAPI2_PLAT_TARGET__
#define __FAPI2_PLAT_TARGET__
-#include <return_code.H>
+#include <stdint.h>
//
// Define what a platform handle looks like. For Hostboot,
@@ -39,7 +33,7 @@
//
namespace fapi2
{
- typedef uint64_t plat_target_handle_t;
+typedef uint64_t plat_target_handle_t;
+}
-}
#endif
diff --git a/hwpf/plat/include/plat_target_definitions.H b/hwpf/include/plat/plat_target_definitions.H
index c2ec0518..c2ec0518 100644
--- a/hwpf/plat/include/plat_target_definitions.H
+++ b/hwpf/include/plat/plat_target_definitions.H
diff --git a/hwpf/plat/include/plat_target_parms.H b/hwpf/include/plat/plat_target_parms.H
index ab78a3c5..0c6c5c67 100644
--- a/hwpf/plat/include/plat_target_parms.H
+++ b/hwpf/include/plat/plat_target_parms.H
@@ -51,7 +51,7 @@ CONST_UINT32_T(CORE_TARGET_OFFSET, EQ_TARGET_OFFSET + EQ_TARGET_COUNT);
CONST_UINT32_T(CORE_CHIPLET_OFFSET, 0x20);
CONST_UINT32_T(CORE_TARGET_COUNT, 24);
-// MCS Targets (note: these are phyically Pervastive targets)
+// MCS Targets (note: these are phyically Pervasive targets)
CONST_UINT32_T(MCS_TARGET_OFFSET, CORE_TARGET_OFFSET + CORE_TARGET_COUNT);
CONST_UINT32_T(MCS_CHIPLET_OFFSET, 0x7);
CONST_UINT32_T(MCS_TARGET_COUNT, 2);
@@ -63,12 +63,71 @@ CONST_UINT32_T(EX_TARGET_COUNT, 12);
CONST_UINT32_T(SYSTEM_TARGET_OFFSET, EX_TARGET_OFFSET + EX_TARGET_COUNT);
CONST_UINT32_T(SYSTEM_TARGET_COUNT, 1);
+CONST_UINT32_T(MCAST_TARGET_OFFSET, SYSTEM_TARGET_OFFSET + SYSTEM_TARGET_COUNT);
+CONST_UINT32_T(MCAST_CHIPLET_OFFSET, 0);
+CONST_UINT32_T(MCAST_TARGET_COUNT, 7); // 0 - 6
+
+// Total Target Count
CONST_UINT32_T(TARGET_COUNT, CHIP_TARGET_COUNT +
PERV_TARGET_COUNT +
EQ_TARGET_COUNT +
CORE_TARGET_COUNT +
MCS_TARGET_COUNT +
EX_TARGET_COUNT +
- SYSTEM_TARGET_COUNT);
+ SYSTEM_TARGET_COUNT +
+ MCAST_TARGET_COUNT);
+
+/*
+enum TargetFilter
+{
+ TARGET_FILTER_ALL_NEST ,
+ TARGET_FILTER_NEST_NORTH ,
+ TARGET_FILTER_NEST_SOUTH ,
+ TARGET_FILTER_NEST_EAST ,
+ TARGET_FILTER_NEST_WEST ,
+ TARGET_FILTER_XBUS ,
+ TARGET_FILTER_ALL_OBUS ,
+ TARGET_FILTER_OBUS0 ,
+ TARGET_FILTER_OBUS1 ,
+ TARGET_FILTER_OBUS2 ,
+ TARGET_FILTER_OBUS3 ,
+ TARGET_FILTER_ALL_PCI ,
+ TARGET_FILTER_PCI0 ,
+ TARGET_FILTER_PCI1 ,
+ TARGET_FILTER_PCI2 ,
+ TARGET_FILTER_ALL_EC ,
+ TARGET_FILTER_ALL_EP ,
+ TARGET_FILTER_ALL_MC ,
+ TARGET_FILTER_MC_WEST ,
+ TARGET_FILTER_MC_EAST ,
+ TARGET_FILTER_TP ,
+};
+// The order of this MUST match the order of the TargetFilter enum above
+// The bit vectors represent
+const uint64_t TargetFilters[] =
+{
+ BITS(2,4), // TARGET_FILTER_ALL_NEST
+ BIT(2), // TARGET_FILTER_NEST_NORTH
+ BIT(3), // TARGET_FILTER_NEST_SOUTH
+ BIT(4), // TARGET_FILTER_NEST_EAST
+ BIT(5), // TARGET_FILTER_NEST_WEST
+ BIT(6), // TARGET_FILTER_XBUS
+ BITS(9,4), // TARGET_FILTER_ALL_OBUS
+ BIT(9), // TARGET_FILTER_OBUS0
+ BIT(10), // TARGET_FILTER_OBUS1
+ BIT(11), // TARGET_FILTER_OBUS2
+ BIT(12), // TARGET_FILTER_OBUS3
+ BITS(13,3), // TARGET_FILTER_ALL_PCI
+ BIT(12), // TARGET_FILTER_PCI0
+ BIT(13), // TARGET_FILTER_PCI1
+ BIT(14), // TARGET_FILTER_PCI2
+ BITS(32,24), // TARGET_FILTER_ALL_EC
+ BITS(16,6), // TARGET_FILTER_ALL_EP
+ BITS(7,2), // TARGET_FILTER_ALL_MC
+ BIT(7), // TARGET_FILTER_MC_WEST
+ BIT(8), // TARGET_FILTER_MC_EAST
+ BIT(1), // TARGET_FILTER_TP
+};
+*/
#endif // __FAPI2_PPE_TARGET_PARMS__
diff --git a/hwpf/plat/include/plat_target_pg_attributes.H b/hwpf/include/plat/plat_target_pg_attributes.H
index e27a1784..e27a1784 100644
--- a/hwpf/plat/include/plat_target_pg_attributes.H
+++ b/hwpf/include/plat/plat_target_pg_attributes.H
diff --git a/hwpf/plat/include/plat_target_utils.H b/hwpf/include/plat/plat_target_utils.H
index e1e360c0..e1e360c0 100644
--- a/hwpf/plat/include/plat_target_utils.H
+++ b/hwpf/include/plat/plat_target_utils.H
diff --git a/hwpf/plat/include/plat_trace.H b/hwpf/include/plat/plat_trace.H
index 423ef6ea..423ef6ea 100644
--- a/hwpf/plat/include/plat_trace.H
+++ b/hwpf/include/plat/plat_trace.H
diff --git a/hwpf/plat/include/target.H b/hwpf/include/plat/target.H
index 0c40642b..0c40642b 100644
--- a/hwpf/plat/include/target.H
+++ b/hwpf/include/plat/target.H
diff --git a/hwpf/include/plat/target.apis b/hwpf/include/plat/target.apis
new file mode 100644
index 00000000..3490c05e
--- /dev/null
+++ b/hwpf/include/plat/target.apis
@@ -0,0 +1,11 @@
+
+inline Target<T> Target<K, V>::getParent(void) const
+
+Target<K, V>::getChildren(const TargetState i_state) const
+
+Target<K, V>::getOtherEnd(const TargetState i_state) const
+
+inline void toString(const Target<T>& i_target, char* i_buffer, size_t i_bsize)
+
+inline Target<T> getTarget(uint64_t Ordinal)
+
diff --git a/hwpf/plat/include/return_code.H b/hwpf/include/return_code.H
index fd2f7c29..fd2f7c29 100644
--- a/hwpf/plat/include/return_code.H
+++ b/hwpf/include/return_code.H
diff --git a/hwpf/plat/include/set_sbe_error.H b/hwpf/include/set_sbe_error.H
index e69de29b..e69de29b 100644
--- a/hwpf/plat/include/set_sbe_error.H
+++ b/hwpf/include/set_sbe_error.H
diff --git a/hwpf/plat/include/target_types.H b/hwpf/include/target_types.H
index 56470cd0..56470cd0 100644
--- a/hwpf/plat/include/target_types.H
+++ b/hwpf/include/target_types.H
diff --git a/hwpf/plat/include/utils.H b/hwpf/include/utils.H
index 69e84d20..69dc5838 100644
--- a/hwpf/plat/include/utils.H
+++ b/hwpf/include/utils.H
@@ -31,6 +31,8 @@
#ifndef FAPI2_UTILS_H_
#define FAPI2_UTILS_H_
+#include <return_code.H>
+
#ifdef __ASSEMBLER__
#ifndef ULL
diff --git a/hwpf/include/vector.H b/hwpf/include/vector.H
new file mode 100644
index 00000000..c5b3e410
--- /dev/null
+++ b/hwpf/include/vector.H
@@ -0,0 +1,849 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/vector $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef stl_vector
+#define stl_vector
+
+/**
+ * @file vector
+ * @brief simple stl vector template class declaration.
+ */
+
+#include <stddef.h>
+
+#if !defined( __STDC_LIMIT_MACROS)
+#define __STDC_LIMIT_MACROS
+#endif
+#include <stdint.h>
+//#include <new>
+#include <algorithm>
+#include <assert.h>
+
+namespace std
+{
+
+ /**
+ * @class vector
+ * subset of stl vector
+ * @note Does not support allocators, reverse iterators.
+ */
+ template <class T>
+ class vector
+ {
+ public:
+
+ typedef T * iterator;
+ typedef const T * const_iterator;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef size_t size_type;
+ typedef size_t difference_type;
+ // typedef ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T * pointer;
+ typedef const T * const_pointer;
+
+
+ protected:
+
+ pointer iv_start;
+ pointer iv_finish;
+ pointer iv_end_of_storage;
+
+ public:
+
+ /**
+ * Constructor default
+ * @post The vector is created with no elements. size() == 0, capacity() == 0
+ */
+ __attribute__ ((always_inline))
+ explicit vector(void)
+ :
+ iv_start(NULL),
+ iv_finish(NULL),
+ iv_end_of_storage(NULL)
+ {}
+
+
+ /**
+ * Constructor to create a vector of size n elements of value.
+ * @param[in] n number of elements to create
+ * @param[in] value used to create the n elements
+ * @post The vector is created with n elements of value.
+ * Storage allocated. size() == n, capacity() == n
+ */
+ explicit vector(size_type n, const T& value = T())
+ :
+ iv_start(NULL),
+ iv_finish(NULL),
+ iv_end_of_storage(NULL)
+ {
+ reserve(n);
+ iv_finish = iv_start+n;
+ ctor_fill(iv_start,iv_finish,value);
+ }
+
+
+ /**
+ * COPY CTOR create a vector from another vector
+ * @param[in] x source vector
+ * @post vector of x.size() is created from x with same # nodes
+ * size() == capacity() == x.size()
+ */
+ vector(const vector<T>& x)
+ :
+ iv_start(NULL),
+ iv_finish(NULL),
+ iv_end_of_storage(NULL)
+ {
+ reserve(x.size());
+ iv_finish = ctor_copy(x.iv_start, x.iv_finish, iv_start);
+ }
+
+ /**
+ * CTOR create a vector from a container slice
+ * @param[in] first iterator first in source sequence
+ * @param[in] last iterator one past end of source sequence
+ * @returns None.
+ * @pre last > first; first,last contained within source vector
+ * @post vector is created from slice given
+ */
+ template<typename InputIterator>
+ vector(InputIterator first, InputIterator last)
+ :
+ iv_start(NULL),
+ iv_finish(NULL),
+ iv_end_of_storage(NULL)
+ {
+ // assert(last >= first);
+ // input iterators only support operator ( ++i, i++,==,!=,*,->,=)
+ size_type n = 0;
+ for(InputIterator i = first; i != last; ++i) ++n;
+ reserve(n);
+ iv_finish = ctor_copy(first,last,iv_start);
+ }
+
+ /**
+ * DTOR
+ * @post Storage released
+ */
+ __attribute__ ((always_inline))
+ ~vector()
+ {
+ clear(); // call dtors
+ free_storage(iv_start);
+ }
+
+ /**
+ * Assignment operator.
+ * @param[in] x A vector.
+ * @return A vector (for the purpose of multiple assigns).
+ * @pre None.
+ * @post *this == x, this->capacity() == x.size().
+ * All previously obtained iterators are invalid.
+ */
+ vector<T>& operator=(const vector<T>& x)
+ {
+ clear();
+ reserve(x.size());
+ iv_finish = ctor_copy(x.iv_start, x.iv_finish, iv_start);
+ return(*this);
+ }
+
+ // Iterators --------------------
+
+ /**
+ * Get iterator to the first vector element
+ * @return iterator of rist vector element
+ * @pre None.
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ iterator begin()
+ {
+ return (iv_start);
+ }
+
+ /**
+ * Get const_iterator to the first vector element
+ * @return const_iterator of rist vector element
+ * @pre None.
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ const_iterator begin() const
+ {
+ return (iv_start);
+ }
+
+ /**
+ * Get iterator to the last vector element + 1
+ * @return iterator
+ * @pre None.
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ iterator end()
+ {
+ return (iv_finish);
+ }
+
+ /**
+ * Get const_iterator to the last vector element + 1
+ * @return const_iterator
+ * @pre None.
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ const_iterator end() const
+ {
+ return (iv_finish);
+ }
+
+ /* TODO - Implement only if needed
+ reverse_iterator rbegin()
+ {
+ return(iv_finish -1);
+ }
+
+ const_reverse_iterator rend()
+ {
+ return (iv_start - 1);
+ }
+ */
+
+ // Capacity -----------------------------------------------
+
+ /**
+ * Get the number of elements in the container
+ * @return number of elements in the container
+ */
+ __attribute__ ((always_inline))
+ size_type size() const
+ {
+ return(iv_finish - iv_start);
+ }
+
+ /**
+ * Return the maximum potential size the container could reach.
+ * @return number of the maximum element count this container could reach
+ */
+ __attribute__ ((always_inline))
+ size_type max_size() const
+ {
+ return UINT64_MAX/sizeof(T);
+ }
+
+ /**
+ * Resize the vector to contain n elements
+ * @param[in] n new size
+ * @param[in] x object used to copy to any added elements if size() is increased
+ * @post All previously obtained iterators are invalid.
+ * @node if n < size(), vector is truncated.
+ * if n > size(), vector is padded with copies of x
+ */
+ void resize( size_type n, T x = T());
+
+ /**
+ * Get the number of elements the vector can hold before needing to reallocate storage.
+ * @return element capacity of the vector
+ * @pre None.
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ size_type capacity() const
+ {
+ return(iv_end_of_storage - iv_start);
+ }
+
+ /**
+ * Query for empty container
+ * @return bool, true if size()==0 else false.
+ * @pre none
+ * @post none
+ */
+ __attribute__ ((always_inline))
+ bool empty() const
+ {
+ return(size() == 0);
+ }
+
+ /**
+ * Reserve storage for a given number of elements
+ * @param[in] n The requested capacity of the vector
+ * @pre None
+ * @post If current cpacity() < n then new capcity == n; else no change.
+ * All previously obtained iterators are invalid
+ */
+ void reserve(size_type n);
+
+ // - Element Access -----------------------------------
+
+ /**
+ * Access a mutable reference to an element in the container
+ * @param An index into the vector
+ * @return A reference to an element
+ * @pre 0 <= n < size()
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ reference operator[](size_type n)
+ {
+ return(*(iv_start + n));
+ }
+
+ /**
+ * Access a mutable reference to an element in the container
+ * @param[in] index An index into the vector
+ * @return A reference to an element
+ * @pre 0 <= n < size()
+ * @post None.
+ * @note no exception handling
+ */
+ __attribute__ ((always_inline))
+ reference at(size_type index)
+ {
+ assert(index < size());
+ return(*(iv_start + index));
+ }
+
+ /**
+ * Get an immutable reference to an element in the container
+ * @param[in] index An index into the vector
+ * @return A const_reference to an object or type T
+ * @pre 0 <= n < size()
+ * @post None.
+ */
+ __attribute__ ((always_inline))
+ const_reference operator[](size_type index) const
+ {
+ assert(index < size());
+ return(*(iv_start + index));
+ }
+
+ /**
+ * Get an immutable reference to an element in the container
+ * @param[in] index An index into the vector
+ * @return A const_reference to an object or type T
+ * @pre 0 <= n < size()
+ * @post None.
+ * @note no exception handling
+ */
+ __attribute__ ((always_inline))
+ const_reference at(size_type index) const
+ {
+ assert(index < size());
+ return(*(iv_start + index));
+ }
+
+ /**
+ * Get a mutable reference to the first element in the container
+ * @return reference to first element
+ * @pre none
+ * @post None
+ */
+ __attribute__ ((always_inline))
+ reference front()
+ {
+ return *iv_start;
+ }
+
+ /**
+ * Get an Immutable reference to the first element in the container
+ * @return const_reference to first element
+ * @pre none
+ * @post None
+ */
+ __attribute__ ((always_inline))
+ const_reference front() const
+ {
+ return *iv_start;
+ }
+
+ /**
+ * Get a mutable reference to the last element in the container
+ * @return reference to last element
+ * @pre none
+ * @post None
+ */
+ __attribute__ ((always_inline))
+ reference back()
+ {
+ return *(iv_finish-1);
+ }
+
+ /**
+ * Get an Immutable reference to the last element in the container
+ * @return reference to last element
+ * @pre none
+ * @post None
+ */
+ __attribute__ ((always_inline))
+ const_reference back() const
+ {
+ return *(iv_finish-1);
+ }
+
+ // -- Modifiers -----------------------------
+
+ /*
+ * Assign new content to the vector object
+ * @param[n] first iterator to first element to copy in
+ * @param[n] last iterator to last element + 1 to copy in
+ */
+ template <class InputIterator>
+ void assign (InputIterator first, InputIterator last)
+ {
+ clear();
+ size_type n = 0;
+ for(InputIterator i = first; i != last; ++i) ++n;
+ reserve(n);
+ iv_finish = ctor_copy(first,last,iv_start);
+ }
+
+
+ /*
+ * Assign new content to the vector object
+ * @param[in] n number of elements to assign
+ * @param[in] x reference to element to copy in
+ */
+ void assign ( size_type n, const T& x)
+ {
+ clear();
+ reserve(n);
+ ctor_fill_n(iv_start,n,x);
+ iv_finish = iv_start + n;
+ }
+
+
+ /**
+ * Add element to the back of the container
+ * @param[in] x reference to object used to create new element
+ * @pre none
+ * @post All previously obtained iterators are invalid.
+ */
+ __attribute__ ((always_inline))
+ void push_back(const T& x)
+ {
+ reserve(size() + 1);
+ new (iv_finish++) T(x);
+ }
+
+ /**
+ * Remove the last element in the container
+ * @return nothing
+ * @pre size() > 0
+ * @post size() decreased by one
+ */
+ __attribute__ ((always_inline))
+ void pop_back()
+ {
+ erase(iv_finish-1,iv_finish);
+ }
+
+ /**
+ * Insert an element into the container at a given position
+ * @param[in] position iterator to position to insert
+ * @param[in] x reference of element to insert
+ * @pre begin() <= position < end()
+ * @post Element inserted at position, storage adjusted as needed.
+ * All previously obtained iterators are invalid.
+ */
+ iterator insert(iterator position, const T& x)
+ {
+ // iv_start will change if the vector gets resized - so save the offset for
+ // return.
+ difference_type offset = position - iv_start;
+ insert(position, 1, x);
+ return (iv_start + offset);
+ }
+
+ /**
+ * Insert a number of copies of a given elements at a given position
+ * @param[in] postion iterator, postion to insert elements
+ * @param[in] n number of elements to insert
+ * @param[in] x A reference to the object to uses to create the new elements
+ * @pre begin() <= postion < end()
+ * @post All previously obtained iterators are invalid.
+ */
+ void insert (iterator position, size_type n, const T& x);
+
+ /**
+ * Insert a slice into the current container at a given position
+ * @param[in] position iterator, position to insert slice
+ * @param[in] first iterator to first element of slice insert
+ * @param[in] last iterator to last element + 1 of slice to insert
+ * @pre begin() <= postion <= end(), first < last.
+ * @post Elements inserted at postition. Storage adjusted as needed.
+ * All previously obtained iterators are invalid.
+ * @note element pointed to by last is not inserted.
+ */
+ template <class InputIterator>
+ void insert (iterator position, InputIterator first,
+ InputIterator last);
+
+
+ /**
+ * Remove an element from the container
+ * @param[in] position iterator, position of element to remove
+ * @return new location of the element that followed the last
+ * element erased, or end() if the operation erased
+ * the last element in the sequence.
+ * @pre begin() <= position < end()
+ * @post All previously obtained iterators are invalid.
+ */
+ __attribute__ ((always_inline))
+ iterator erase(iterator position)
+ {
+ return erase(position,position+1);
+ }
+
+ /**
+ * Remove a slice of elements from the container
+ * @param[in] first iterator, postion of the first element to remove
+ * @param[in] last iterator, postion of the last element + 1 to remove
+ * @return new location of the element that followed the last
+ * element erased, or end() if the operation erased
+ * the last element in the sequence.
+ * @pre begin() <= first,last <= end(), first <= last.
+ * @post All previously obtained iterators are invalid.
+ * @note The element pointed to be last is not deleted.
+ */
+ iterator erase(iterator first, iterator last)
+ {
+ assert(last >= first);
+ assert(first >= iv_start);
+ assert(first <= iv_finish);
+ assert(last >= iv_start);
+ assert(last <= iv_finish);
+
+ last = copy(last,iv_finish,first);
+ while(last != iv_finish)
+ {
+ --iv_finish;
+ iv_finish->~T();
+ }
+ return first;
+ }
+
+
+ /**
+ * Swap this vector with another
+ * @param reference to another vector of this type
+ */
+ void swap(vector<T>& x)
+ {
+ std::swap(iv_start,x.iv_start);
+ std::swap(iv_finish,x.iv_finish);
+ std::swap(iv_end_of_storage,x.iv_end_of_storage);
+ }
+
+ /**
+ * Clear the vector
+ * @pre none.
+ * @post size() = 0, All previously obtained iterators are invalid
+ * @note capacity unchanged
+ */
+ void clear ()
+ {
+ while(iv_finish != iv_start)
+ {
+ --iv_finish;
+ (iv_finish)->~T();
+ }
+ }
+
+ private:
+
+ /**
+ * Copy constructs elements into raw storage
+ * @param[in] first iterator of first element to copy
+ * @pararm[in] last iterator of last element + 1 to copy
+ * @param[in] destination iterator of destination
+ * @post elements moved
+ */
+ template <class InputIterator, class OutputIterator>
+ OutputIterator
+ ctor_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator destination)
+ {
+ while(first != last)
+ {
+ new (destination) T(*first);
+ ++destination;
+ ++first;
+ }
+ return(destination);
+ }
+
+ /**
+ * Copy constructs elements into raw storage
+ * @param[in] first iterator of first element to copy
+ * @param[in] last iterator of last element + 1 to copy
+ * @param[in] destination iterator to end of destination + 1
+ * @post elements moved
+ */
+ template <class BidirectionalIterator1, class BidirectionalIterator2>
+ BidirectionalIterator2
+ ctor_copy_backward ( BidirectionalIterator1 first,
+ BidirectionalIterator1 last,
+ BidirectionalIterator2 destination)
+ {
+ while(last != first)
+ {
+ --destination;
+ --last;
+ new(destination) T(*last);
+ }
+ return destination;
+ }
+
+ /**
+ * fill by copy construct ino raw storage
+ * @param[in] first itertor fo first element
+ * @param[in] last iterator to last element + 1
+ * @param[in] value to use to fill
+ */
+ template < class ForwardIterator, class Tp >
+ void
+ ctor_fill (ForwardIterator first, ForwardIterator last, const Tp& value )
+ {
+ while (first != last)
+ {
+ new (first) T(value);
+ ++first;
+ }
+ }
+
+ /**
+ * fill by copy construct into raw storage
+ * @param[in] first iterator first location to fill
+ * @param[in] n number of elements to fill
+ * @param[in] value to use to fill
+ */
+ template < class OutputIterator, class Size, class Tp >
+ void
+ ctor_fill_n( OutputIterator first, Size n, const Tp& value )
+ {
+ for(; n>0; --n)
+ {
+ new (first) T(value);
+ ++first;
+ }
+ }
+
+
+ /**
+ * Free all the storage allocated to this vector
+ * @param[in] i_start iterator to start of storage block
+ */
+ __attribute__ ((always_inline))
+ void free_storage(iterator i_start)
+ {
+ delete [] (uint8_t *)i_start;
+ }
+
+ /**
+ * Allocate storage for this vector
+ * @param[in] n, number of elements required
+ */
+ __attribute__ ((always_inline))
+ iterator allocate_storage(size_type n)
+ {
+ return (iterator) new uint8_t[n * sizeof(T)];
+ }
+
+ /**
+ * debug dump
+ */
+ //void dump(const char * msg = "")
+ //{
+ // puts(msg);
+ // printf("vector_dump::start 0x%016lx finish 0x%016lx eos 0x%016lx\n",
+ // (uint64_t)iv_start, (uint64_t)iv_finish, (uint64_t)iv_end_of_storage);
+ //}
+ };
+
+}; // end namespace std
+
+// ------------------------------------------------------------------------------------------------
+
+template <class T>
+void std::vector<T>::reserve(size_type n)
+{
+ size_type c = capacity();
+ if(n > c)
+ {
+ // if requested new capacity < 10% of current capacity then increase by 10%
+ size_type dif = n - c;
+ size_type inc = 1 + (c/size_type(10));
+ if(dif < inc)
+ {
+ n += inc;
+ }
+
+ iterator newStart = allocate_storage(n);
+ if(NULL == iv_start)
+ {
+ iv_finish = newStart;
+ }
+ else
+ {
+ iterator newFinish = ctor_copy(iv_start, iv_finish, newStart);
+ clear();
+ iv_finish = newFinish;
+ free_storage(iv_start);
+ }
+ iv_end_of_storage = newStart + n;
+ iv_start = newStart;
+ }
+}
+
+
+// ------------------------------------------------------------------------------------------------
+
+template <class T>
+void std::vector<T>::insert (iterator position, size_type n, const T& x)
+{
+ //assert (position >= iv_start);
+ //assert (position <= iv_finish);
+ size_type new_size = size() + n;
+ if(position == end())
+ {
+ reserve(new_size);
+ while(n--) new (iv_finish++) T(x);
+ }
+ else if(new_size > capacity())
+ {
+ vector<T> new_vec;
+ new_vec.reserve(new_size);
+ for(const_iterator i = begin(); i != end(); ++i)
+ {
+ if(i == position)
+ {
+ while(n--) new_vec.push_back(x);
+ }
+ new_vec.push_back(*i);
+ }
+ swap(new_vec); // swap this with new_vec
+ }
+ else // already have enough space
+ {
+ size_type m = iv_finish - position; // # of existing elements to move
+ pointer new_finish = iv_finish + n;
+ if(m < n)
+ {
+ ctor_copy_backward(position,iv_finish,new_finish);
+ while(n--)
+ {
+ if(position < iv_finish) *position = x;
+ else new (position) T(x);
+ ++position;
+ }
+ }
+ else // n <= m
+ {
+ ctor_copy_backward(iv_finish-n,iv_finish,new_finish); // raw storage copy
+ copy_backward(position, iv_finish-n, iv_finish); // operator= copy
+ fill_n(position,n,x);
+ }
+ iv_finish = new_finish;
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+
+template <class T>
+template <class InputIterator>
+void std::vector<T>::insert (iterator position,
+ InputIterator first,
+ InputIterator last)
+// Should only move storage if there is not room
+// InputIterators are not random access (eg. can't do diff = last - first)
+{
+ size_type n = 0;
+ for(InputIterator i = first; i != last; ++i) ++n;
+ size_type new_size = size() + n;
+
+ if(position == end())
+ {
+ reserve(new_size);
+ iv_finish = ctor_copy(first,last,iv_finish);
+ }
+ else if(new_size > capacity()) // make a new vector
+ {
+ vector<T> new_vec;
+ new_vec.reserve(new_size);
+ for(const_iterator i = begin(); i != end(); ++i)
+ {
+ if(i == position)
+ {
+ while(n--) new_vec.push_back(*first++);
+ }
+ new_vec.push_back(*i);
+ }
+ swap(new_vec);
+ }
+ else // already have enough space
+ {
+ size_type m = iv_finish - position; // # of exising elements to adjust
+ if(m < n)
+ {
+ ctor_copy_backward(position,iv_finish,iv_finish+n); // cp all existing elements to raw storage
+ while(first != last)
+ {
+ if(position < iv_finish) *position = *first; // cp new elements to existing element locations
+ else new (position) T(*first); // cp remaining new elements to raw storage
+ ++position;
+ ++first;
+ }
+ }
+ else // n <= m
+ {
+ ctor_copy_backward(iv_finish-n, iv_finish, iv_finish+n); // cp existing elements to raw storage
+ copy_backward(position, iv_finish-n, iv_finish); // cp rest of existing elements to existing locations
+ copy(first,last,position); // cp in new elements to existing locations
+ }
+ iv_finish += n;
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+
+template <class T>
+void std::vector<T>::resize(size_type n, T x)
+{
+ size_type sz = size();
+ if(n < sz)
+ {
+ erase(iv_start + n,iv_finish);
+ }
+ else if(n > sz)
+ {
+ insert(iv_finish,n-sz,x);
+ }
+ // else n == size() do nothing
+}
+
+#endif
+/* vim: set filetype=cpp : */
diff --git a/hwpf/plat/.empty b/hwpf/plat/.empty
deleted file mode 100755
index e69de29b..00000000
--- a/hwpf/plat/.empty
+++ /dev/null
diff --git a/hwpf/plat/include/buffer.H b/hwpf/plat/include/buffer.H
deleted file mode 100644
index 62e7e7cf..00000000
--- a/hwpf/plat/include/buffer.H
+++ /dev/null
@@ -1,764 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer.H
- * @brief definitions for fapi2 variable integral buffers
- */
-
-#ifndef __FAPI2_INTEGRAL_BUFFER__
-#define __FAPI2_INTEGRAL_BUFFER__
-
-#include <buffer_parameters.H>
-#include <buffer_traits.H>
-#include <return_code.H>
-
-namespace fapi2
-{
-/// @brief Class representing a FAPI buffer<T>
-/// @tparam T, the integral type of the buffer (uint16_t, uint64_t, etc.)
-template <typename T, typename TT = bufferTraits<T> >
-class buffer
-{
- public:
- /// Shortcut typedef to get to our traits class
- typedef typename TT::bits_type bits_type;
-
- ///
- /// @brief Integral buffer assignment constructor
- /// @param[in] i_value initial value of the buffer
- /// Meaningless for variable types and thus protected.
- ///
- inline buffer(T i_value = 0):
- iv_data(i_value)
- {
- }
-
- ~buffer(void) = default;
-
- #if !defined(DOXYGEN) && defined(FAPI2_DEBUG)
- /// @brief Print the contents of the buffer to stdout
- inline void print(void) const
- {
- TT::print(iv_data);
- }
- #endif
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T() const
- {
- return iv_data;
- }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T&()
- {
- return iv_data;
- }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline T& operator()(void)
- {
- return iv_data;
- }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return Reference to the contents of the buffer
- ///
- inline const T& operator()(void) const
- {
- return iv_data;
- }
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- ///
- /// @brief Set an OT of data in buffer
- /// @param[in] i_value sizeof(OT) bits of data
- /// @param[in] i_offset Start OT (start word, for example) in buffer
- /// - defaults to 0 (will by default write the left most element)
- /// @return FAPI2_RC_SUCCESS on success, FAPI2_RC_OVERFLOW otherwise
- /// @note This is is only available for integral types. To set a
- /// variable_buffer into a variable_buffer, use insert()
- ///
- template< typename OT>
- inline fapi2::ReturnCode set(OT i_value, const bits_type i_offset = 0)
- {
- // Compile time check to make sure OT is integral
- static_assert( std::is_integral<OT>::value,
- "Input must be an integral type" );
-
- const uint32_t length = TT:: template size<OT>(iv_data);
- static const bits_type bits_in_value = parameterTraits<OT>::bit_length();
- const bits_type bit_length = TT::bit_length(iv_data);
-
- if (i_offset + bits_in_value >= bit_length)
- {
- return FAPI2_RC_OVERFLOW;
- }
-
- // Create mask if part of this byte is not in the valid part of the buffer,
- // Shift it left by the amount of unused bits,
- // Clear the unused bits
- if (((i_offset + 1) == length) && (bit_length % bits_in_value))
- {
- i_value &= parameterTraits<OT>::mask() << ((bits_in_value * length) -
- bit_length);
- }
-
- parameterTraits<OT>::template write_element<typename TT::unit_type>
- (TT::get_address(iv_data), i_value, i_offset);
- return FAPI2_RC_SUCCESS;
- }
-
- /// @name Bit/Word Manipulation Functions
- ///@{
-
- ///
- /// @brief Return the length of the buffer in bits
- /// @return Length in bits
- ///
- inline constexpr uint32_t getBitLength(void) const
- {
- return TT::bit_length(iv_data);
- }
-
- ///
- /// @brief Return the length of the buffer in OT units
- /// @return Length in OT units rounded up
- /// @tparam OT the type to get the length of. For example, if one
- /// wanted the length in double words, OT would be uint64_t
- /// (getLength<uint64_t>().) Similarly, to get the length in words,
- /// getLength<uin32_t>().
- ///
- template< typename OT >
- inline constexpr uint32_t getLength(void) const
- {
- return TT::template size<OT>(iv_data);
- }
-
- ///
- /// @brief Templated setBit for integral types
- /// @tparam B the bit number to set.
- /// @tparam C the count of bits to set, defaults to 1
- /// @return buffer& Useful for method chaining
- /// @note 0 is left-most
- /// @note Example: fapi2::buffer<uint64_t>().setBit<3>();
- ///
- template< bits_type B, bits_type C = 1 >
- inline buffer& setBit(void)
- {
- static_assert((B >= 0) &&
- ((B + C - 1) < TT::bits_per_unit()), "failed range check");
-
- // This would be a candidate for a fast_mask (see variable_buffer) but
- // we'd need tables for all the integral types which maybe we need to
- // do ...
- iv_data |= (T(~0) >> (TT::bits_per_unit() - C)) << (TT::bits_per_unit() - B -
- C);
- return *this;
- }
-
- ///
- /// @brief Set a bit in the buffer
- /// @param[in] i_bit the bit number to set.
- /// @param[in] i_count the count of bits to set, defaults to 1
- /// @note 0 is left-most
- /// @return FAPI2_RC_SUCCESS if OK
- ///
- inline fapi2::ReturnCode setBit(const bits_type& i_bit,
- const bits_type& i_count = 1)
- {
- if ((i_count + i_bit - 1) >= TT::bits_per_unit())
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- iv_data |= (T(~0) >> (TT::bits_per_unit() - i_count)) <<
- (TT::bits_per_unit() - i_bit - i_count);
-
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Clear a bit in buffer
- /// @tparam B Bit in buffer to clear.
- /// @tparam C the count of bits to clear, defaults to 1
- /// @return buffer& Useful for method chaining
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B, bits_type C = 1>
- inline buffer& clearBit(void)
- {
- static_assert((B >= 0) &&
- ((B + C - 1)< TT::bits_per_unit()), "failed range check");
-
- iv_data &= buffer<T>().setBit<B, C>().invert();
- return *this;
- }
-
- ///
- /// @brief Clear a bit in the buffer
- /// @param[in] i_bit the bit number to clear.
- /// @param[in] i_count the count of bits to clear, defaults to 1
- /// @note 0 is left-most
- /// @return FAPI2_RC_SUCCESS if OK
- ///
- inline fapi2::ReturnCode clearBit(const bits_type& i_bit,
- const bits_type& i_count = 1)
- {
- if ((i_count + i_bit - 1) >= TT::bits_per_unit())
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- fapi2::buffer<T> l_scratch;
-
- if (l_scratch.setBit(i_bit, i_count) != FAPI2_RC_SUCCESS)
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- iv_data &= l_scratch.invert();
-
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Write a bit in buffer to a given value
- /// @tparam B Bit in buffer to write
- /// @tparam C the count of bits to write, defaults to 1
- /// @return buffer& Useful for method chaining
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B, bits_type C = 1 >
- inline buffer& writeBit(const bool i_value)
- {
- static_assert((B >= 0) &&
- ((B + C - 1)< TT::bits_per_unit()), "failed range check");
-
- (i_value == 0) ? clearBit<B, C>() : setBit<B, C>();
- return *this;
- }
-
-
- ///
- /// @brief Invert bit
- /// @tparam B Bit in buffer to invert.
- /// @tparam C the count of bits to flip, defaults to 1
- /// @return buffer& Useful for method chaining
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B, bits_type C = 1 >
- inline buffer& flipBit(void)
- {
- static_assert((B >= 0) &&
- ((B + C - 1) < TT::bits_per_unit()), "failed range check");
-
- iv_data ^= buffer<T>().setBit<B, C>();
- return *this;
- }
-
- ///
- /// @brief Get the value of a bit in the buffer
- /// @tparam B Bit in buffer to get.
- /// @tparam C the count of bits to get, defaults to 1
- /// @return true if *any* bit is on, false if *every* bit is off
- ///
- template< bits_type B, bits_type C = 1>
- inline bool getBit(void) const
- {
- return buffer<T>().setBit<B, C>() & iv_data;
- }
-
- ///
- /// @brief Set and entire buffer to X's
- /// @tparam X {0,1} depending if you want to clear (0)
- /// or fill (1) a buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- template< uint8_t X >
- inline buffer& flush(void)
- {
- static_assert( (X == 1) || (X == 0), "bad argument to flush" );
- (0 == X) ? TT::clear(iv_data) : TT::set(iv_data);
- return *this;
- }
-
- ///
- /// @brief Invert entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer& invert(void)
- {
- TT::invert(iv_data);
- return *this;
- }
-
- ///
- /// @brief Bit reverse entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer& reverse(void)
- {
- TT::reverse(iv_data);
- return *this;
- }
-
-
- ///@}
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- ///
- /// @brief Get a pointer to the buffer bits
- /// @return Pointer to the buffer itself
- ///
- inline T* pointer(void)
- {
- return &iv_data;
- }
-
- // Note: Many (all?) of these are not needed and the compiler complains
- // as the cast to T yields a better operator. There are here mainly for
- // documenation purposes.
-
- ///
- /// @brief operator>>()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator>>(bits_type i_shiftnum);
- #endif
-
- ///
- /// @brief operator<<()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator<<(bits_type i_shiftnum);
- #endif
-
- ///
- /// @brief operator+()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator+(const T& rhs);
- #endif
-
- ///
- /// @brief operator+=()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator+=(const T& rhs);
- #endif
-
- ///
- /// @brief operator|=()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator|=(const T& rhs);
- #endif
-
- ///
- /// @brief operator&=()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator&=(const T& rhs);
- #endif
-
- ///
- /// @brief operator|()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator|(const T& rhs);
- #endif
-
- ///
- /// @brief operator&()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator&(const T& rhs);
- #endif
-
- ///
- /// @brief operator^=()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator^=(const T& rhs);
- #endif
-
- ///
- /// @brief operator~()
- ///
- #ifdef DOXYGEN
- inline buffer<T>& operator~(const T& rhs) const;
- #endif
-
- ///
- /// @brief operator==()
- ///
- #ifdef DOXYGEN
- inline bool operator==(const T& rhs) const;
- #endif
-
- ///
- /// @brief operator!=()
- ///
- #ifdef DOXYGEN
- inline bool operator!=(const T& rhs) const;
- #endif
-
- ///
- /// @brief Copy part of a OT into the DataBuffer
- /// @tparam TS Start bit to insert into (target start)
- /// @tparam L Length of bits to insert
- /// @tparam SS Start bit in source - defaults to bit 0
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken left aligned
- /// @return buffer& Useful for method chaining
- ///
- template<bits_type TS, bits_type L, bits_type SS = 0, typename OT>
- inline buffer& insert(const OT i_datain)
- {
- const bits_type target_length = parameterTraits<T>::bit_length();
- const bits_type source_length = parameterTraits<OT>::bit_length();
-
- // Error if input data don't make sense
- static_assert((TS + L) <= target_length,
- "insert(): (Target Start + Len) is out of bounds");
- static_assert((SS + L) <= source_length,
- "insert(): (Source Start + Len) is out of bounds");
- static_assert(TS < target_length,
- "insert(): Target Start is out of bounds");
- static_assert(SS < source_length,
- "insert(): Source Start is out of bounds");
-
- // Normalize the input to 2 64 bit integers and adjust the starts accordingly
- uint64_t source = static_cast<uint64_t>(i_datain);
- const uint64_t target = static_cast<uint64_t>(iv_data);
-
- const bits_type source_start = parameterTraits<uint64_t>::bit_length() -
- (source_length - SS);
- const bits_type target_start = parameterTraits<uint64_t>::bit_length() -
- (target_length - TS);
-
- // Get mask value for Target buffer
- // Note: Need "& 0UL" because bit shift left for Target buffer doesn't roll off
- uint64_t mask = ((~0UL << (parameterTraits<uint64_t>::bit_length() - L)) & ~0UL)
- >> target_start;
-
- // Align the source to the target. Make things signed so we know which way to shift.
- int32_t shift = source_start - target_start;
-
- if (shift > 0)
- {
- source <<= shift;
- }
- else
- {
- shift = target_start - source_start;
- source >>= shift;
- }
-
- iv_data = ((target & ~mask) | (source & mask));
- return *this;
- }
-
- ///
- /// @brief Copy part of a OT into the DataBuffer
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken left aligned
- /// @param[in] Start bit to insert into (target start)
- /// @param[in] Length of bits to insert
- /// @param[in] Start bit in source - defaults to bit 0
-
- /// @return FAPI2_RC_SUCCESS if successful
- ///
- template<typename OT>
- fapi2::ReturnCode insert(const OT i_datain, const bits_type i_targetStart,
- const bits_type i_len, const bits_type i_sourceStart = 0)
- {
- const bits_type target_length = parameterTraits<T>::bit_length();
- const bits_type source_length = parameterTraits<OT>::bit_length();
-
- // Error if input data don't make sense
- if ((i_targetStart + i_len) > target_length)
- {
- FAPI_ERR("insert(): (Target Start + Len) is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- if ((i_sourceStart + i_len) > source_length)
- {
- FAPI_ERR("insert(): (Source Start + Len) is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- if (i_targetStart >= target_length)
- {
- FAPI_ERR("insert(): Target Start is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- if (i_sourceStart >= source_length)
- {
- FAPI_ERR("insert(): Source Start is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- // Normalize the input to 2 64 bit integers and adjust the starts accordingly
- uint64_t source = static_cast<uint64_t>(i_datain);
- const uint64_t target = static_cast<uint64_t>(iv_data);
-
- const bits_type source_start = parameterTraits<uint64_t>::bit_length() -
- (source_length - i_sourceStart);
- const bits_type target_start = parameterTraits<uint64_t>::bit_length() -
- (target_length - i_targetStart);
-
- // Get mask value for Target buffer
- // Note: Need "& 0UL" because bit shift left for Target buffer doesn't roll off
- uint64_t mask = ((~0UL << (parameterTraits<uint64_t>::bit_length() - i_len)) &
- ~0UL) >> target_start;
-
- // Align the source to the target. Make things signed so we know which way to shift.
- int32_t shift = source_start - target_start;
-
- if (shift > 0)
- {
- source <<= shift;
- }
- else
- {
- shift = target_start - source_start;
- source >>= shift;
- }
-
- iv_data = ((target & ~mask) | (source & mask));
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Copy in a right aligned value
- /// @tparam SB Start bit to insert into
- /// @tparam L Length of bits to insert
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken right aligned
- /// @return buffer& Useful for method chaining
- /// @note Data is assumed to be aligned on the word boundary of L
- ///
- template<bits_type TS, bits_type L, typename OT>
- inline buffer& insertFromRight(const OT i_datain)
- {
- // Error if input data don't make sense
- static_assert(L <= parameterTraits<OT>::bit_length(),
- "insertFromRight(): Len > input buffer");
- static_assert(TS < parameterTraits<T>::bit_length(),
- "insertFromRight(): Target Start is out of bounds");
- static_assert((TS + L) <= parameterTraits<T>::bit_length(),
- "InsertFromRight(): (Target Start + Len) is out of bounds");
-
- this->insert<TS, L, parameterTraits<OT>::bit_length() - L>(i_datain);
- return *this;
- }
-
- ///
- /// @brief Copy in a right aligned value
- /// @tparam OT the type of the incoming (origin) data
- /// @param[in] i_datain OT value to copy into DataBuffer
- /// - data is taken right aligned
- /// @param[in] Start bit to insert into
- /// @param[in] Length of bits to insert
- /// @return FAPi2_RC_SUCCESS if no error
- /// @note Data is assumed to be aligned on the word boundary of L
- ///
- template<typename OT>
- fapi2::ReturnCode insertFromRight(const OT i_datain,
- const bits_type i_targetStart,
- const bits_type i_len)
- {
- // Error if input data don't make sense
- if ((i_targetStart + i_len) > parameterTraits<T>::bit_length())
- {
- FAPI_ERR("insertFromRight(): (Target Start + Len) is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- if (i_targetStart >= parameterTraits<T>::bit_length())
- {
- FAPI_ERR("insertFromRight(): Target Start is out of bounds");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- if (i_len > parameterTraits<OT>::bit_length())
- {
- FAPI_ERR("insertFromRight(): Len > input buffer");
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- return this->insert(i_datain, i_targetStart, i_len,
- parameterTraits<OT>::bit_length() - i_len);
- }
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam SS Start bit in source
- /// @tparam L Length of bits to insert
- /// @tparam TS Start bit to insert into (target start)
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @return const buffer& Useful for method chaining
- ///
- template<bits_type SS, bits_type L, bits_type TS = 0, typename OT>
- inline const buffer& extract(OT& o_out) const
- {
- // Extraction is just an insert into o_out
-
- buffer<OT> out(o_out);
- out.insert<TS, L, SS>(iv_data);
- o_out = out;
- return *this;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam SS Start bit in source
- /// @tparam L Length of bits to insert
- /// @tparam TS Start bit to insert into (target start)
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @return buffer& Useful for method chaining
- ///
- template<bits_type SS, bits_type L, bits_type TS = 0, typename OT>
- inline buffer& extract(OT& o_out)
- {
- // Extraction is just an insert into o_out
-
- buffer<OT> out(o_out);
- out.insert<TS, L, SS>(iv_data);
- o_out = out;
- return *this;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @param[in] Start bit in source
- /// @param[in] Length of bits to extract
- /// @param[in] Start bit to insert into (target start)
- /// @return FAPI2_RC_SUCCESS if ok
- ///
- template<typename OT>
- fapi2::ReturnCode extract(OT& o_out, const bits_type i_sourceStart,
- const bits_type i_len, const bits_type i_targetStart = 0) const
- {
- // Extraction is just an insert into o_out
-
- buffer<OT> out(o_out);
-
- if (out.insert(iv_data, i_targetStart, i_len,
- i_sourceStart) != FAPI2_RC_SUCCESS)
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
- o_out = out;
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam SS Start bit to insert into (source start)
- /// @tparam L Length of bits to extract
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @return const buffer& Useful for method chaining
- ///
- template<bits_type SS, bits_type L, typename OT>
- inline const buffer& extractToRight(OT& o_out) const
- {
- extract<SS, L, parameterTraits<OT>::bit_length() - L>(o_out);
- return *this;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam SS Start bit to insert into (source start)
- /// @tparam L Length of bits to extract
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @return buffer& Useful for method chaining
- ///
- template<bits_type SS, bits_type L, typename OT>
- inline buffer& extractToRight(OT& o_out)
- {
- extract<SS, L, parameterTraits<OT>::bit_length() - L>(o_out);
- return *this;
- }
-
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam OT the type of the outgoing (target)
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @param[in] Start bit to insert into (source start)
- /// @param[in] Length of bits to insert
- /// @return FAPI2_RC_SUCCESS if ok
- ///
- template<typename OT>
- fapi2::ReturnCode extractToRight(OT& o_out, const bits_type i_sourceStart,
- const bits_type i_len) const
- {
- return extract(o_out, i_sourceStart, i_len,
- parameterTraits<OT>::bit_length() - i_len);
- }
-
- ///@}
-
- private:
- /// The contents of the buffer
- T iv_data;
-};
-}
-
-#endif
diff --git a/hwpf/plat/include/buffer_base.H b/hwpf/plat/include/buffer_base.H
deleted file mode 100755
index a6e8c4ad..00000000
--- a/hwpf/plat/include/buffer_base.H
+++ /dev/null
@@ -1,331 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer_base.H
- * @brief definitions for fapi2 buffer base class
- */
-
-#ifndef __FAPI2_BUFFER_BASE__
-#define __FAPI2_BUFFER_BASE__
-
-#include <stdint.h>
-#include <initializer_list>
-#include <error_scope.H>
-#include <buffer_parameters.H>
-#include <buffer_traits.H>
-#include <return_code.H>
-
-namespace fapi2
-{
- /// @brief Base class for buffers and variable buffers
- /// @tparam T is the type of iv_data (std::vector, etc)
- /// @tparam TT is the template trait, defaults to the trait for T
- ///
- /// Buffers can be of two styles; buffers made from an integral type and
- /// buffers made from a container. Integral type buffers, while limited
- /// in size, can be tightly controlled via the compiler by using c++
- /// templates.
- ///
- /// C++ templates allow for very explicit control, but yield a
- /// syntax different than the FAPI 1.x functional interface. For example,
- /// a fapi2::buffer is defined as having a type:
- /// @code
- /// fapi2::buffer<uint64_t> new_buffer;
- /// @endcode
- /// defines a buffer with exactly 64 bits, and can be manipulated by the
- /// compiler as a single intrgral value. These implementations result
- /// in concise instruction streams, and a platform may choose to implement
- /// all or some or none of the integral buffer types.
- ///
- /// Buffers which have containers as their underlying implementation
- /// are found in the class fapi2::variable_buffer. variable_buffer is little
- /// more than
- /// @code
- /// fapi2::buffer<fapi2::bits_container>
- /// @endcode
- /// where bits_container is the typedef of the underlying container (a
- /// vector of uint32_t, for example)
- ///
- /// Examples:<br>
- ///
- /// * Simple uint64_t buffer
- /// @code
- /// const uint32_t x = 2;
- ///
- /// // this data buffer will contain data in a uint64_t type
- /// fapi2::buffer<uint64_t> data;
- ///
- /// // Set using the template and a constant
- /// data.setBit<x>();
- ///
- /// // Set using the template and a value
- /// data.setBit<3>();
- ///
- /// // Set using the function interface, and a value
- /// data.setBit(1);
- ///
- /// // compiler gets smart.
- /// // movabs $0x7000000000000000,%rsi
- /// @endcode
- ///
- /// * variable_buffer, same thing
- /// @code
- ///
- /// const uint32_t x = 2;
- ///
- /// // Note: only 15 bits long
- /// fapi2::variable_buffer data(15);
- ///
- ///
- /// data.setBit(x);
- /// data.setBit(3);
- /// data.setBit(1);
- /// @endcode
- ///
- /// * method chaining
- /// Buffers support method chaining. So, rather than
- /// this
- /// @code
- /// buffer<T> mask;
- /// mask.setBit<B>();
- /// mask.invert();
- /// my_buffer &= mask;
- /// @endcode
- /// You can do
- /// @code
- /// my_buffer &= buffer<T>().setBit<B>.invert();
- /// @endcode
- ///
- /// * buffer operations
- /// @code
- ///
- /// // An 8 bit buffer, initialized with a value
- /// fapi2::buffer<uint8_t> eight_bits = 0xAA;
- /// fapi2::buffer<uint8_t> another_eight;
- /// fapi2::buffer<uint16_t> sixteen_bits;
- ///
- /// // You can't assign an 8 bit buffer to a 16 bit buffer.
- /// sixteen_bits = eight_bits; ERROR
- ///
- /// // But you can assign buffers of the same type
- /// another_eight = eight_bits;
- ///
- /// // You can assign constants (or other known values) directly:
- /// sixteen_bits = 0xAABB;
- /// @endcode
- ///
- /// * Variable buffer operations
- ///
- /// @code
- /// fapi2::variable_buffer data(16);
- ///
- /// // Very large buffers can be initialized rather than set bit by bit.
- /// const fapi2::variable_buffer bit_settings_known(
- /// {0xFFFF0000, 0xAABBF0F0,
- /// 0xFFFF0000, 0xAABBF0F0,
- /// 0xFFFF0000, 0xAABBF0F0,});
- ///
- /// // Assignment will expand or shrink the size automatically.
- /// data = bit_settings_known;
- ///
- /// // You can assign directly to the buffer:
- /// fapi2::variable_buffer other_bits;
- /// const fapi2::container_unit x = 0xFF00AA55;
- /// other_bits = {x, 0xDEADBEEF};
- /// @endcode
- ///
- template <typename T, typename TT = bufferTraits<T> >
- class buffer_base
- {
-
- public:
-
- /// Shortcut typedef to get to our traits class
- typedef typename TT::bits_type bits_type;
- /// Shortcut typedef to get to our traits class
- typedef typename TT::unit_type unit_type;
-
- ///
- /// @brief Default constructor
- /// @note iv_data will get the "default" construction, which is
- /// correct - 0 for integral types, an empty container for the others.
- ///
- buffer_base(void):
- iv_data()
- {}
-
- virtual ~buffer_base(void)
- {}
-
-#ifndef DOXYGEN
- /// @brief Print the contents of the buffer to stdout
- inline void print(void) const
- { TT::print(iv_data); }
-#endif
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T() const { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline operator T&() { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return The contents of the buffer
- ///
- inline T& operator()(void) { return iv_data; }
-
- ///
- /// @brief Get the contents of the buffer
- /// @return Reference to the contents of the buffer
- ///
- inline const T& operator()(void) const { return iv_data; }
-
- ///
- /// @brief Get a pointer to the buffer bits
- /// @return Pointer to the buffer itself
- ///
- inline T* pointer(void) { return &iv_data; }
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- ///
- /// @brief Set an OT of data in buffer
- /// @param[in] i_value sizeof(OT) bits of data
- /// @param[in] i_offset Start OT (start word, for example) in buffer
- /// - defaults to 0 (will by default write the left most element)
- /// @return FAPI2_RC_SUCCESS on success, FAPI2_RC_OVERFLOW otherwise
- /// @note This is is only available for integral types. To set a
- /// variable_buffer into a variable_buffer, use insert()
- ///
- template< typename OT>
- inline fapi2::ReturnCode set(OT i_value, const bits_type i_offset = 0)
- {
- // Compile time check to make sure OT isn't a variable buffer
- static_assert( !std::is_same<bits_container, OT>::value,
- "Can't use a variable_buffer as input to set()" );
-
- //
- // There's a gotcha in here. size<OT>() returns the size in the buffer
- // in OT units *rounded up*. This is the actual size of the buffer, not
- // the perceived size of a variable_buffer. This should be OK however,
- // as what we're trying to prevent is overflow, which this should do.
- //
- const uint32_t length = TT:: template size<OT>(iv_data);
- static const bits_type bits_in_value = parameterTraits<OT>::bit_length;
- const bits_type bit_length = TT::bit_length(iv_data);
-
- if (i_offset >= length)
- {
- return FAPI2_RC_OVERFLOW;
- }
-
- // Create mask if part of this byte is not in the valid part of the buffer,
- // Shift it left by the amount of unused bits,
- // Clear the unused bits
- if (((i_offset + 1) == length) && (bit_length % bits_in_value)) {
- i_value &= parameterTraits<OT>::mask << ((bits_in_value * length) - bit_length);
- }
-
- parameterTraits<OT>::template write_element<unit_type>(TT::get_address(iv_data), i_value, i_offset);
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Set and entire buffer to X's
- /// @tparam X {0,1} depending if you want to clear (0)
- /// or fill (1) a buffer
- ///
- template< uint8_t X >
- inline void flush(void)
- {
- static_assert( (X == 1) || (X == 0), "bad argument to flush" );
- (0 == X) ? TT::clear(iv_data) : TT::set(iv_data);
- }
-
- ///
- /// @brief Invert entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer_base& invert(void)
- { TT::invert(iv_data); return *this; }
-
- ///
- /// @brief Bit reverse entire buffer
- /// @return buffer_base&, Useful for method chaining
- ///
- inline buffer_base& reverse(void)
- { TT::reverse(iv_data); return *this; }
-
- //@}
- protected:
-
- ///
- /// @brief Variable buffer constructor
- /// @param[in] i_value number of *bits* (sizeof(container_units) * 8)
- /// needed. Meaningless for integral types and thus protected.
- ///
- buffer_base(bits_type i_value);
-
- ///
- /// @brief Variable buffer construct from a list
- /// @param[in] i_value an initializer list to initialize the container.
- /// Meaningless for integral types and thus protected
- ///
- buffer_base(std::initializer_list<unit_type> i_value);
-
- ///
- /// @brief Clear the buffer
- ///
- inline void clear(void)
- { TT::clear(iv_data); }
-
- /// The contents of the buffer
- T iv_data;
- };
-
- template <typename T, typename TT>
- inline buffer_base<T, TT>::buffer_base(bits_type i_value):
- iv_data( std::max(bits_type(1),
- bits_type(i_value / 8 / sizeof(bits_type))))
- {
- }
-
- template <typename T, typename TT>
- inline buffer_base<T, TT>::buffer_base(std::initializer_list<unit_type> i_value):
- iv_data(i_value)
- {
- }
-};
-
-
-
-#endif
diff --git a/hwpf/plat/include/buffer_parameters.H b/hwpf/plat/include/buffer_parameters.H
deleted file mode 100644
index 2a6e6100..00000000
--- a/hwpf/plat/include/buffer_parameters.H
+++ /dev/null
@@ -1,70 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file buffer_parameters.H
- * @brief definitions for fapi2 buffer parameter types
- */
-
-#ifndef __FAPI2_BUFFER_PARAM__
-#define __FAPI2_BUFFER_PARAM__
-
-#include <stdint.h>
-
-namespace fapi2
-{
- /// @cond
- /// @brief Traits of buffer parameters - things passed in
- /// @tparam T is the type of i_value (typically an integral type)
- template<typename T>
- class parameterTraits
- {
- public:
- // Why constexpr functions? Enums are hard to do math on, and
- // static const doesn't work without -O1 (or greater.) That might
- // be a bug in g++ but this works just the same.
- constexpr static T mask(void)
- { return T(~0); }
-
- constexpr static uint32_t byte_length(void)
- { return sizeof(T); }
-
- constexpr static uint32_t bit_length(void)
- { return sizeof(T) * 8; }
-
- template<typename U>
- inline static void write_element(void* i_data, T i_value, uint32_t i_offset)
- {
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- T* ptr = (T*)i_data + (i_offset ^ ((sizeof(U) / sizeof(T)) - 1));
-#else
- T* ptr = (T*)i_data + i_offset;
-#endif
- *ptr = i_value;
- }
- };
- /// @endcond
-}
-
-#endif
diff --git a/hwpf/plat/include/fapi2.H b/hwpf/plat/include/fapi2.H
deleted file mode 100644
index de2295b4..00000000
--- a/hwpf/plat/include/fapi2.H
+++ /dev/null
@@ -1,53 +0,0 @@
-///
-/// @file fapi2.H
-/// @brief top level header for fapi2
-///
-
-#ifndef __FAPI2_TOP_LEVEL__
-#define __FAPI2_TOP_LEVEL__
-
-// Define which platforms will not have FAPI Return Codes
-#undef __noRC__
-#if defined (__CME__) || defined (__SGPE__) || defined (__PGPE__)
-#define __noRC__
-#endif
-
-// Determine if running on a PPE platform
-#ifndef __PPE__
-#if defined (__SBE__) || defined (__CME__) || defined (__SGPE__) || defined (__PGPE__)
-#define __PPE__
-#endif
-#endif
-
-#include <plat_trace.H>
-#include <target.H>
-#include <return_code.H>
-#include <buffer.H>
-#include <hw_access.H>
-#include <utils.H>
-
-
-
-// In turn includes the needed generated headers (hwp_ffd_classes, etc.)
-#include <error_scope.H>
-#include <set_sbe_error.H> // Generated file
-#include <plat_attributes.H>
-#include <plat_target_utils.H>
-
-
-#include <fapi2_hwp_executor.H>
-
-// Block of headers not currently in fapi2
-#ifdef FAPI2_MISSING_HEADERS
- #include <mvpdAccess.H>
- #include <mbvpdAccess.H>
-#endif
-
-
-#endif // __FAPI2_TOP_LEVEL__
-
-
-
-
-
-
diff --git a/hwpf/plat/include/variable_buffer.H b/hwpf/plat/include/variable_buffer.H
deleted file mode 100644
index fa9e4a05..00000000
--- a/hwpf/plat/include/variable_buffer.H
+++ /dev/null
@@ -1,670 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file variable_buffer.H
- * @brief definitions for fapi2 variable length buffers
- */
-
-#ifndef __FAPI2_VARIABLE_BUFFER__
-#define __FAPI2_VARIABLE_BUFFER__
-
-#include <buffer_base.H>
-
-namespace fapi2
-{
- /// @brief Get a 32 bit mask quickly
- // This is one of the main reasons we static_assert in the ctor's
- // to ensure the unit_type is 32 bits.
- inline uint32_t fast_mask32(int32_t i_pos, int32_t i_len)
- {
- // generates an arbitrary 32-bit mask using two operations, not too shabby
-
- static const uint32_t l_mask32[] = {
- 0x00000000,
- 0x80000000, 0xC0000000, 0xE0000000, 0xF0000000,
- 0xF8000000, 0xFC000000, 0xFE000000, 0xFF000000,
- 0xFF800000, 0xFFC00000, 0xFFE00000, 0xFFF00000,
- 0xFFF80000, 0xFFFC0000, 0xFFFE0000, 0xFFFF0000,
- 0xFFFF8000, 0xFFFFC000, 0xFFFFE000, 0xFFFFF000,
- 0xFFFFF800, 0xFFFFFC00, 0xFFFFFE00, 0xFFFFFF00,
- 0xFFFFFF80, 0xFFFFFFC0, 0xFFFFFFE0, 0xFFFFFFF0,
- 0xFFFFFFF8, 0xFFFFFFFC, 0xFFFFFFFE, 0xFFFFFFFF,
- };
- return l_mask32[i_len] >> i_pos;
- }
-
- //
- // General set a series of bits in the buffer.
- //
-
- ///
- /// @cond
- /// @brief Internal bit inserting method.
- /// @tparam unit_type The type of a unit of the arrays
- /// @tparam bits_type The type of the bit counting values
- /// @param[in] i_source The incoming data
- /// @param[in] i_source_length The length in bits of the incoming data
- /// @param[in] i_target The outgoing data
- /// @param[in] i_target_length The length in bits of the outgoing data
- /// @param[in] i_source_start_bit The starting bit location in the
- /// incoming data
- /// @param[in] i_target_start_bit The starting bit position in this
- /// @param[in] i_length The length, in bits, the user wants copied.
- ///
- template<typename unit_type, typename bits_type>
- inline fapi2::ReturnCode _insert(const unit_type* i_source,
- bits_type i_source_length,
- unit_type* i_target,
- bits_type i_target_length,
- bits_type i_source_start_bit,
- bits_type i_target_start_bit,
- bits_type i_length)
- {
- const bits_type bits_per_unit = fapi2::parameterTraits<unit_type>::bit_length;
-
- // tartgetStart is defaulted to the sizeof(target) - (sizeof(source) - i_source_start_bit)
- // which makes this act like insert from right
- if (i_target_start_bit == ~0)
- {
- i_target_start_bit = (i_target_length - (i_source_length - i_source_start_bit));
- }
-
- // len defaults to (sizeof(OT) * 8) - i_source_start_bit
- if (i_length == ~0)
- {
- i_length = i_source_length - i_source_start_bit;
- }
-
- // Check for overflow
- if ((i_length + i_target_start_bit > i_target_length) ||
- (i_length + i_source_start_bit > i_source_length))
- {
- return fapi2::FAPI2_RC_OVERFLOW;
- }
-
- do
- {
- const bits_type src_idx = i_source_start_bit / bits_per_unit;
- const bits_type trg_idx = i_target_start_bit / bits_per_unit;
-
- // "slop" = unaligned bits
- const bits_type src_slop = i_source_start_bit % bits_per_unit;
- const bits_type trg_slop = i_target_start_bit % bits_per_unit;
-
- // "cnt" = largest number of bits to be moved each pass
- bits_type cnt = std::min(i_length, bits_per_unit);
- cnt = std::min(cnt, bits_per_unit - src_slop);
- cnt = std::min(cnt, bits_per_unit - trg_slop);
-
- // generate the source mask only once
- bits_type mask = fast_mask32(src_slop, cnt);
-
- // read the source bits only once
- bits_type src_bits = i_source[src_idx] & mask;
-
- // "shift" = amount of shifting needed for target alignment
- int32_t shift = trg_slop - src_slop;
-
- // ideally (i << -1) would yield (i >> 1), but it
- // doesn't, so we need an extra branch here
-
- if (shift < 0)
- {
- src_bits <<= -shift;
- mask <<= -shift;
- }
- else
- {
- src_bits >>= shift;
- mask >>= shift;
- }
-
- // clear source '0' bits in the target
- i_target[trg_idx] &= ~mask;
- // set source '1' bits in the target
- i_target[trg_idx] |= src_bits;
-
- i_source_start_bit += cnt;
- i_target_start_bit += cnt;
-
- i_length -= cnt;
- } while (0 < i_length);
-
- return fapi2::FAPI2_RC_SUCCESS;
- }
- /// @endcond
-
- /// @brief Class representing a FAPI variable_buffer.
- /// @remark Variable buffers are buffers which can be variable in length
- /// (and "odd sized.") These best represent the FAPI 1.X ecmdDataBuffer,
- /// however they are implemented using the same template techniques
- /// as the new fapi::buffer.
- /// @note Variable buffers are not (presently) declared as std::bitset
- /// as bitsets' size is fixed at runtime. It is not clear if this is
- /// acceptable for variable_buffers at this time.
- /// @note Variable buffers are not (presently) declared as std::vector<bool>
- /// as it would need to be implemented separate from std::vector, and
- /// it's not clear it would give us any real advantage. Howevever, its is
- /// more likely this will become a std::vector<bool> than a std::bitset.
- class variable_buffer : public buffer_base<bits_container>
- {
-
- public:
-
- ///
- /// @brief Variable buffer constructor
- /// @param[in] i_value number of *bits* (sizeof(uint_type) * 8)
- /// needed.
- variable_buffer(bits_type i_value = 0);
-
- ///
- /// @brief Variable buffer list constructor
- /// @param[in] i_value an initializer list to initialize the container.
- ///
- variable_buffer(const std::initializer_list<unit_type>& i_value);
-
- /// @name Bit/Word Manipulation Functions
- ///@{
-
- ///
- /// @brief Return the length of the buffer in bits
- /// @return Length in bits
- ///
- inline uint32_t getBitLength(void) const
- { return iv_perceived_bit_length; }
-
- ///
- /// @brief Return the length of the buffer in OT units
- /// @return Length in OT units rounded up
- /// @tparam OT the type to get the length of. For example, if one
- /// wanted the length in double words, OT would be uint64_t
- /// (getLength<uint64_t>().) Similarly, to get the length in words,
- /// getLength<uin32_t>().
- ///
- template< typename OT >
- inline uint32_t getLength(void) const
- {
- static const uint32_t bits_in_ot = sizeof(OT) * 8;
- return (getBitLength() + (bits_in_ot - 1)) / bits_in_ot;
- }
-
- ///
- /// @brief Set a bit in the buffer
- /// @param[in] i_bit the bit number to set.
- /// @note 0 is left-most
- /// @return FAPI2_RC_SUCCESS if OK
- ///
- inline fapi2::ReturnCode setBit(const bits_type& i_bit)
- {
- const bits_type index = i_bit / bits_per_unit;
-
- if (index > iv_data.size())
- {
- return FAPI2_RC_INVALID_PARAMETER;
- }
-
-
-/// @todo: check with Brian no the correct parens
- iv_data[index] |=
- unit_type(1) << ((bits_per_unit - 1) -
- (i_bit - (index * bits_per_unit)));
-
- return FAPI2_RC_SUCCESS;
- }
-
- ///
- /// @brief Clear a bit in buffer
- /// @tparam SB Start bit in buffer to clear.
- /// @tparam L Number of consecutive bits from start bit to
- /// clear
- /// @return FAPI2_RC_SUCCESS on success
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type SB, bits_type L >
- fapi2::ReturnCode clearBit(void);
-
- ///
- /// @brief Invert bit
- /// @tparam SB Start bit in buffer to invert.
- /// @tparam L Number of consecutive bits from start bit to
- /// invert, defaults to 1
- /// @return FAPI2_RC_SUCCESS on success
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type SB, bits_type L = 1 >
- fapi2::ReturnCode flipBit(void);
-
- ///
- /// @brief Get the value of a bit in the buffer
- /// @tparam B Bit in buffer to get.
- /// @return true/1 if bit is on, false/0 if bit is off
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- ///
- template< bits_type B >
- inline bool getBit(void) const
- {
- const bits_type index = B / bits_per_unit;
- const unit_type mask = unit_type(1) << (bits_per_unit - 1) - (B - (index * bits_per_unit));
- return iv_data[index] & mask;
- }
-
- ///
- /// @brief Test if multiple bits are set
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return true if all bits in range are set - false if any
- /// bit is clear
- ///
- template< bits_type SB, bits_type L = 1 >
- bool isBitSet(void) const;
-
- ///
- /// @brief Test if multiple bits are clear
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return true if bit is clear - false if bit is set
- ///
- template< bits_type SB, bits_type L = 1 >
- bool isBitClear(void) const;
-
- ///
- /// @brief Count number of bits set in a range
- /// @tparam SB Start bit in buffer to test.
- /// @tparam L Number of consecutive bits from start bit to
- /// test, defaults to 1
- /// @note Asserting that all the parameters are known at
- /// compile time so this can be templated only. If that is not
- /// the case we can add a function parameter version.
- /// @return Number of bits set in range
- ///
- template< bits_type SB, bits_type L = 1 >
- bits_type getNumBitsSet(void) const;
-
- ///@}
-
- /// @name Buffer Manipulation Functions
- ///@{
-
- // Note: Many (all?) of these are not needed and the compiler complains
- // as the cast to T yields a better operator. There are here mainly for
- // documenation purposes.
-
- ///
- /// @brief operator>>()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator>>(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator<<()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator<<(bits_type i_shiftnum);
-#endif
-
- ///
- /// @brief operator+()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator+(const T& rhs);
-#endif
-
- ///
- /// @brief operator+=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator+=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator|=(const T& rhs);
-#endif
-
- ///
- /// @brief operator&=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator&=(const T& rhs);
-#endif
-
- ///
- /// @brief operator|()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator|(const T& rhs);
-#endif
-
- ///
- /// @brief operator&()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator&(const T& rhs);
-#endif
-
- ///
- /// @brief operator^=()
- ///
-#ifdef DOXYGEN
- variable_buffer<T>& operator^=(const T& rhs);
-#endif
-
- ///
- /// @brief operator!=()
- ///
-#ifdef DOXYGEN
- bool operator!=(const T& rhs) const;
-#endif
-
- ///
- /// @brief operator==()
- /// @return true if and only if lhs == rhs
- ///
- inline bool operator==(const fapi2::bits_container& rhs) const
- {
- if (&iv_data == &rhs)
- {
- return true;
- }
-
- return iv_data == rhs;
- }
-
- ///
- /// @brief Copy part of an element into the DataBuffer
- /// @param[in] i_data OT value to copy into DataBuffer
- /// @param[in] i_targetStart The position in this where the copy starts
- /// @param[in] i_len How many bits to copy
- /// @param[in] i_sourceStart The start positon in i_data, defaults to 0
- /// @return FAPI2_RC_SUCCESS on success, FAPi2_RC_OVERFLOW otherwise
- ///
- template<typename OT>
- fapi2::ReturnCode insert(const OT& i_data,
- bits_type i_targetStart = 0,
- bits_type i_len = ~0,
- bits_type i_sourceStart = 0);
-
- ///
- /// @brief Copy in a right aligned (decimal) element
- /// @param[in] i_data the incoming data
- /// - data is taken right aligned
- /// @param[in] i_targetStart The starting bit position in this
- /// - Defaultst to 0
- /// @param[in] i_len The length, in bits, the user wants copied.
- /// - Defaults to all of the bits in the source which fit
- /// @return FAPI2_RC_SUCCESS on success, FAPI2_RC_OVERFLOW otherwise
- ///
- template<typename OT>
- fapi2::ReturnCode insertFromRight(const OT& i_data,
- bits_type i_targetStart = 0,
- bits_type i_len = ~0);
-
- ///
- /// @brief Copy data from this buffer into an OT
- /// @tparam OT the type of the outgoing data
- /// @param[out] o_out OT to copy into - data is placed left aligned
- /// @param[in] i_start Start bit to copy from - defaults to 0
- /// @param[in] i_len Length of bits to copy - defaults to filling o_out
- /// @return FAPI2_RC_SUCCESS on success
- ///
- template< typename OT >
- fapi2::ReturnCode extract(OT& o_out,
- bits_type i_start = 0,
- bits_type i_len = ~0) const;
-
- ///
- /// @brief Copy data from this buffer into an OT and right justify
- /// @tparam OT the type of the outgoing data
- /// @param[out] o_out OT to copy into - data is placed right aligned
- /// @param[in] i_start Start bit to copy from - defaults to 0
- /// @param[in] i_len Length of bits to copy - defaults to filling o_out
- /// @return FAPI2_RC_SUCCESS on success
- ///
- template< typename OT >
- fapi2::ReturnCode extractToRight(OT& o_out,
- bits_type i_start = 0,
- bits_type i_len = ~0) const;
- ///@}
-
- private:
- // Just shorthand ...
- static const bits_type bits_per_unit =
- bufferTraits<bits_container>::bits_per_unit;
-
- // The number of bits the user asked for. The actual size of the
- // container might be larger.
- bits_type iv_perceived_bit_length;
-
- ///
- /// @brief Internal bit extraction method.
- /// @tparam OT The type of the destination
- /// @param[in] i_start The starting bit position in this
- /// @param[in] i_count The length, in bits, the user wants copied.
- /// @param[out] o_dest Where to put the data
- ///
- template< typename OT >
- fapi2::ReturnCode _extract(bits_type i_start,
- bits_type i_count,
- OT* o_dest) const;
-
- ///
- /// @brief Internal insertFromRight
- /// @param[in] i_data, the incoming data
- /// @param[in] i_data_length The length in bits of the incoming data
- /// @param[in] i_target_start_bit The starting bit position in this
- /// @param[in] i_length The length, in bits, the user wants copied.
- ///
- template<typename OT>
- fapi2::ReturnCode _insertFromRight(const OT& i_data,
- bits_type i_data_length,
- bits_type i_targetStart,
- bits_type i_len);
-
- };
-
- inline variable_buffer::
- variable_buffer(bits_type i_value):
- buffer_base(i_value),
- iv_perceived_bit_length(i_value)
- {
- static_assert(std::is_same<unit_type, uint32_t>::value,
- "code currently needs unit_type to be a unit32_t");
- }
-
- inline variable_buffer::
- variable_buffer(const std::initializer_list<unit_type>& i_value):
- buffer_base(i_value),
- iv_perceived_bit_length(i_value.size() * sizeof(unit_type) * 8)
- {
- static_assert(std::is_same<unit_type, uint32_t>::value,
- "code currently needs unit_type to be a unit32_t");
- }
-
-
-
- /// @cond
- //
- // Generic insert
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::insert(const OT& i_source,
- bits_type i_targetStart,
- bits_type i_len,
- bits_type i_sourceStart)
- {
- return _insert((unit_type*)(&i_source), parameterTraits<OT>::bit_length,
- &(iv_data[0]), getBitLength(),
- i_sourceStart, i_targetStart, i_len);
- }
-
- //
- // Insert another variable_bufer
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::insert(
- const variable_buffer& i_data,
- bits_type i_targetStart,
- bits_type i_len,
- bits_type i_sourceStart)
- {
- return _insert((unit_type*)&(i_data()[0]), i_data.getBitLength(),
- &(iv_data[0]), getBitLength(),
- i_sourceStart, i_targetStart, i_len);
- }
-
- //
- // Generic insert from right
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::insertFromRight(
- const OT& i_data,
- bits_type i_targetStart,
- bits_type i_len)
- {
- /// @todo check with Brian on additional return
- return _insertFromRight(i_data, parameterTraits<OT>::bit_length, i_targetStart, i_len);
- }
-
- //
- // variable_buffer insert from right
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::insertFromRight(
- const variable_buffer& i_data,
- bits_type i_targetStart,
- bits_type i_len)
- {
- const bits_type bit_length_of_source = i_data.getBitLength();
- /// @todo check with Brian on additional return
- return _insertFromRight(i_data, bit_length_of_source, i_targetStart, i_len);
- }
-
-
-
-
- //
- // Generic extract. Extract is an insert with the arguments reversed.
- //
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::extract(
- OT& i_data,
- bits_type i_start,
- bits_type i_len) const
- {
- // Needed to trick the compiler into matching the template below
- const bits_type max_length = parameterTraits<OT>::bit_length;
-
- // If thy didn't pass an i_len, assume they want all the data
- // which will fit.
- if (i_len == ~0)
- {
- i_len = max_length;
- }
-
- return _insert((container_unit*)&iv_data[0], getBitLength(),
- &i_data, max_length,
- i_start, 0U, i_len);
- }
-
- //
- // Extract in to another variable_bufer
- //
- template<>
- inline fapi2::ReturnCode variable_buffer::extract(
- variable_buffer& i_data,
- bits_type i_start,
- bits_type i_len) const
- {
- // If thy didn't pass an i_len, assume they want all the data
- // which will fit.
- // @todo Needed to add (bits_type) to compile. Not clear why this is
- // different than other similar comparisons
- // error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
- if ( i_len == ~(bits_type)0 )
- {
- i_len = i_data.getBitLength();
- }
- return _insert((container_unit*)&iv_data[0], getBitLength(),
- &(i_data()[0]), i_data.getBitLength(),
- i_start, 0U, i_len);
- }
-
-
-
- template<typename OT>
- inline fapi2::ReturnCode variable_buffer::_insertFromRight(
- const OT& i_data,
- bits_type i_data_length,
- bits_type i_targetStart,
- bits_type i_len)
- {
- // If they didn't pass in a length, assume they want all the i_data
- // which will fit.
- if( i_len == ~0 )
- {
- // The longest the length can be is the length of the data
- // This is the miniumum of the length of the data or the
- // number of available bits
- i_len = std::min(i_data_length, getBitLength() - i_targetStart);
- }
-
- // Source start is the length, counted from the right
- return insert(i_data, i_targetStart, i_len, i_data_length - i_len);
- }
-
- //
- // Invalid specializations of set
- //
- /// @cond
- // Sepcialize the variable_buffer version to to "undefined" so the
- // linker complains loudly if anyone calls it.
-#if 0
- template<>
- inline fapi2::ReturnCode buffer_base::set(
- const variable_buffer& i_value,
- bits_type i_offset);
-#endif
- /// @endcond
-};
-
-
-#endif
diff --git a/hwpf/plat/src/ffdc.C b/hwpf/plat/src/ffdc.C
deleted file mode 100644
index efe922ea..00000000
--- a/hwpf/plat/src/ffdc.C
+++ /dev/null
@@ -1,57 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-/**
- * @file ffdc.C
- * @brief Implements the FirstFailureData class
- */
-
-#include <plat_trace.H>
-#include <ffdc.H>
-#include <error_info.H>
-
-namespace fapi2
-{
-
- ///
- /// @brief Add error information to this ffdc object
- /// @param[in] A pointer to a list of objects
- /// @param[in] A pointer to the list of entries
- /// @param[in] The count of how many entries there are
- /// @return void
- ///
- template<>
- void FirstFailureData<ReturnCode>::addErrorInfo(
- const void* const* i_pObjects,
- const ErrorInfoEntry* i_pEntries,
- const uint8_t i_count)
- {
- FAPI_DBG("%d entries", i_count);
- for (uint32_t i = 0; i < i_count; i++)
- {
- i_pEntries[i].addErrorInfo(iv_info, i_pObjects);
- }
- }
-
-
-
-};
diff --git a/hwpf/plat/target_map b/hwpf/plat/target_map
deleted file mode 100755
index 4ea3c0d6..00000000
--- a/hwpf/plat/target_map
+++ /dev/null
@@ -1,49 +0,0 @@
- TARGET_TYPE_NONE = 0x00000000,
- TARGET_TYPE_SYSTEM = 0x00000001,
- TARGET_TYPE_DIMM = 0x00000002,
- TARGET_TYPE_PROC_CHIP = 0x00000004,
- TARGET_TYPE_MEMBUF_CHIP = 0x00000008,
- TARGET_TYPE_EX = 0x00000010,
- TARGET_TYPE_MBA = 0x00000020,
- TARGET_TYPE_MCS = 0x00000040,
- TARGET_TYPE_XBUS = 0x00000080,
- TARGET_TYPE_ABUS = 0x00000100,
- TARGET_TYPE_L4 = 0x00000200,
- TARGET_TYPE_CORE = 0x00000400,
- TARGET_TYPE_EQ = 0x00000800,
- TARGET_TYPE_MCA = 0x00001000,
- TARGET_TYPE_MCBIST = 0x00002000,
- TARGET_TYPE_MIA = 0x00004000,
- TARGET_TYPE_MIS = 0x00008000,
- TARGET_TYPE_DMI = 0x00010000,
- TARGET_TYPE_OBUS = 0x00020000,
- TARGET_TYPE_NV = 0x00040000,
- TARGET_TYPE_SBE = 0x00080000,
- TARGET_TYPE_PPE = 0x00100000,
- TARGET_TYPE_PERV = 0x00200000,
- TARGET_TYPE_PEC = 0x00400000,
- TARGET_TYPE_PHB = 0x00800000,
- TARGET_TYPE_ALL = 0xFFFFFFFF
-
-
- Perv 0x01
-N0 0x02
-N1 0x03
-N2 0x04
-N3 0x05
-XB 0x06
-MC0 0x07
-MC1 0x08
-OB0 0x09
-OB1 0x0A
-OB2 0x0B
-OB3 0x0C
-PCI0 0x0D
-PCI1 0x0E
-PCI2 0x0F
-
-
-
-
-
-
diff --git a/hwpf/plat/src/Makefile b/hwpf/src/Makefile
index ed98e93f..bff941ee 100644
--- a/hwpf/plat/src/Makefile
+++ b/hwpf/src/Makefile
@@ -1,5 +1,4 @@
-# This Makefile is designed to be invoked with the -I argument set to
-# the location of the "pk.mk" for the build
+# This Makefile is designed to be invoked with the -I argument
include img_defs.mk
include fapi2ppefiles.mk
@@ -7,8 +6,12 @@ include fapi2ppefiles.mk
OBJS := $(addprefix $(OBJDIR)/, $(FAPI2LIB_OBJECTS))
-all: $(OBJS)
+.PHONY: clean all plat
+all: $(OBJS) plat
+plat:
+ @echo "Processing FAPI2 platform makefile"
+ $(MAKE) -I $(IMAGE_SRCDIR) -C ./plat -f Makefile
$(OBJS) $(OBJS:.o=.d): | $(OBJDIR)
diff --git a/hwpf/plat/src/array.C b/hwpf/src/array.C
index 340d8d2f..340d8d2f 100644
--- a/hwpf/plat/src/array.C
+++ b/hwpf/src/array.C
diff --git a/hwpf/plat/src/error_info.C b/hwpf/src/error_info.C
index 9d44eb58..9d44eb58 100644
--- a/hwpf/plat/src/error_info.C
+++ b/hwpf/src/error_info.C
diff --git a/hwpf/src/fapi2PlatAttributeService.C b/hwpf/src/fapi2PlatAttributeService.C
new file mode 100644
index 00000000..2fd8ac83
--- /dev/null
+++ b/hwpf/src/fapi2PlatAttributeService.C
@@ -0,0 +1,486 @@
+// fapi2PlatAttributeService.C
+// This file is generated by perl script ppeCreateAttrGetSetMacros.pl
+
+#include <fapi2.H>
+#include <fapi2PlatAttributeService.H>
+#include "proc_sbe_fixed.H"
+#include "plat_target_parms.H"
+
+namespace fapi2 {
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_BACKUP_SEEPROM_SELECT> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_BACKUP_SEEPROM_SELECT;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint8_t, fapi2::ATTR_CHIP_UNIT_POS> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_CHIP_UNIT_POS[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::CoreAttributes_t::ATTR_CORE_GPTR_RING[index];
+}
+
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ object->fapi2attr::CoreAttributes_t::ATTR_CORE_GPTR_RING[index] = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::CoreAttributes_t::ATTR_CORE_REPR_RING[index];
+}
+
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ object->fapi2attr::CoreAttributes_t::ATTR_CORE_REPR_RING[index] = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::CoreAttributes_t::ATTR_CORE_TIME_RING[index];
+}
+
+template<> void __set<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ object->fapi2attr::CoreAttributes_t::ATTR_CORE_TIME_RING[index] = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EQ, fapi2attr::EQAttributes_t, uint32_t, fapi2::ATTR_DPLL_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_ptarget, const fapi2attr::EQAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EQAttributes_t::ATTR_DPLL_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_FABRIC_SYSTEM_ID> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_FABRIC_SYSTEM_ID;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_GPTR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L2_GPTR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L2_REPR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L2_TIME_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L3_GPTR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L3_REPR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L3_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::EXAttributes_t::ATTR_L3_TIME_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_MC_SYNC_MODE> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_MC_SYNC_MODE;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC00> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC00;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC01> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC01;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC02> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC02;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC03> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC03;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC04> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC04;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC05> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC05;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC06> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC06;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC07> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC07;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC08> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC08;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC09> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC09;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC10> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC10;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC11> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC11;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC12> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC12;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC13> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC13;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC14> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC14;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC15> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC15;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC16> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC16;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC17> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC17;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC18> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC18;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC19> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC19;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC20> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC20;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC21> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC21;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC22> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC22;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EC23> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EC23;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ0;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ3;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ4> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ4;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_EQ5> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_EQ5;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_FSI> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_FSI;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_MC01> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_MC01;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_MC23> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_MC23;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_N0;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_N1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_N2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_N3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_N3;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_OB0;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_OB1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_OB2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_OB3> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_OB3;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI0> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_PCI0;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_PCI1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PCI2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_PCI2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_PRV> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_PRV;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint16_t, fapi2::ATTR_PG_XB> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint16_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_PG_XB;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_PLL_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_PLL_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_REPR_RING[index];
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int32_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT32_1;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const int32_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT32_1 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int32_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT32_2;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const int32_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT32_2 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int64_t, fapi2::ATTR_SCRATCH_INT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int64_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT64_1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int64_t, fapi2::ATTR_SCRATCH_INT64_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int64_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT64_2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int8_t, fapi2::ATTR_SCRATCH_INT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT8_1;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int8_t, fapi2::ATTR_SCRATCH_INT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_INT8_2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_1;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_1 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_2;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_2 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_ARRAY;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT32_ARRAY = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_SCRATCH_UINT32_PERV_ARRAY[index];
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ object->fapi2attr::PervAttributes_t::ATTR_SCRATCH_UINT32_PERV_ARRAY[index] = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint64_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT64_1;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint64_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT64_1 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint64_t, fapi2::ATTR_SCRATCH_UINT64_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint64_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT64_2;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT8_1;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint8_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT8_1 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT8_2;
+}
+
+template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_SCRATCH_UINT8_2> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, const uint8_t& i_pvalue )
+{
+ object->fapi2attr::ProcChipAttributes_t::ATTR_SCRATCH_UINT8_2 = i_pvalue;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_SYSTEM, fapi2attr::SystemAttributes_t, uint8_t, fapi2::ATTR_SYSTEM_IPL_PHASE> ( const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& i_ptarget, const fapi2attr::SystemAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
+{
+ *o_pvalue = object->fapi2attr::SystemAttributes_t::ATTR_SYSTEM_IPL_PHASE;
+}
+
+template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
+{
+ uint32_t index = i_ptarget.getTargetNumber();
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_TIME_RING[index];
+}
+
+} // namespace fapi2
diff --git a/hwpf/plat/src/fapi2ppefiles.mk b/hwpf/src/fapi2ppefiles.mk
index f2e72670..00fcb274 100644
--- a/hwpf/plat/src/fapi2ppefiles.mk
+++ b/hwpf/src/fapi2ppefiles.mk
@@ -19,9 +19,6 @@
FAPI2-CPP-SOURCES += fapi2PlatAttributeService.C
-FAPI2-CPP-SOURCES += target.C
-FAPI2-CPP-SOURCES += plat_utils.C
-
FAPI2-S-SOURCES =
diff --git a/hwpf/fapi/src/ffdc.C b/hwpf/src/ffdc.C
index efe922ea..efe922ea 100755..100644
--- a/hwpf/fapi/src/ffdc.C
+++ b/hwpf/src/ffdc.C
diff --git a/hwpf/src/plat/Makefile b/hwpf/src/plat/Makefile
new file mode 100644
index 00000000..0cbfed8a
--- /dev/null
+++ b/hwpf/src/plat/Makefile
@@ -0,0 +1,18 @@
+# This Makefile is designed to be invoked with the -I argument
+include img_defs.mk
+include fapi2ppeplatfiles.mk
+
+OBJS := $(addprefix $(OBJDIR)/, $(FAPI2PLATLIB_OBJECTS))
+
+all: $(OBJS)
+
+
+$(OBJS) $(OBJS:.o=.d): | $(OBJDIR)
+
+$(OBJDIR):
+ mkdir -p $(OBJDIR)
+
+ifneq ($(MAKECMDGOALS),clean)
+include $(OBJS:.o=.d)
+endif
+
diff --git a/hwpf/src/plat/fapi2ppeplatfiles.mk b/hwpf/src/plat/fapi2ppeplatfiles.mk
new file mode 100644
index 00000000..faf4845f
--- /dev/null
+++ b/hwpf/src/plat/fapi2ppeplatfiles.mk
@@ -0,0 +1,28 @@
+# @file fapi2ppefiles.mk
+#
+# @brief mk for including fapi2 object files
+#
+# @page ChangeLogs Change Logs
+# @section fapi2ppeplatfiles.mk
+# @verbatim
+#
+#
+# Change Log ******************************************************************
+# Flag Defect/Feature User Date Description
+# ------ -------------- ---------- ------------ -----------
+#
+# @endverbatim
+#
+##########################################################################
+# Object Files
+##########################################################################
+
+
+FAPI2PLAT-CPP-SOURCES += target.C
+FAPI2PLAT-CPP-SOURCES += plat_utils.C
+
+FAPI2PLAT-S-SOURCES =
+
+FAPI2PLATLIB_OBJECTS += $(FAPI2PLAT-CPP-SOURCES:.C=.o)
+FAPI2PLATLIB_OBJECTS += $(FAPI2PLAT-S-SOURCES:.S=.o)
+
diff --git a/hwpf/plat/src/plat_utils.C b/hwpf/src/plat/plat_utils.C
index 18aa4444..18aa4444 100644
--- a/hwpf/plat/src/plat_utils.C
+++ b/hwpf/src/plat/plat_utils.C
diff --git a/hwpf/plat/src/target.C b/hwpf/src/plat/target.C
index c70fc42c..c70fc42c 100644
--- a/hwpf/plat/src/target.C
+++ b/hwpf/src/plat/target.C
OpenPOWER on IntegriCloud