geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::SSTIO Class Referenceabstract

#include <SSTIO.hpp>

Inheritance diagram for geopm::SSTIO:
Inheritance graph
[legend]

Public Member Functions

 SSTIO ()=default
 
virtual ~SSTIO ()=default
 
virtual int add_mbox_read (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg)=0
 Interact with the mailbox on commands that are expected to return data. More...
 
virtual int add_mbox_write (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t interface_parameter, uint16_t read_subcommand, uint32_t read_interface_parameter, uint32_t read_mask)=0
 Interact with the mailbox on commands that are not expected to return data. More...
 
virtual int add_mmio_read (uint32_t cpu_index, uint16_t register_offset)=0
 Interact with the mmio interface on commands that are expected to return data. More...
 
virtual int add_mmio_write (uint32_t cpu_index, uint16_t register_offset, uint32_t register_value, uint32_t read_mask)=0
 Interact with the mmio interface on commands that are not expected to return data. More...
 
virtual void read_batch (void)=0
 Issue a batch read. More...
 
virtual uint64_t sample (int batch_idx) const =0
 Sample a value from the most recent batch read. More...
 
virtual void write_batch (void)=0
 Issue a batch write. More...
 
virtual uint32_t read_mbox_once (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg)=0
 Immediately query the SST mailbox for a read operation. More...
 
virtual void write_mbox_once (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t interface_parameter, uint16_t read_subcommand, uint32_t read_interface_parameter, uint32_t read_mask, uint64_t write_value, uint64_t write_mask)=0
 Immediately query the SST mailbox for a write operation. More...
 
virtual uint32_t read_mmio_once (uint32_t cpu_index, uint16_t register_offset)=0
 Immediately read a value from the SST MMIO interface. More...
 
virtual void write_mmio_once (uint32_t cpu_index, uint16_t register_offset, uint32_t register_value, uint32_t read_mask, uint64_t write_value, uint64_t write_mask)=0
 Immediately write a value to the SST MMIO interface. More...
 
virtual void adjust (int batch_idx, uint64_t write_value, uint64_t write_mask)=0
 Adjust a value for the next batch write. More...
 
virtual uint32_t get_punit_from_cpu (uint32_t cpu_index)=0
 Get the punit index associated with a CPU index. More...
 

Static Public Member Functions

static std::shared_ptr< SSTIOmake_shared (uint32_t max_cpus)
 Create an SSTIO object. More...
 

Constructor & Destructor Documentation

◆ SSTIO()

geopm::SSTIO::SSTIO ( )
default

◆ ~SSTIO()

virtual geopm::SSTIO::~SSTIO ( )
virtualdefault

Member Function Documentation

◆ add_mbox_read()

virtual int geopm::SSTIO::add_mbox_read ( uint32_t  cpu_index,
uint16_t  command,
uint16_t  subcommand,
uint32_t  subcommand_arg 
)
pure virtual

Interact with the mailbox on commands that are expected to return data.

Parameters
[in]cpu_indexIndex of the CPU to which the mailbox read is being issued
[in]commandWhich SST mailbox command to issue
[in]subcommandWhich SST mailbox subcommand to issue
[in]subcommand_argWhich argument to use for the SST mailbox subcommand

Implemented in geopm::SSTIOImp.

◆ add_mbox_write()

virtual int geopm::SSTIO::add_mbox_write ( uint32_t  cpu_index,
uint16_t  command,
uint16_t  subcommand,
uint32_t  interface_parameter,
uint16_t  read_subcommand,
uint32_t  read_interface_parameter,
uint32_t  read_mask 
)
pure virtual

Interact with the mailbox on commands that are not expected to return data.

Parameters
[in]cpu_indexIndex of the CPU to which the mailbox read is being issued
[in]commandWhich SST mailbox command to issue
[in]subcommandWhich SST mailbox subcommand to issue
[in]interface_parameterWhich SST mailbox parameter to use
[in]read_subcommandWhich SST mailbox subcommand to issue when reading the current value prior to a write
[in]read_interface_parameterWhich SST mailbox parameter to use when reading the current value prior to a write
[in]read_maskThe mask to apply to values read from the mailbox prior to a write

Implemented in geopm::SSTIOImp.

◆ add_mmio_read()

virtual int geopm::SSTIO::add_mmio_read ( uint32_t  cpu_index,
uint16_t  register_offset 
)
pure virtual

Interact with the mmio interface on commands that are expected to return data.

Parameters
[in]cpu_indexIndex of the CPU to which the MMIO read is being issued
[in]register_offsetWhich SST MMIO register offset to use

Implemented in geopm::SSTIOImp.

◆ add_mmio_write()

virtual int geopm::SSTIO::add_mmio_write ( uint32_t  cpu_index,
uint16_t  register_offset,
uint32_t  register_value,
uint32_t  read_mask 
)
pure virtual

