6 #ifndef SSTIO_HPP_INCLUDE
7 #define SSTIO_HPP_INCLUDE
30 uint16_t subcommand, uint32_t subcommand_arg) = 0;
45 uint16_t subcommand, uint32_t interface_parameter,
46 uint16_t read_subcommand,
47 uint32_t read_interface_parameter,
48 uint32_t read_mask) = 0;
54 virtual int add_mmio_read(uint32_t cpu_index, uint16_t register_offset) = 0;
65 uint32_t register_value,
66 uint32_t read_mask) = 0;
74 virtual uint64_t
sample(
int batch_idx)
const = 0;
87 uint16_t subcommand, uint32_t subcommand_arg) = 0;
105 uint32_t interface_parameter,
106 uint16_t read_subcommand,
107 uint32_t read_interface_parameter,
108 uint32_t read_mask, uint64_t write_value,
109 uint64_t write_mask) = 0;
115 virtual uint32_t
read_mmio_once(uint32_t cpu_index, uint16_t register_offset) = 0;
128 uint32_t register_value,
129 uint32_t read_mask, uint64_t write_value,
130 uint64_t write_mask) = 0;
136 virtual void adjust(
int batch_idx, uint64_t write_value, uint64_t write_mask) = 0;
145 static std::shared_ptr<SSTIO>
make_shared(uint32_t max_cpus);
virtual uint32_t read_mmio_once(uint32_t cpu_index, uint16_t register_offset)=0
Immediately read a value from the SST MMIO interface.
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.
virtual uint64_t sample(int batch_idx) const =0
Sample a value from the most recent batch read.
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.
virtual void write_batch(void)=0
Issue a batch write.
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.
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.
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.
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.
static std::shared_ptr< SSTIO > make_shared(uint32_t max_cpus)
Create an SSTIO object.
Definition: SSTIO.cpp:21
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.
virtual uint32_t get_punit_from_cpu(uint32_t cpu_index)=0
Get the punit index associated with a CPU index.
virtual void read_batch(void)=0
Issue a batch read.
virtual void adjust(int batch_idx, uint64_t write_value, uint64_t write_mask)=0
Adjust a value for the next batch write.