gem5
v21.0.1.0
|
This protocol describes the properties of the implementation and provides generic error management. More...
#include <scmi_protocols.hh>
Public Types | |
enum | Commands { Commands::VERSION = 0x0, Commands::ATTRIBUTES = 0x1, Commands::MESSAGE_ATTRIBUTES = 0x2, Commands::DISCOVER_VENDOR = 0x3, Commands::DISCOVER_SUB_VENDOR = 0x4, Commands::DISCOVER_IMPLEMENTATION_VERSION = 0x5, Commands::DISCOVER_LIST_PROTOCOLS = 0x6, Commands::DISCOVER_AGENT = 0x7, Commands::NOTIFY_ERRORS = 0x8, Commands::SET_DEVICE_PERMISSIONS = 0x9, Commands::SET_PROTOCOL_PERMISSIONS = 0xa, Commands::RESET_AGENT_CONFIGURATION = 0xb } |
Public Member Functions | |
BaseProtocol (Platform &_platform) | |
void | handleMessage (Message &msg) override |
void | version (Message &msg) override |
void | attributes (Message &msg) override |
void | messageAttributes (Message &msg) override |
void | discoverVendor (Message &msg) |
void | discoverSubVendor (Message &msg) |
void | discoverImplVersion (Message &msg) |
void | discoverListProtocols (Message &msg) |
void | discoverAgent (Message &msg) |
void | invalidCommand (Message &msg) |
![]() | |
Protocol (Platform &_platform) | |
virtual | ~Protocol () |
const std::string | name () const |
Protected Member Functions | |
bool | implementedProtocol (Commands message_id) const |
Protected Attributes | |
const std::string | vendor |
const std::string | subvendor |
const uint32_t | implementationVersion |
![]() | |
Platform & | platform |
Static Private Attributes | |
static const uint32_t | PROTOCOL_VERSION = 0x10000 |
Additional Inherited Members | |
![]() | |
static const uint32_t | MAX_STRING_SIZE = 15 |
This protocol describes the properties of the implementation and provides generic error management.
The Base protocol provides commands to:
Definition at line 105 of file scmi_protocols.hh.
|
strong |
Definition at line 112 of file scmi_protocols.hh.
|
explicit |
Definition at line 51 of file scmi_protocols.cc.
References fatal_if, SCMI::Protocol::MAX_STRING_SIZE, subvendor, and vendor.
|
overridevirtual |
Implements SCMI::Protocol.
Definition at line 119 of file scmi_protocols.cc.
References SCMI::Message::length, SCMI::Platform::numAgents(), SCMI::Platform::numProtocols(), SCMI::Message::payload, SCMI::Protocol::platform, replaceBits(), and SCMI::SUCCESS.
Referenced by handleMessage().
void BaseProtocol::discoverAgent | ( | Message & | msg | ) |
Definition at line 244 of file scmi_protocols.cc.
References SCMI::Platform::getAgent(), SCMI::Message::length, SCMI::NOT_FOUND, SCMI::Platform::numAgents(), SCMI::Message::payload, SCMI::Protocol::platform, and SCMI::SUCCESS.
Referenced by handleMessage().
void BaseProtocol::discoverImplVersion | ( | Message & | msg | ) |
Definition at line 199 of file scmi_protocols.cc.
References implementationVersion, SCMI::Message::length, SCMI::Message::payload, and SCMI::SUCCESS.
Referenced by handleMessage().
void BaseProtocol::discoverListProtocols | ( | Message & | msg | ) |
Definition at line 210 of file scmi_protocols.cc.
References SCMI::END, SCMI::INVALID_PARAMETERS, SCMI::Message::length, SCMI::Platform::numProtocols(), SCMI::Message::payload, SCMI::Protocol::platform, SCMI::Platform::protocolList(), SCMI::START, and SCMI::SUCCESS.
Referenced by handleMessage().
void BaseProtocol::discoverSubVendor | ( | Message & | msg | ) |
Definition at line 186 of file scmi_protocols.cc.
References SCMI::Message::length, SCMI::Protocol::MAX_STRING_SIZE, SCMI::Message::payload, subvendor, and SCMI::SUCCESS.
Referenced by handleMessage().
void BaseProtocol::discoverVendor | ( | Message & | msg | ) |
Definition at line 173 of file scmi_protocols.cc.
References SCMI::Message::length, SCMI::Protocol::MAX_STRING_SIZE, SCMI::Message::payload, SCMI::SUCCESS, and vendor.
Referenced by handleMessage().
|
overridevirtual |
Implements SCMI::Protocol.
Definition at line 64 of file scmi_protocols.cc.
References ATTRIBUTES, attributes(), DISCOVER_AGENT, DISCOVER_IMPLEMENTATION_VERSION, DISCOVER_LIST_PROTOCOLS, DISCOVER_SUB_VENDOR, DISCOVER_VENDOR, discoverAgent(), discoverImplVersion(), discoverListProtocols(), discoverSubVendor(), discoverVendor(), DPRINTF, invalidCommand(), MESSAGE_ATTRIBUTES, messageAttributes(), SCMI::Platform::messageID(), NOTIFY_ERRORS, RESET_AGENT_CONFIGURATION, SET_DEVICE_PERMISSIONS, SET_PROTOCOL_PERMISSIONS, VERSION, version(), and warn.
|
protected |
Definition at line 135 of file scmi_protocols.cc.
References ATTRIBUTES, DISCOVER_AGENT, DISCOVER_IMPLEMENTATION_VERSION, DISCOVER_LIST_PROTOCOLS, DISCOVER_SUB_VENDOR, DISCOVER_VENDOR, MESSAGE_ATTRIBUTES, and VERSION.
Referenced by messageAttributes().
void BaseProtocol::invalidCommand | ( | Message & | msg | ) |
Definition at line 277 of file scmi_protocols.cc.
References SCMI::Message::length, SCMI::NOT_FOUND, and SCMI::Message::payload.
Referenced by handleMessage().
|
overridevirtual |
Implements SCMI::Protocol.
Definition at line 153 of file scmi_protocols.cc.
References implementedProtocol(), SCMI::Message::length, SCMI::NOT_FOUND, SCMI::Message::payload, and SCMI::SUCCESS.
Referenced by handleMessage().
|
overridevirtual |
Implements SCMI::Protocol.
Definition at line 108 of file scmi_protocols.cc.
References SCMI::Message::length, SCMI::Message::payload, PROTOCOL_VERSION, and SCMI::SUCCESS.
Referenced by handleMessage().
|
protected |
Definition at line 147 of file scmi_protocols.hh.
Referenced by discoverImplVersion().
|
staticprivate |
Definition at line 107 of file scmi_protocols.hh.
Referenced by version().
|
protected |
Definition at line 146 of file scmi_protocols.hh.
Referenced by BaseProtocol(), and discoverSubVendor().
|
protected |
Definition at line 145 of file scmi_protocols.hh.
Referenced by BaseProtocol(), and discoverVendor().