gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
SCMI::BaseProtocol Class Reference

This protocol describes the properties of the implementation and provides generic error management. More...

#include <scmi_protocols.hh>

Inheritance diagram for SCMI::BaseProtocol:
SCMI::Protocol

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)
 
- Public Member Functions inherited from SCMI::Protocol
 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
 
- Protected Attributes inherited from SCMI::Protocol
Platformplatform
 

Static Private Attributes

static const uint32_t PROTOCOL_VERSION = 0x10000
 

Additional Inherited Members

- Static Public Attributes inherited from SCMI::Protocol
static const uint32_t MAX_STRING_SIZE = 15
 

Detailed Description

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.

Member Enumeration Documentation

◆ Commands

Enumerator
VERSION 
ATTRIBUTES 
MESSAGE_ATTRIBUTES 
DISCOVER_VENDOR 
DISCOVER_SUB_VENDOR 
DISCOVER_IMPLEMENTATION_VERSION 
DISCOVER_LIST_PROTOCOLS 
DISCOVER_AGENT 
NOTIFY_ERRORS 
SET_DEVICE_PERMISSIONS 
SET_PROTOCOL_PERMISSIONS 
RESET_AGENT_CONFIGURATION 

Definition at line 112 of file scmi_protocols.hh.

Constructor & Destructor Documentation

◆ BaseProtocol()

BaseProtocol::BaseProtocol ( Platform _platform)
explicit

Definition at line 51 of file scmi_protocols.cc.

References fatal_if, SCMI::Protocol::MAX_STRING_SIZE, subvendor, and vendor.

Member Function Documentation

◆ attributes()

void BaseProtocol::attributes ( Message msg)
overridevirtual

◆ discoverAgent()

void BaseProtocol::discoverAgent ( Message msg)

◆ discoverImplVersion()

void BaseProtocol::discoverImplVersion ( Message msg)

◆ discoverListProtocols()

void BaseProtocol::discoverListProtocols ( Message msg)

◆ discoverSubVendor()

void BaseProtocol::discoverSubVendor ( Message msg)

◆ discoverVendor()

void BaseProtocol::discoverVendor ( Message msg)

◆ handleMessage()

void BaseProtocol::handleMessage ( Message msg)
overridevirtual

◆ implementedProtocol()

bool BaseProtocol::implementedProtocol ( Commands  message_id) const
protected

◆ invalidCommand()

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().

◆ messageAttributes()

void BaseProtocol::messageAttributes ( Message msg)
overridevirtual

◆ version()

void BaseProtocol::version ( Message msg)
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().

Member Data Documentation

◆ implementationVersion

const uint32_t SCMI::BaseProtocol::implementationVersion
protected

Definition at line 147 of file scmi_protocols.hh.

Referenced by discoverImplVersion().

◆ PROTOCOL_VERSION

const uint32_t SCMI::BaseProtocol::PROTOCOL_VERSION = 0x10000
staticprivate

Definition at line 107 of file scmi_protocols.hh.

Referenced by version().

◆ subvendor

const std::string SCMI::BaseProtocol::subvendor
protected

Definition at line 146 of file scmi_protocols.hh.

Referenced by BaseProtocol(), and discoverSubVendor().

◆ vendor

const std::string SCMI::BaseProtocol::vendor
protected

Definition at line 145 of file scmi_protocols.hh.

Referenced by BaseProtocol(), and discoverVendor().


The documentation for this class was generated from the following files:

Generated on Tue Jun 22 2021 15:29:12 for gem5 by doxygen 1.8.17