Interact with the mmio interface on commands that are not expected to return data.

Parameters
[in]cpu_indexIndex of the CPU to which the MMIO write is being issued
[in]register_offsetWhich SST MMIO register offset to use
[in]register_valueWhich SST MMIO register value to set for the write.
[in]read_maskThe mask to apply to values read from the register prior to a write

Implemented in geopm::SSTIOImp.

◆ adjust()

virtual void geopm::SSTIO::adjust ( int  batch_idx,
uint64_t  write_value,
uint64_t  write_mask 
)
pure virtual

Adjust a value for the next batch write.

Parameters
[in]batch_idxAn index returned from an add_*_write function
[in]write_valueThe value to write in the next batch_write()
[in]write_maskThe mask to apply when writing this value

Implemented in geopm::SSTIOImp.

◆ get_punit_from_cpu()

virtual uint32_t geopm::SSTIO::get_punit_from_cpu ( uint32_t  cpu_index)
pure virtual

Get the punit index associated with a CPU index.

Parameters
[in]cpu_indexIndex of the CPU

Implemented in geopm::SSTIOImp.

◆ make_shared()

std::shared_ptr< SSTIO > geopm::SSTIO::make_shared ( uint32_t  max_cpus)
static

Create an SSTIO object.

Parameters
[in]max_cpusThe number of CPUs to attempt to map to punit cores.

◆ read_batch()

virtual void geopm::SSTIO::read_batch ( void  )
pure virtual

Issue a batch read.

Implemented in geopm::SSTIOImp.

◆ read_mbox_once()

virtual uint32_t geopm::SSTIO::read_mbox_once ( uint32_t  cpu_index,
uint16_t  command,
uint16_t  subcommand,
uint32_t  subcommand_arg 
)
pure virtual

Immediately query the SST mailbox for a read operation.

Parameters
[in]cpu_indexIndex of the CPU to which the mailbox read is being issued
[in]commandWhich SST mailbox command to issue
[in]subcommandWhich SST mailbox subcommand to issue
[in]subcommand_argWhich argument to use for the SST mailbox subcommand

Implemented in geopm::SSTIOImp.

◆ read_mmio_once()

virtual uint32_t geopm::SSTIO::read_mmio_once ( uint32_t  cpu_index,
uint16_t  register_offset 
)
pure virtual

Immediately read a value from the SST MMIO interface.

Parameters
[in]cpu_indexIndex of the CPU to which the MMIO read is being issued
[in]register_offsetWhich SST MMIO register offset to use

Implemented in geopm::SSTIOImp.

◆ sample()

virtual uint64_t geopm::SSTIO::sample ( int  batch_idx) const
pure virtual

Sample a value from the most recent batch read.

Parameters
[in]batch_idxAn index returned from an add_*_read function prior to calling read_batch().

Implemented in geopm::SSTIOImp.

◆ write_batch()

virtual void geopm::SSTIO::write_batch ( void  )
pure virtual

Issue a batch write.

Implemented in geopm::SSTIOImp.

◆ write_mbox_once()

virtual void geopm::SSTIO::write_mbox_once ( uint32_t  cpu_index,
uint16_t  command,
uint16_t  subcommand,
uint32_t  interface_parameter,
uint16_t  read_subcommand,
uint32_t  read_interface_parameter,
uint32_t  read_mask,
uint64_t  write_value,
uint64_t  write_mask 
)
pure virtual

Immediately query the SST mailbox for a write operation.

Parameters
[in]cpu_indexIndex of the CPU to which the mailbox read is being issued
[in]commandWhich SST mailbox command to issue
[in]subcommandWhich SST mailbox subcommand to issue
[in]interface_parameterWhich SST mailbox parameter to use
[in]read_subcommandWhich SST mailbox subcommand to issue when reading the current value prior to a write
[in]read_interface_parameterWhich SST mailbox parameter to use when reading the current value prior to a write
[in]read_maskThe mask to apply to values read from the mailbox prior to a write
[in]write_valueThe value to write
[in]write_maskThe mask to apply to the written value

Implemented in geopm::SSTIOImp.

◆ write_mmio_once()

virtual void geopm::SSTIO::write_mmio_once ( uint32_t  cpu_index,
uint16_t  register_offset,
uint32_t  register_value,
uint32_t  read_mask,
uint64_t  write_value,
uint64_t  write_mask 
)
pure virtual

Immediately write a value to the SST MMIO interface.

Parameters
[in]cpu_indexIndex of the CPU to which the MMIO write is being issued
[in]register_offsetWhich SST MMIO register offset to use
[in]register_valueWhich SST MMIO register value to set for the write.
[in]read_maskThe mask to apply to values read from the register prior to a write
[in]write_valueThe value to write
[in]write_maskThe mask to apply to the written value

Implemented in geopm::SSTIOImp.


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