Added getScomReg, getIdScomReg, & associated calls

Added getScomReg and getIdScomReg to simulator.hpp.  These lookup the
register values from a map and return the value.

In user_interface.cpp and the registerRead function, added case stanzas that
call the above functions, take care of endianness, and pass the data back
to the caller through the o_buffer and io_bufSize parameters.

Signed-off-by: Paul Greenwood <Paul.Greenwood@ibm.com>
Change-Id: Ie07e97d23a2f0a9b0073d99d8744fef91c8586a0
2 files changed
tree: 2453182f6a04bdbab00e8d4de0fe2dc19fcdf595
  1. src/
  2. test/
  3. .clang-format
  4. .gitignore
  5. LICENSE
  6. MAINTAINERS
  7. meson.build
  8. meson_options.txt
  9. README.md
README.md

openpower-libhei: Hardware Error Isolation for POWER Systems

This library is a common, portable code base for isolating errors reported by hardware registers on POWER Systems chips.

The primary consumers (and requirements drivers) will be:

Core API

See the primary API definitions for details on how to use this library.

Integration

This library is intended to be integrated into containing user applications as a set of source files (either imported, or as a git subtree/submodule).

Details TBD.

User Application Requirements and APIs

  • The method to access hardware register data will vary per user application. Therefore, this library will declare the hardware access user APIs, but each containing user application must implement the APIs for their own environment.
  • This library will not contain data regarding hardware specific information. Instead, that information will be provided by the user application in the form of the Chip Data Files.
  • Tracing, or logging, methods will vary per user application. Specifically, FSP and Hostboot firmware utilize specialized macros as a mechanism to save code image space. Therefore, the user application will need to provide a specific header file that defines these macros. Details are in the common includes header.
  • Methods to assert programming bugs will vary per user application. Therefore, much like tracing, the user application will need to provide a specific header file that defines macros for assertion. Details are included in the common includes header.

Environment configuration

  • __HEI_READ_ONLY: When defined, it will ensure any hardware write support is disabled. Note that the Chip Data Files will contain rules for clearing and masking register bits. Both of which will require modifying hardware registers, which is not allowed by user applications like OpenBMC or FSP firmware.

Development Notes

  • The Hostboot and FSP environments only support up to C++11. Therefore, this library cannot use anything newer at this time.
  • Hostboot has a very limited environment. It does not include libc or libstdc++. However, Hostboot has implemented select functions from those libraries as needed. For details, you can reference src/include/ in the POWER Systems Hostboot firmware.