geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
SSTIoctlImp.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef SSTIOCTLIMP_HPP_INCLUDE
6 #define SSTIOCTLIMP_HPP_INCLUDE
7 
8 #include <cstdint>
9 
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 #include "SSTIoctl.hpp"
15 
16 namespace geopm
17 {
18 
19  class SSTIoctlImp final : public SSTIoctl
20  {
21  public:
24  SSTIoctlImp(const std::string &path);
25  SSTIoctlImp(const SSTIoctlImp &other) = delete;
26  SSTIoctlImp &operator=(const SSTIoctlImp &other) = delete;
27  ~SSTIoctlImp();
28 
31  int version(sst_version_s *version) override;
32 
37  int get_cpu_id(sst_cpu_map_interface_batch_s *cpu_batch) override;
38 
44  int mbox(sst_mbox_interface_batch_s *mbox_batch) override;
45 
51  int mmio(sst_mmio_interface_batch_s *mmio_batch) override;
52  private:
53  const std::string m_path;
54  const int m_fd;
55  };
56 }
57 #endif
Defines functions that interact directly with SST ioctls.
Definition: SSTIoctl.hpp:76
Definition: SSTIoctlImp.hpp:20
SSTIoctlImp & operator=(const SSTIoctlImp &other)=delete
SSTIoctlImp(const std::string &path)
create an object to interact with this interface.
Definition: SSTIoctl.cpp:32
int get_cpu_id(sst_cpu_map_interface_batch_s *cpu_batch) override
Get mappings of logical CPUs to punit CPUs.
Definition: SSTIoctl.cpp:48
~SSTIoctlImp()
Definition: SSTIoctl.cpp:38
int mmio(sst_mmio_interface_batch_s *mmio_batch) override
Interact with the SST MMIO interface. This may be for read or write operations.
Definition: SSTIoctl.cpp:58
int mbox(sst_mbox_interface_batch_s *mbox_batch) override
Interact with the SST mailbox. This may be for send or receive operations.
Definition: SSTIoctl.cpp:53
SSTIoctlImp(const SSTIoctlImp &other)=delete
int version(sst_version_s *version) override
Send an ioctl to the SST version interface.
Definition: SSTIoctl.cpp:43
Definition: Agg.cpp:20
Definition: SSTIoctl.hpp:33
Definition: SSTIoctl.hpp:69
Definition: SSTIoctl.hpp:49
SST Version information.
Definition: SSTIoctl.hpp:16