blob: 68d51b4b236a441a0322fc10c1dcb15a1dc96f7f [file] [log] [blame]
Patrick Venture33569752018-03-12 18:56:14 -07001#pragma once
2
Kun Yi35b6c672018-06-11 20:44:43 -07003#include <sdbusplus/bus.hpp>
4#include <sdbusplus/server.hpp>
Patrick Ventureb5754fd2018-09-10 13:13:58 -07005#include <xyz/openbmc_project/State/Boot/Raw/server.hpp>
Kun Yi35b6c672018-06-11 20:44:43 -07006
Patrick Venture33569752018-03-12 18:56:14 -07007/* The LPC snoop on port 80h is mapped to this dbus path. */
Jonathan Doman60252ee2020-12-21 20:44:59 -08008#define SNOOP_OBJECTPATH "/xyz/openbmc_project/state/boot/raw0"
Patrick Venture33569752018-03-12 18:56:14 -07009/* The LPC snoop on port 80h is mapped to this dbus service. */
10#define SNOOP_BUSNAME "xyz.openbmc_project.State.Boot.Raw"
Kun Yi35b6c672018-06-11 20:44:43 -070011
12template <typename... T>
13using ServerObject = typename sdbusplus::server::object::object<T...>;
14using PostInterface = sdbusplus::xyz::openbmc_project::State::Boot::server::Raw;
15using PostObject = ServerObject<PostInterface>;
Manojkiran Edaba5258f2021-02-25 13:23:33 +053016using primary_post_code_t = uint64_t;
17using secondary_post_code_t = std::vector<uint8_t>;
18using postcode_t = std::tuple<primary_post_code_t, secondary_post_code_t>;
Kun Yi35b6c672018-06-11 20:44:43 -070019
20class PostReporter : public PostObject
21{
22 public:
23 PostReporter(sdbusplus::bus::bus& bus, const char* objPath, bool defer) :
24 PostObject(bus, objPath, defer)
25 {
26 }
27};