PHAL: Set HardwareIsolation policy before start the host

- The HardwareIsolation (aka guard) policy is used to prevent
  the HardwareIsolation functionality during the boot of the host
  by the user.

- In this patch, using that policy flag to ignore the isolated hardware
  records to apply during the start of the host from the BMC context.

- By default, it will be set as "true" before starting the host to boot
  if the HardwareIsolation policy is not present or failed to read that
  policy.

  - Created the error log with procedure callout if failed to read
    the HardwareIsolation policy.

Tested:
- Verified the HWAS_STATE of the isolated hardware, is not applied when
  the HardwareIsolation policy is enabled.

- Verified the HWAS_STATE of the isolated hardware, is applied when
  the HardwareIsolation policy is disabled.

- Verified the HWAS_STATE of the isolated hardware, is applied when
  the HardwareIsolation policy is not present.

- PEL for the third test case.

```
{
"Private Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x3000",
...
"User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Log Committed by":         "0x2000",
    "Subsystem":                "CEC Hardware",
    "Event Scope":              "Entire Platform",
    "Event Severity":           "Unrecoverable Error",
    "Event Type":               "Not Applicable",
    "Action Flags": [
                                "Service Action Required",
                                "Report Externally",
                                "HMC Call Home"
    ],
    "Host Transmission":        "Not Sent",
    "HMC Transmission":         "Not Sent"
},
...
"Primary SRC": {
    "Section Version":          "1",
    "Sub-section type":         "1",
    "Created by":               "0x3000",
...
    "Error Details": {
        "Message":              "Failure occured during boot process"
    },
    "Valid Word Count":         "0x09",
    "Reference Code":           "BD503001",
...
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Maintenance Procedure Required",
            "Priority":         "Medium Priority",
            "Procedure":        "BMC0001"
        }]
    }
...
"User Data 1": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "REASON_FOR_PEL": "Failed to read the HardwareIsolation policy from the path [/xyz/openbmc_project/hardware_isolation/allow_hw_isolation] interface [xyz.openbmc_project.Object.Enable]. Continuing with default mode(allow_hw_isolation)",
    "_PID": "681"
},
"User Data 2": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "Data": [
        {
            "Priority": "M",
            "Procedure": "BMC0001"
        }
    ]
}
}
```

Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
Change-Id: I2d7e33ad1e6af69b150d6637619c17db5b9a7151
1 file changed
tree: de391fa60a0b93d642d1bbb9f1f3b243b02e30e1
  1. extensions/
  2. procedures/
  3. service_files/
  4. test/
  5. .clang-format
  6. .gitignore
  7. .shellcheck
  8. cfam_access.cpp
  9. cfam_access.hpp
  10. ext_interface.cpp
  11. ext_interface.hpp
  12. filedescriptor.cpp
  13. filedescriptor.hpp
  14. LICENSE
  15. MAINTAINERS
  16. meson.build
  17. meson_options.txt
  18. nmi_interface.cpp
  19. nmi_interface.hpp
  20. nmi_main.cpp
  21. OWNERS
  22. p10_cfam.hpp
  23. p9_cfam.hpp
  24. proc_control.cpp
  25. README.md
  26. registration.hpp
  27. targeting.cpp
  28. targeting.hpp
  29. temporary_file.cpp
  30. temporary_file.hpp
  31. util.cpp
  32. util.hpp
README.md

Contains procedures that interact with the OpenPower nest chipset.

To Build

To build this package, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To build with phal feature:
    1. meson builddir -Dphal=enabled -Dopenfsi=enabled
    2. ninja -C builddir

To clean the repository run `ninja -C builddir/ clean`.