blob: 9b987ac915c5aec4db92f0a0a2476e7bcc50425b [file] [log] [blame]
Patrick Venture01123b22019-06-20 13:49:06 -07001#pragma once
2
Patrick Venture01123b22019-06-20 13:49:06 -07003#include <ipmiblob/blob_interface.hpp>
4
Patrick Venture9b37b092020-05-28 20:58:57 -07005#include <cstdint>
6
Patrick Venture01123b22019-06-20 13:49:06 -07007namespace host_tool
8{
9
10/**
11 * Poll an open verification session.
12 *
13 * @param[in] session - the open verification session
14 * @param[in] blob - pointer to blob interface implementation object.
Jie Yang328f5202021-03-16 00:52:07 -070015 * @return true if the verification was successful.
Patrick Venture01123b22019-06-20 13:49:06 -070016 */
17bool pollStatus(std::uint16_t session, ipmiblob::BlobInterface* blob);
18
Vivekanand Veeracholanc7fa2c22021-02-18 18:05:41 -080019/**
Jie Yang328f5202021-03-16 00:52:07 -070020 * Poll an open firmware version blob session and check if it ready to read.
21 *
22 * @param[in] session - the open firmware version blob session
23 * @param[in] blob - pointer to blob interface implementation object
24 * @return the polling status and blob buffer size
25 */
26std::pair<bool, uint32_t> pollReadReady(std::uint16_t session,
27 ipmiblob::BlobInterface* blob);
28
29/**
Vivekanand Veeracholanc7fa2c22021-02-18 18:05:41 -080030 * Aligned memcpy
31 * @param[out] destination - destination memory pointer
32 * @param[in] source - source memory pointer
33 * @param[in] size - bytes to copy
34 * @return destination pointer
35 */
36void* memcpyAligned(void* destination, const void* source, std::size_t size);
37
Patrick Venture01123b22019-06-20 13:49:06 -070038} // namespace host_tool