blob: 542cb518064d4d02a825399ac7d6a2d642d436a6 [file] [log] [blame]
AppaRao Pulic532f552019-07-05 15:23:50 +05301/*
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
20namespace intel
21{
22namespace pfr
23{
24
25enum class ImageType
26{
27 cpld,
28 biosActive,
29 biosRecovery,
30 bmcActive,
31 bmcRecovery
32};
33
AppaRao Puli88aa33b2019-07-18 23:49:55 +053034enum class ActionType
35{
36 recoveryCount,
37 recoveryReason,
38 panicCount,
39 panicReason,
40 majorError,
41 minorError
42};
43
AppaRao Pulidbe184d2019-10-09 18:04:22 +053044std::string toHexString(const uint8_t val);
AppaRao Puli4b639a22019-10-01 18:12:59 +053045std::string getFirmwareVersion(const ImageType &imgType);
AppaRao Pulic532f552019-07-05 15:23:50 +053046int getProvisioningStatus(bool &ufmLocked, bool &ufmProvisioned);
AppaRao Pulidbe184d2019-10-09 18:04:22 +053047int readCpldReg(const ActionType &action, uint8_t &value);
AppaRao Puli46cead92019-07-22 16:50:09 +053048int setBMCBootCheckpoint(const uint8_t checkPoint);
AppaRao Pulic532f552019-07-05 15:23:50 +053049
50} // namespace pfr
51} // namespace intel