blob: 61ff37caec4afa4dabb943fc5b370d60eff4508b [file] [log] [blame]
Murulidhar Natarajueb0a2972017-03-27 05:58:47 -05001#pragma once
2
3#include <stdint.h>
4
5namespace openpower
6{
7namespace sbe
8{
9namespace scom
10{
11
12/**
13 * @brief Read processor SCOM register.
14 *
15 * Throws an exception on error.
16 *
17 * @param[in] FIFO device path associated with the SBE.
18 * @param[in] SCOM register address.
19 * @return The register data
20 */
Patrick Ventureda79c9c2018-11-01 15:35:52 -070021uint64_t read(const char* devPath, uint64_t address);
Murulidhar Natarajueb0a2972017-03-27 05:58:47 -050022
23/**
24 * @brief Write processor SCOM register.
25 *
26 * Throws an exception on error.
27 *
28 * @param[in] FIFO device path associated with the SBE.
29 * @param[in] SCOM register address.
30 * @param[in] Data to be written into the register.
31 */
Patrick Ventureda79c9c2018-11-01 15:35:52 -070032void write(const char* devPath, uint64_t address, uint64_t data);
Murulidhar Natarajueb0a2972017-03-27 05:58:47 -050033
Patrick Ventureda79c9c2018-11-01 15:35:52 -070034} // namespace scom
35} // namespace sbe
36} // namespace openpower