selcommands.cpp (7451903cddb3c35b730ae629fd3a17c5ab1a0b66) selcommands.cpp (519530beae4e7d368f5fc31fa252d51fd7caa601)
1/*
2 * Copyright (c) 2018 Intel Corporation.
3 * Copyright (c) 2018-present Facebook.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *

--- 205 unchanged lines hidden (view full) ---

214
215 selDataObj[ss.str()][KEY_SEL_ENTRY_RAW] = keyStr;
216 flush();
217 return selCount;
218 }
219};
220
221/*
1/*
2 * Copyright (c) 2018 Intel Corporation.
3 * Copyright (c) 2018-present Facebook.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *

--- 205 unchanged lines hidden (view full) ---

214
215 selDataObj[ss.str()][KEY_SEL_ENTRY_RAW] = keyStr;
216 flush();
217 return selCount;
218 }
219};
220
221/*
222 * A Function to parse common SEL message, a helper funciton
222 * A Function to parse common SEL message, a helper function
223 * for parseStdSel.
224 *
223 * for parseStdSel.
224 *
225 * Note that this function __CANNOT__ be overriden.
225 * Note that this function __CANNOT__ be overridden.
226 * To add board specific routine, please override parseStdSel.
227 */
228
229/*Used by decoding ME event*/
230std::vector<std::string> nmDomName = {
231 "Entire Platform", "CPU Subsystem",
232 "Memory Subsystem", "HW Protection",
233 "High Power I/O subsystem", "Unknown"};

--- 318 unchanged lines hidden (view full) ---

552 }
553}
554
555static void logPwrErr(uint8_t* data, std::string& errLog)
556{
557 if (data[0] == 0x1)
558 {
559 errLog = "SYS_PWROK failure";
226 * To add board specific routine, please override parseStdSel.
227 */
228
229/*Used by decoding ME event*/
230std::vector<std::string> nmDomName = {
231 "Entire Platform", "CPU Subsystem",
232 "Memory Subsystem", "HW Protection",
233 "High Power I/O subsystem", "Unknown"};

--- 318 unchanged lines hidden (view full) ---

552 }
553}
554
555static void logPwrErr(uint8_t* data, std::string& errLog)
556{
557 if (data[0] == 0x1)
558 {
559 errLog = "SYS_PWROK failure";
560 /* Also try logging to Critial log file, if available */
560 /* Also try logging to Critical log file, if available */
561 /* "SYS_PWROK failure,FRU:1" */
562 }
563 else if (data[0] == 0x2)
564 {
565 errLog = "PCH_PWROK failure";
561 /* "SYS_PWROK failure,FRU:1" */
562 }
563 else if (data[0] == 0x2)
564 {
565 errLog = "PCH_PWROK failure";
566 /* Also try logging to Critial log file, if available */
566 /* Also try logging to Critical log file, if available */
567 /* "PCH_PWROK failure,FRU:1" */
568 }
569 else
570 {
571 errLog = "Unknown";
572 }
573}
574
575static void logCatErr(uint8_t* data, std::string& errLog)
576{
577 if (data[0] == 0x0)
578 {
579 errLog = "IERR/CATERR";
567 /* "PCH_PWROK failure,FRU:1" */
568 }
569 else
570 {
571 errLog = "Unknown";
572 }
573}
574
575static void logCatErr(uint8_t* data, std::string& errLog)
576{
577 if (data[0] == 0x0)
578 {
579 errLog = "IERR/CATERR";
580 /* Also try logging to Critial log file, if available */
580 /* Also try logging to Critical log file, if available */
581 /* "IERR,FRU:1 */
582 }
583 else if (data[0] == 0xB)
584 {
585 errLog = "MCERR/CATERR";
581 /* "IERR,FRU:1 */
582 }
583 else if (data[0] == 0xB)
584 {
585 errLog = "MCERR/CATERR";
586 /* Also try logging to Critial log file, if available */
586 /* Also try logging to Critical log file, if available */
587 /* "MCERR,FRU:1 */
588 }
589 else
590 {
591 errLog = "Unknown";
592 }
593}
594
595static void logDimmHot(uint8_t* data, std::string& errLog)
596{
597 if ((data[0] << 16 | data[1] << 8 | data[2]) == 0x01FFFF)
598 {
599 errLog = "SOC MEMHOT";
600 }
601 else
602 {
603 errLog = "Unknown";
587 /* "MCERR,FRU:1 */
588 }
589 else
590 {
591 errLog = "Unknown";
592 }
593}
594
595static void logDimmHot(uint8_t* data, std::string& errLog)
596{
597 if ((data[0] << 16 | data[1] << 8 | data[2]) == 0x01FFFF)
598 {
599 errLog = "SOC MEMHOT";
600 }
601 else
602 {
603 errLog = "Unknown";
604 /* Also try logging to Critial log file, if available */
604 /* Also try logging to Critical log file, if available */
605 /* ""CPU_DIMM_HOT %s,FRU:1" */
606 }
607}
608
609static void logSwNMI(uint8_t* data, std::string& errLog)
610{
611 if ((data[0] << 16 | data[1] << 8 | data[2]) == 0x03FFFF)
612 {

--- 375 unchanged lines hidden (view full) ---

988 " Location: DIMM D0";
989 }
990 else
991 {
992 errStr += " Node: " + std::to_string(nodeNum) + "," +
993 " Card: " + std::to_string(chNum) + "," +
994 " Module: " + std::to_string(dimmNum) + "," +
995 " Rank Number: " + std::to_string(rankNum) + "," +
605 /* ""CPU_DIMM_HOT %s,FRU:1" */
606 }
607}
608
609static void logSwNMI(uint8_t* data, std::string& errLog)
610{
611 if ((data[0] << 16 | data[1] << 8 | data[2]) == 0x03FFFF)
612 {

--- 375 unchanged lines hidden (view full) ---

988 " Location: DIMM D0";
989 }
990 else
991 {
992 errStr += " Node: " + std::to_string(nodeNum) + "," +
993 " Card: " + std::to_string(chNum) + "," +
994 " Module: " + std::to_string(dimmNum) + "," +
995 " Rank Number: " + std::to_string(rankNum) + "," +
996 " Location: DIMM Unknow";
996 " Location: DIMM Unknown";
997 }
998}
999
1000static void parseStdSel(StdSELEntry* data, std::string& errStr)
1001{
1002 std::stringstream tmpStream;
1003 tmpStream << std::hex << std::uppercase;
1004

--- 774 unchanged lines hidden ---
997 }
998}
999
1000static void parseStdSel(StdSELEntry* data, std::string& errStr)
1001{
1002 std::stringstream tmpStream;
1003 tmpStream << std::hex << std::uppercase;
1004

--- 774 unchanged lines hidden ---