Patrick Venture | 3356975 | 2018-03-12 18:56:14 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include <sdbusplus/server.hpp> |
Patrick Venture | b5754fd | 2018-09-10 13:13:58 -0700 | [diff] [blame] | 5 | #include <xyz/openbmc_project/State/Boot/Raw/server.hpp> |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 6 | |
Patrick Venture | 3356975 | 2018-03-12 18:56:14 -0700 | [diff] [blame] | 7 | /* The LPC snoop on port 80h is mapped to this dbus path. */ |
Kumar Thangavel | 0269eaf | 2021-08-11 15:45:18 +0530 | [diff] [blame] | 8 | constexpr char snoopObject[] = "/xyz/openbmc_project/state/boot/raw0"; |
Patrick Venture | 3356975 | 2018-03-12 18:56:14 -0700 | [diff] [blame] | 9 | /* The LPC snoop on port 80h is mapped to this dbus service. */ |
Kumar Thangavel | 0269eaf | 2021-08-11 15:45:18 +0530 | [diff] [blame] | 10 | constexpr char snoopDbus[] = "xyz.openbmc_project.State.Boot.Raw"; |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 11 | |
| 12 | template <typename... T> |
Patrick Williams | aebf87c | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 13 | using ServerObject = typename sdbusplus::server::object_t<T...>; |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 14 | using PostInterface = sdbusplus::xyz::openbmc_project::State::Boot::server::Raw; |
| 15 | using PostObject = ServerObject<PostInterface>; |
Manojkiran Eda | ba5258f | 2021-02-25 13:23:33 +0530 | [diff] [blame] | 16 | using primary_post_code_t = uint64_t; |
| 17 | using secondary_post_code_t = std::vector<uint8_t>; |
| 18 | using postcode_t = std::tuple<primary_post_code_t, secondary_post_code_t>; |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 19 | |
| 20 | class PostReporter : public PostObject |
| 21 | { |
| 22 | public: |
Patrick Williams | aebf87c | 2022-07-22 19:26:54 -0500 | [diff] [blame^] | 23 | PostReporter(sdbusplus::bus_t& bus, const char* objPath, bool defer) : |
Patrick Williams | 80be5d8 | 2022-04-07 15:41:48 -0500 | [diff] [blame] | 24 | PostObject(bus, objPath, |
| 25 | defer ? PostObject::action::defer_emit |
| 26 | : PostObject::action::emit_object_added) |
Kun Yi | 35b6c67 | 2018-06-11 20:44:43 -0700 | [diff] [blame] | 27 | { |
| 28 | } |
| 29 | }; |