phal: Create PEL for empty guard file

Currently at the time of IPLing if the guard file is not present or
found empty, the IPLing terminates with an exception.

Added the new PEL "org.open_power.PHAL.Error.GuardPartitionAccess" to
address the above issue and continue to boot

Adding the IPL_ERR_GUARD_PARTITION_ACCESS enables us to generate the PEL
and "User Data 1" provides more information regarding the PEL

Tested:
Point to dummy file instead of actual guard file
Using the above error in the ipl callback, able to generate the below PEL
{
    "0x50000E0C": {
        "SRC":                  "BD8D300B",
        "Message":              "Guard partition access failure",
        "PLID":                 "0x50000E0C",
        "CreatorID":            "BMC",
        "Subsystem":            "BMC Firmware",
        "Commit Time":          "10/06/2022 12:33:57",
        "Sev":                  "Predictive Error",
        "CompID":               "0x3000"
    }
}
...
    },
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Maintenance Procedure Required",
            "Priority":         "Mandatory, replace all with this type as a
unit",
            "Procedure":        "BMC0001"
        }]
    }
},
...
    "LOG013 2022-10-06 12:33:57": "Guard file
/var/lib/phosphor-software-manager/hostfw/running/NOFILE does not exist",
    "_PID": "4393"
}

Signed-off-by: deepakala <deepakala.karthikeyan@ibm.com>
Change-Id: I07be6de35c9d5ce7b155e82fdcbc315a181d24c6
2 files changed
tree: 8228cef5eea4c65a17822df1b195a2ac8981be19
  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. meson.build
  16. meson_options.txt
  17. nmi_interface.cpp
  18. nmi_interface.hpp
  19. nmi_main.cpp
  20. OWNERS
  21. p10_cfam.hpp
  22. p9_cfam.hpp
  23. proc_control.cpp
  24. README.md
  25. registration.hpp
  26. targeting.cpp
  27. targeting.hpp
  28. temporary_file.cpp
  29. temporary_file.hpp
  30. util.cpp
  31. 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`.