PHAL: Log Informational error for PEL created during poweroff

1)Log informational PELS in case system state is transitioning to
power-off for IPL procedures/hardware access failures

2) Don't add callouts to PEL's created during transition to
power-off as the CEC will not be in expected state.

Tested: transition to poweroff
root@xxxbmc:/usr# peltool -lfh
{
    "0x50003BEB": {
        "SRC":                  "BD503001",
        "Message":              "Failure occurred during boot process",
        "PLID":                 "0x50003BEB",
        "CreatorID":            "BMC",
        "Subsystem":            "CEC Hardware",
        "Commit Time":          "05/23/2022 13:57:53",
        "Sev":                  "Informational Event",
        "CompID":               "0x3000"
    }
}

root@xxxbmc:~# peltool -i 0x50003be0
{
"Private Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x3000",
    "Created at":               "05/23/2022 13:48:12",
    "Committed at":             "05/23/2022 13:48:12",
    "Creator Subsystem":        "BMC",
    "CSSVER":                   "",
    "Platform Log Id":          "0x50003BE0",
    "Entry Id":                 "0x50003BE0",
    "BMC Event Log Id":         "510"
},
"User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Log Committed by":         "0x2000",
    "Subsystem":                "CEC Hardware",
    "Event Scope":              "Entire Platform",
    "Event Severity":           "Informational Event",
    "Event Type":               "Miscellaneous, Informational Only",
    "Action Flags": [
                                "Event not customer viewable",
                                "Report Externally"
    ],
    "Host Transmission":        "Not Sent",
    "HMC Transmission":         "Not Sent"
},

.
.
.
Tested: transition to running
root@ever8bmc:/tmp# peltool -i 0x50003CF9
{
"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",
},

"User Data 0": {
    "Created by": "0x2000",
    "BMCState": "Ready",
    "BootState": "Unspecified",
    "ChassisState": "On",
    "FW Version ID": "fw1020.00-57.7-2-gd86188a773",
    "HostState": "TransitioningToRunning",
    "Process Name": "/usr/bin/openpower-proc-control",
    "System IM": "50003000"
},

Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I078d5cba2e0fb705bf424d2f8f3010f2cd2063bb
diff --git a/procedures/phal/reinit_devtree.cpp b/procedures/phal/reinit_devtree.cpp
index 60e6e49..c5ae058 100644
--- a/procedures/phal/reinit_devtree.cpp
+++ b/procedures/phal/reinit_devtree.cpp
@@ -107,6 +107,8 @@
 void reinitDevtree()
 {
     using json = nlohmann::json;
+    using Severity =
+        sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level;
 
     log<level::INFO>("reinitDevtree: started");
 
@@ -213,7 +215,8 @@
         jsonCalloutData["Priority"] = "M";
         jsonCalloutDataList.emplace_back(jsonCalloutData);
         openpower::pel::createErrorPEL(
-            "org.open_power.PHAL.Error.devtreeReinit", jsonCalloutDataList);
+            "org.open_power.PHAL.Error.devtreeReinit", jsonCalloutDataList, {},
+            Severity::Error);
     }
 
     // Step 4: Update devtree r/w file
@@ -252,7 +255,8 @@
         jsonCalloutData["Priority"] = "H";
         jsonCalloutDataList.emplace_back(jsonCalloutData);
         openpower::pel::createErrorPEL(
-            "org.open_power.PHAL.Error.devtreeReinit", jsonCalloutDataList);
+            "org.open_power.PHAL.Error.devtreeReinit", jsonCalloutDataList, {},
+            Severity::Error);
         throw;
     }
 }
diff --git a/procedures/phal/start_host.cpp b/procedures/phal/start_host.cpp
index 01cada9..fc30ecc 100644
--- a/procedures/phal/start_host.cpp
+++ b/procedures/phal/start_host.cpp
@@ -188,6 +188,8 @@
     try
     {
         using json = nlohmann::json;
+        using Severity =
+            sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level;
 
         json jsonCalloutDataList;
         jsonCalloutDataList = json::array();
@@ -197,7 +199,8 @@
         jsonCalloutDataList.emplace_back(jsonCalloutData);
 
         openpower::pel::createErrorPEL("org.open_power.PHAL.Error.Boot",
-                                       jsonCalloutDataList, additionalData);
+                                       jsonCalloutDataList, additionalData,
+                                       Severity::Error);
     }
     catch (const std::exception& e)
     {
diff --git a/procedures/phal/thread_stopall.cpp b/procedures/phal/thread_stopall.cpp
index 983a7ca..8c77690 100644
--- a/procedures/phal/thread_stopall.cpp
+++ b/procedures/phal/thread_stopall.cpp
@@ -137,7 +137,7 @@
         jsonCalloutDataList.emplace_back(jsonCalloutData);
         openpower::pel::createErrorPEL(
             "org.open_power.Processor.Error.SbeChipOpFailure",
-            jsonCalloutDataList, pelAdditionalData);
+            jsonCalloutDataList, pelAdditionalData, Severity::Informational);
         return;
     }
 }