AppaRao Puli | c532f55 | 2019-07-05 15:23:50 +0530 | [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 | #pragma once |
| 17 | |
| 18 | #include <string> |
| 19 | |
| 20 | namespace intel |
| 21 | { |
| 22 | namespace pfr |
| 23 | { |
| 24 | |
| 25 | enum class ImageType |
| 26 | { |
Vikram Bodireddy | 3c6c8c3 | 2019-12-05 11:06:15 +0530 | [diff] [blame] | 27 | cpldActive, |
| 28 | cpldRecovery, |
AppaRao Puli | c532f55 | 2019-07-05 15:23:50 +0530 | [diff] [blame] | 29 | biosActive, |
| 30 | biosRecovery, |
| 31 | bmcActive, |
| 32 | bmcRecovery |
| 33 | }; |
| 34 | |
AppaRao Puli | 88aa33b | 2019-07-18 23:49:55 +0530 | [diff] [blame] | 35 | enum class ActionType |
| 36 | { |
| 37 | recoveryCount, |
| 38 | recoveryReason, |
| 39 | panicCount, |
| 40 | panicReason, |
| 41 | majorError, |
| 42 | minorError |
| 43 | }; |
| 44 | |
AppaRao Puli | dbe184d | 2019-10-09 18:04:22 +0530 | [diff] [blame] | 45 | std::string toHexString(const uint8_t val); |
AppaRao Puli | 4b639a2 | 2019-10-01 18:12:59 +0530 | [diff] [blame] | 46 | std::string getFirmwareVersion(const ImageType &imgType); |
AppaRao Puli | c532f55 | 2019-07-05 15:23:50 +0530 | [diff] [blame] | 47 | int getProvisioningStatus(bool &ufmLocked, bool &ufmProvisioned); |
AppaRao Puli | dbe184d | 2019-10-09 18:04:22 +0530 | [diff] [blame] | 48 | int readCpldReg(const ActionType &action, uint8_t &value); |
AppaRao Puli | 46cead9 | 2019-07-22 16:50:09 +0530 | [diff] [blame] | 49 | int setBMCBootCheckpoint(const uint8_t checkPoint); |
AppaRao Puli | c532f55 | 2019-07-05 15:23:50 +0530 | [diff] [blame] | 50 | |
| 51 | } // namespace pfr |
| 52 | } // namespace intel |