machine check error: update machine check error decoding

Now machine check error would display severity detail

Logs example:
Sensor: MACHINE_CHK_ERR (0x40),
    Event Data: (AC3900) Deferred Error,
        Machine Check bank Number 57, CPU 0, Core 0 Assertion",

Sensor: MACHINE_CHK_ERR (0x40),
    Event Data: (AC1900) Correctable Error,
        Machine Check bank Number 25, CPU 0, Core 0 Assertion",

Sensor: MACHINE_CHK_ERR (0x40),
    Event Data: (AB1900) Uncorrected Recoverable Error,
        Machine Check bank Number 25, CPU 0, Core 0 Assertion",

Sensor: MACHINE_CHK_ERR (0x40),
    Event Data: (AB3900) Uncorrected Thread Fatal Error,
        Machine Check bank Number 57, CPU 0, Core 0 Assertion",

Sensor: MACHINE_CHK_ERR (0x40),
    Event Data: (AB5900) Uncorrected System Fatal Error,
        Machine Check bank Number 89, CPU 0, Core 0 Assertion"

Change-Id: I823d9ddcff943c4c4ddb64bdea302b2ae9554a69
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
diff --git a/src/selcommands.cpp b/src/selcommands.cpp
index 684c027..b959382 100644
--- a/src/selcommands.cpp
+++ b/src/selcommands.cpp
@@ -343,17 +343,39 @@
 static void logMchChkErr(uint8_t* data, std::string& errLog)
 {
     /* TODO: Call add_cri_sel for CRITICAL_IRQ */
-    if ((data[0] & 0x0F) == 0x0B)
+    switch (data[0] & 0x0F)
     {
-        errLog = "Uncorrectable";
-    }
-    else if ((data[0] & 0x0F) == 0x0C)
-    {
-        errLog = "Correctable";
-    }
-    else
-    {
-        errLog = "Unknown";
+        case 0x0B:
+            switch ((data[1] >> 5) & 0x03)
+            {
+                case 0x00:
+                    errLog = "Uncorrected Recoverable Error";
+                    break;
+                case 0x01:
+                    errLog = "Uncorrected Thread Fatal Error";
+                    break;
+                case 0x02:
+                    errLog = "Uncorrected System Fatal Error";
+                    break;
+                default:
+                    errLog = "Unknown";
+            }
+            break;
+        case 0x0C:
+            switch ((data[1] >> 5) & 0x03)
+            {
+                case 0x00:
+                    errLog = "Correctable Error";
+                    break;
+                case 0x01:
+                    errLog = "Deferred Error";
+                    break;
+                default:
+                    errLog = "Unknown";
+            }
+            break;
+        default:
+            errLog = "Unknown";
     }
 
     errLog += ", Machine Check bank Number " + std::to_string(data[1]) +