Matt Spinler | df13bdb | 2019-07-10 16:54:13 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <cstdint> |
| 4 | |
| 5 | namespace openpower |
| 6 | { |
| 7 | namespace pels |
| 8 | { |
| 9 | |
| 10 | namespace detail |
| 11 | { |
| 12 | |
| 13 | /** |
| 14 | * @brief Adds the 1 byte log creator prefix to the log ID |
| 15 | * |
| 16 | * @param[in] id - the ID to add it to |
| 17 | * |
| 18 | * @return - the full log ID |
| 19 | */ |
| 20 | uint32_t addLogIDPrefix(uint32_t id); |
| 21 | |
| 22 | /** |
| 23 | * @brief Generates a PEL ID based on the current time. |
| 24 | * |
| 25 | * Used for error scenarios where the normal method doesn't |
| 26 | * work in order to get a unique ID still. |
| 27 | * |
| 28 | * @return A unique log ID. |
| 29 | */ |
| 30 | uint32_t getTimeBasedLogID(); |
| 31 | |
| 32 | } // namespace detail |
| 33 | |
| 34 | /** |
| 35 | * @brief Generates a unique PEL log entry ID every time |
| 36 | * it is called. |
| 37 | * |
| 38 | * This ID is used at offset 0x2C in the Private Header |
| 39 | * section of a PEL. For single BMC systems, it must |
| 40 | * start with 0x50. |
| 41 | * |
| 42 | * @return uint32_t - The log ID |
| 43 | */ |
| 44 | uint32_t generatePELID(); |
| 45 | |
| 46 | } // namespace pels |
| 47 | } // namespace openpower |