Jason M. Bills | 99b78ec | 2019-01-18 10:42:18 -0800 | [diff] [blame^] | 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(AddSELRequest* selRequest); |
| 23 | bool checkRedfishHooks(uint8_t generatorID, uint8_t evmRev, uint8_t sensorType, |
| 24 | uint8_t sensorNum, uint8_t eventType, uint8_t eventData1, |
| 25 | uint8_t eventData2, uint8_t eventData3); |
| 26 | namespace redfish_hooks |
| 27 | { |
| 28 | struct SELData |
| 29 | { |
| 30 | int generatorID; |
| 31 | int sensorNum; |
| 32 | int eventType; |
| 33 | int offset; |
| 34 | int eventData2; |
| 35 | int eventData3; |
| 36 | }; |
| 37 | |
| 38 | enum class BIOSSensors |
| 39 | { |
| 40 | memoryRASConfigStatus = 0x02, |
| 41 | biosPOSTError = 0x06, |
| 42 | intelUPILinkWidthReduced = 0x09, |
| 43 | memoryRASModeSelect = 0x12, |
| 44 | bootEvent = 0x83, |
| 45 | }; |
| 46 | |
| 47 | enum class BIOSSMISensors |
| 48 | { |
| 49 | mirroringRedundancyState = 0x01, |
| 50 | memoryECCError = 0x02, |
| 51 | legacyPCIError = 0x03, |
| 52 | pcieFatalError = 0x04, |
| 53 | pcieCorrectableError = 0x05, |
| 54 | sparingRedundancyState = 0x11, |
| 55 | memoryParityError = 0x13, |
| 56 | pcieFatalError2 = 0x14, |
| 57 | biosRecovery = 0x15, |
| 58 | adddcError = 0x20, |
| 59 | }; |
| 60 | |
| 61 | enum class BIOSEventTypes |
| 62 | { |
| 63 | digitalDiscrete = 0x09, |
| 64 | discreteRedundancyStates = 0x0b, |
| 65 | sensorSpecificOffset = 0x6f, |
| 66 | oemDiscrete0 = 0x70, |
| 67 | oemDiscrete1 = 0x71, |
| 68 | oemDiscrete6 = 0x76, |
| 69 | oemDiscrete7 = 0x77, |
| 70 | reservedA0 = 0xa0, |
| 71 | reservedF0 = 0xf0, |
| 72 | }; |
| 73 | } // namespace redfish_hooks |
| 74 | } // namespace intel_oem::ipmi::sel |