Disabled copy contructor for ScomRegister and IdScomRegister

In general, these objects will be stored in the flyweights and once
created there shouldn't be copies made of them. Allowing the copy
constructor will allow something like 'SR sr = fw.get(...)' (note that
code used copy instead of assignment). Instead, that code should keep a
reference to the object in the flyweight like: 'SR & sr = fw.get(...)'.
Deleting the copy constructor forces this behavior.

The slight complication to this is that the flyweights need to use the
copy constructor in the get() function. So to work around this the
flyweights have been made a friend class in the associated register
classes so that it will have access to the private copy constructor.

Change-Id: I0e2f31a2bbf16b69e5210da8fefffd5bd51fcf6d
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
1 file changed
tree: 31baa84c4aaee216a8bd05fd3eca1b2a8338abec
  1. src/
  2. test/
  3. .gitignore
  4. LICENSE
  5. MAINTAINERS
  6. meson.build
  7. meson_options.txt
  8. 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.