1 /* 2 // Copyright (c) 2019 Intel Corporation 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 */ 16 17 #pragma once 18 #include <storagecommands.hpp> 19 20 namespace intel_oem::ipmi::sel 21 { 22 bool checkRedfishHooks(uint16_t recordID, uint8_t recordType, 23 uint32_t timestamp, uint16_t generatorID, uint8_t evmRev, 24 uint8_t sensorType, uint8_t sensorNum, uint8_t eventType, 25 uint8_t eventData1, uint8_t eventData2, 26 uint8_t eventData3); 27 bool checkRedfishHooks(uint8_t generatorID, uint8_t evmRev, uint8_t sensorType, 28 uint8_t sensorNum, uint8_t eventType, uint8_t eventData1, 29 uint8_t eventData2, uint8_t eventData3); 30 namespace redfish_hooks 31 { 32 struct SELData 33 { 34 int generatorID; 35 int sensorNum; 36 int eventType; 37 int offset; 38 int eventData2; 39 int eventData3; 40 }; 41 42 enum class BIOSSensors 43 { 44 memoryRASConfigStatus = 0x02, 45 biosPOSTError = 0x06, 46 intelUPILinkWidthReduced = 0x09, 47 memoryRASModeSelect = 0x12, 48 bootEvent = 0x83, 49 }; 50 51 enum class BIOSSMISensors 52 { 53 mirroringRedundancyState = 0x01, 54 memoryECCError = 0x02, 55 legacyPCIError = 0x03, 56 pcieFatalError = 0x04, 57 pcieCorrectableError = 0x05, 58 sparingRedundancyState = 0x11, 59 memoryParityError = 0x13, 60 pcieFatalError2 = 0x14, 61 biosRecovery = 0x15, 62 adddcError = 0x20, 63 }; 64 65 enum class BIOSEventTypes 66 { 67 digitalDiscrete = 0x09, 68 discreteRedundancyStates = 0x0b, 69 sensorSpecificOffset = 0x6f, 70 oemDiscrete0 = 0x70, 71 oemDiscrete1 = 0x71, 72 oemDiscrete6 = 0x76, 73 oemDiscrete7 = 0x77, 74 reservedA0 = 0xa0, 75 reservedF0 = 0xf0, 76 }; 77 } // namespace redfish_hooks 78 } // namespace intel_oem::ipmi::sel 79