Add OperatingConfig interfaces
In order to advertise Intel Speed Select capabilities through the
Redfish OperatingConfig resources (schema 2020.2), define D-Bus
interfaces so that the Redfish server can get properties from the
application which does the Speed Select discovery.
Speed Select provides a set of processor-specific power and frequency
profiles. Currently, the only known use case of this interface is for a
Redfish client to view the profile attributes and select a profile.
Hence, the interface resembles the Redfish schema.
The intended intitial use case is that for supported CPUs,
CurrentOperatingConfig will be implemented on cpu objects (under
inventory/ tree), and child objects under each cpu will implement
OperatingConfig. For example:
|-/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0
| =xyz.openbmc_project.Control.Processor.CurrentOperatingConfig
|
|-/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/config0
| =xyz.openbmc_project.Inventory.Item.Cpu.OperatingConfig
|
|-/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/config3
=xyz.openbmc_project.Inventory.Item.Cpu.OperatingConfig
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I1663729c274aeaa5c3e78388690e9c6dd4aa3570
diff --git a/gen/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig/meson.build b/gen/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig/meson.build
new file mode 100644
index 0000000..d8fcb7f
--- /dev/null
+++ b/gen/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig__cpp'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml', ],
+ output: [ 'server.cpp', 'server.hpp', 'client.hpp', ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Control/Processor/meson.build b/gen/xyz/openbmc_project/Control/Processor/meson.build
new file mode 100644
index 0000000..adbff0a
--- /dev/null
+++ b/gen/xyz/openbmc_project/Control/Processor/meson.build
@@ -0,0 +1,16 @@
+# Generated file; do not modify.
+subdir('CurrentOperatingConfig')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig__markdown'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml', ],
+ output: [ 'CurrentOperatingConfig.md' ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Control/Processor/CurrentOperatingConfig',
+ ],
+ build_by_default: true,
+)
+
diff --git a/gen/xyz/openbmc_project/Control/meson.build b/gen/xyz/openbmc_project/Control/meson.build
index f3be44c..80f547c 100644
--- a/gen/xyz/openbmc_project/Control/meson.build
+++ b/gen/xyz/openbmc_project/Control/meson.build
@@ -181,6 +181,7 @@
build_by_default: true,
)
+subdir('Processor')
subdir('Security')
subdir('Service')
subdir('ThermalMode')
diff --git a/gen/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig/meson.build b/gen/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig/meson.build
new file mode 100644
index 0000000..1ea9320
--- /dev/null
+++ b/gen/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig__cpp'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig.interface.yaml', ],
+ output: [ 'server.cpp', 'server.hpp', 'client.hpp', ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Inventory/Item/Cpu/meson.build b/gen/xyz/openbmc_project/Inventory/Item/Cpu/meson.build
index 58fcf43..f7e145f 100644
--- a/gen/xyz/openbmc_project/Inventory/Item/Cpu/meson.build
+++ b/gen/xyz/openbmc_project/Inventory/Item/Cpu/meson.build
@@ -12,3 +12,18 @@
],
)
+subdir('OperatingConfig')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig__markdown'.underscorify(),
+ input: [ meson.source_root() / 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig.interface.yaml', ],
+ output: [ 'OperatingConfig.md' ],
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.source_root(),
+ 'xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig',
+ ],
+ build_by_default: true,
+)
+
diff --git a/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml b/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml
new file mode 100644
index 0000000..918f9f9
--- /dev/null
+++ b/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml
@@ -0,0 +1,11 @@
+description: >
+ Processor power and frequency configuration settings.
+properties:
+ - name: AppliedConfig
+ type: object_path
+ description: Path to currently selected configuration.
+ - name: BaseSpeedPriorityEnabled
+ type: boolean
+ description: >
+ Whether base speed prioritization is enabled in the currently selected
+ configuration.
diff --git a/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig.interface.yaml b/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig.interface.yaml
new file mode 100644
index 0000000..0d0463a
--- /dev/null
+++ b/xyz/openbmc_project/Inventory/Item/Cpu/OperatingConfig.interface.yaml
@@ -0,0 +1,49 @@
+description: >
+ Implement to advertise power and frequency attributes of a single available
+ (but not necessarily active/applied) processor configuration profile.
+properties:
+ - name: BaseSpeed
+ type: uint32
+ description: The base clock speed of the processor in MHz.
+ flags:
+ - readonly
+ - name: BaseSpeedPrioritySettings
+ type: array[struct[uint32, array[uint32]]]
+ description: >
+ An array of objects that specify the base clock frequency for sets of
+ cores when the configuration is operational. Each entry contains two
+ members, first is the base clock speed in MHz, and second is an array
+ identifying the set of core IDs to configure at that base speed.
+ flags:
+ - readonly
+ - name: MaxJunctionTemperature
+ type: uint32
+ description: The maximum temperature of the junction in degrees Celsius.
+ flags:
+ - readonly
+ - name: MaxSpeed
+ type: uint32
+ description: >
+ The maximum clock speed to which the processor can be configured in MHz.
+ flags:
+ - readonly
+ - name: PowerLimit
+ type: uint32
+ description: The thermal design point of the processor in watts.
+ flags:
+ - readonly
+ - name: AvailableCoreCount
+ type: size
+ description: >
+ The number of cores in the processor that can be used in this
+ configuration.
+ flags:
+ - readonly
+ - name: TurboProfile
+ type: array[struct[uint32, size]]
+ description: >
+ An array of objects that specify the turbo profile for a set of active
+ cores. Each entry contains two members, first is the maximum turbo clock
+ speed in MHz, and second is number of cores which can run at that speed.
+ flags:
+ - readonly