geopm
3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
|
#include <SSTIOImp.hpp>
Public Member Functions | |
SSTIOImp (uint32_t max_cpus) | |
Main constructor for the SST ioctl interface. More... | |
SSTIOImp (uint32_t max_cpus, std::shared_ptr< SSTIoctl > ioctl_interface) | |
This is the same as the main constructor, but it allows you to override the ioctl interface. More... | |
virtual | ~SSTIOImp ()=default |
int | add_mbox_read (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg) override |
Interact with the mailbox on commands that are expected to return data. More... | |
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) override |
Interact with the mailbox on commands that are not expected to return data. More... | |
int | add_mmio_read (uint32_t cpu_index, uint16_t register_offset) override |
Interact with the mmio interface on commands that are expected to return data. More... | |
int | add_mmio_write (uint32_t cpu_index, uint16_t register_offset, uint32_t register_value, uint32_t read_mask) override |
Interact with the mmio interface on commands that are not expected to return data. More... | |
void | read_batch (void) override |
Issue a batch read. More... | |
uint64_t | sample (int batch_idx) const override |
Sample a value from the most recent batch read. More... | |
void | write_batch (void) override |
Issue a batch write. More... | |
uint32_t | read_mbox_once (uint32_t cpu_index, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg) override |
Immediately query the SST mailbox for a read operation. More... | |
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) override |
Immediately query the SST mailbox for a write operation. More... | |
uint32_t | read_mmio_once (uint32_t cpu_index, uint16_t register_offset) override |
Immediately read a value from the SST MMIO interface. More... | |
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) override |
Immediately write a value to the SST MMIO interface. More... | |
void | adjust (int batch_idx, uint64_t write_value, uint64_t write_mask) override |
Adjust a value for the next batch write. More... | |
uint32_t | get_punit_from_cpu (uint32_t cpu_index) override |
Get the punit index associated with a CPU index. More... | |
Public Member Functions inherited from geopm::SSTIO | |
SSTIO ()=default | |
virtual | ~SSTIO ()=default |
Additional Inherited Members | |
Static Public Member Functions inherited from geopm::SSTIO | |
static std::shared_ptr< SSTIO > | make_shared (uint32_t max_cpus) |
Create an SSTIO object. More... | |
geopm::SSTIOImp::SSTIOImp | ( | uint32_t | max_cpus | ) |
Main constructor for the SST ioctl interface.
[in] | max_cpus | The number of CPUs to attempt to map to punit cores. |
geopm::SSTIOImp::SSTIOImp | ( | uint32_t | max_cpus, |
std::shared_ptr< SSTIoctl > | ioctl_interface | ||
) |
This is the same as the main constructor, but it allows you to override the ioctl interface.
|
virtualdefault |
|
overridevirtual |
Interact with the mailbox on commands that are expected to return data.
Implements geopm::SSTIO.
|
overridevirtual |
Interact with the mailbox on commands that are not expected to return data.
[in] | cpu_index | Index of the CPU to which the mailbox read is being issued |
[in] | command | Which SST mailbox command to issue |
[in] | subcommand | Which SST mailbox subcommand to issue |
[in] | interface_parameter | Which SST mailbox parameter to use |
[in] | read_subcommand | Which SST mailbox subcommand to issue when reading the current value prior to a write |
[in] | read_interface_parameter | Which SST mailbox parameter to use when reading the current value prior to a write |
[in] | read_mask | The mask to apply to values read from the mailbox prior to a write |
Implements geopm::SSTIO.
|
overridevirtual |
Interact with the mmio interface on commands that are expected to return data.
[in] | cpu_index | Index of the CPU to which the MMIO read is being issued |
[in] | register_offset | Which SST MMIO register offset to use |
Implements geopm::SSTIO.
|
overridevirtual |
Interact with the mmio interface on commands that are not expected to return data.
[in] | cpu_index | Index of the CPU to which the MMIO write is being issued |
[in] | register_offset | Which SST MMIO register offset to use |
[in] | register_value | Which SST MMIO register value to set for the write. |
[in] | read_mask | The mask to apply to values read from the register prior to a write |
Implements geopm::SSTIO.
|
overridevirtual |
Adjust a value for the next batch write.
[in] | batch_idx | An index returned from an add_*_write function |
[in] | write_value | The value to write in the next batch_write() |
[in] | write_mask | The mask to apply when writing this value |
Implements geopm::SSTIO.
|
overridevirtual |
Get the punit index associated with a CPU index.
[in] | cpu_index | Index of the CPU |
Implements geopm::SSTIO.
|
overridevirtual |
Issue a batch read.
Implements geopm::SSTIO.
|
overridevirtual |
Immediately query the SST mailbox for a read operation.
[in] | cpu_index | Index of the CPU to which the mailbox read is being issued |
[in] | command | Which SST mailbox command to issue |
[in] | subcommand | Which SST mailbox subcommand to issue |
[in] | subcommand_arg | Which argument to use for the SST mailbox subcommand |
Implements geopm::SSTIO.
|
overridevirtual |
Immediately read a value from the SST MMIO interface.
[in] | cpu_index | Index of the CPU to which the MMIO read is being issued |
[in] | register_offset | Which SST MMIO register offset to use |
Implements geopm::SSTIO.
|
overridevirtual |
Sample a value from the most recent batch read.
[in] | batch_idx | An index returned from an add_*_read function prior to calling read_batch(). |
Implements geopm::SSTIO.
|
overridevirtual |
Issue a batch write.
Implements geopm::SSTIO.
|
overridevirtual |
Immediately query the SST mailbox for a write operation.
[in] | cpu_index | Index of the CPU to which the mailbox read is being issued |
[in] | command | Which SST mailbox command to issue |
[in] | subcommand | Which SST mailbox subcommand to issue |
[in] | interface_parameter | Which SST mailbox parameter to use |
[in] | read_subcommand | Which SST mailbox subcommand to issue when reading the current value prior to a write |
[in] | read_interface_parameter | Which SST mailbox parameter to use when reading the current value prior to a write |
[in] | read_mask | The mask to apply to values read from the mailbox prior to a write |
[in] | write_value | The value to write |
[in] | write_mask | The mask to apply to the written value |
Implements geopm::SSTIO.
|
overridevirtual |
Immediately write a value to the SST MMIO interface.
[in] | cpu_index | Index of the CPU to which the MMIO write is being issued |
[in] | register_offset | Which SST MMIO register offset to use |
[in] | register_value | Which SST MMIO register value to set for the write. |
[in] | read_mask | The mask to apply to values read from the register prior to a write |
[in] | write_value | The value to write |
[in] | write_mask | The mask to apply to the written value |
Implements geopm::SSTIO.