History log of /openbmc/openpower-occ-control/occ_manager.hpp (Results 1 – 25 of 45)
Revision Date Author Comments
# c488bac1 17-Mar-2025 Chris Cain <cjcain@us.ibm.com>

Clear flags when the host changes to powered off state

When the host is powered off, the OCCs will be stopped, so clear any
reset pending flags as well as any outstanding HRESET requests.

This will

Clear flags when the host changes to powered off state

When the host is powered off, the OCCs will be stopped, so clear any
reset pending flags as well as any outstanding HRESET requests.

This will ensure the next boot will start clean and not react to
something that happened on prior boot.

Tested on Rainier for several error scenarios.

Change-Id: Ie4156975a844e823787f7162ee0542d7f099bd12
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# d2b044f9 12-Feb-2025 Sheldon Bailey <baileysh@us.ibm.com>

Handle OCC poll changes for per chip power data

Handle OCC poll change for per chip memory and processor data.
and Provide the data to Redfish

Change-Id: I88725599ec70d61fb43c1699520ea17ccac91243
S

Handle OCC poll changes for per chip power data

Handle OCC poll change for per chip memory and processor data.
and Provide the data to Redfish

Change-Id: I88725599ec70d61fb43c1699520ea17ccac91243
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>

show more ...


# 2d6ec909 01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I289fffda3d8b39bb9b16eab30928d0aa7c8e1821
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I289fffda3d8b39bb9b16eab30928d0aa7c8e1821
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 720a3841 09-Jan-2025 Chris Cain <cjcain@us.ibm.com>

Set default package to build for POWER10

Set default package to build for p10 (since that is latest code)
Add PLDM as requirement for building p10
Default build will not enable PHAL support by defau

Set default package to build for POWER10

Set default package to build for p10 (since that is latest code)
Add PLDM as requirement for building p10
Default build will not enable PHAL support by default because of current
build limitations of the PHAL code.

The pldm Interface class will no longer be created in the Manager object
constructor to prevent issues with unit test.

Tested on Rainier

Change-Id: I8060e70b5656bd0d762d52bf9fdff62f8720a5c6
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# f0295f52 12-Sep-2024 Chris Cain <cjcain@us.ibm.com>

Improve BMC error handling for OCC comm failures

- Delay starting OCC reset until all OCCs have been detected (or
timeout). It will prevent multiple resets from being triggered and to
help detecting

Improve BMC error handling for OCC comm failures

- Delay starting OCC reset until all OCCs have been detected (or
timeout). It will prevent multiple resets from being triggered and to
help detecting when reset is completed (active sensor being set after
reset is complete)
- Wait for PLDM response to OCC reset and HRESET requests and retry if
they fail
- If HRESET returns NOT_READY, collect SBE FFDC and try OCC reset. A
persistent failure will put the system in safe state.

- Prevent overwriting dvfs over-temp filename for p10 and beyond since
that old file is only present in old kernel
- Prevent assert when opening sysfs files. (added catch and then created
an OCC Comm failure PEL, which will force an OCC reset.)
- Check return code after reading sysfs files to confirm success. If
read fails, try reset to recover.

- Updated traces to include which processor/OCC encountered issues.
- Better recovery to close windows that were leaving system in partial
good state.

JIRA: PFES-66
Change-Id: I0b087d0e05bd8562682062e1c662f9e18164a720
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# c33171bb 24-May-2024 Chris Cain <cjcain@us.ibm.com>

Throttle PLDM traces after 5 minutes while waiting for PDRs

Existing code waits up to 40 minutes for the OCC active sensors PDRs to
be available. If not available, a BD8D2685 PEL will get logged and

Throttle PLDM traces after 5 minutes while waiting for PDRs

Existing code waits up to 40 minutes for the OCC active sensors PDRs to
be available. If not available, a BD8D2685 PEL will get logged and
occ-control will continue to wait for the PDRs.

This change will throttle the occ-control PLDM traces after 5 minutes,
while continuing to wait for the PDRs. A PEL will still get generated if
the timeout expires.

Tested on Rainier

Change-Id: I35ec939317efee7a458b96709ea9cfc2abe7bebf
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 4b82f3e3 22-Apr-2024 Chris Cain <cjcain@us.ibm.com>

Create PEL if unable to get the OCC PDRs

The OCC PDRs are required so occ-control will know when the OCCs are
available and ready to communicate. If the PDRs never become available
there is currentl

Create PEL if unable to get the OCC PDRs

The OCC PDRs are required so occ-control will know when the OCCs are
available and ready to communicate. If the PDRs never become available
there is currently no indication other than the OCC sensors not being
available.
This code change will create a PEL when the PDRs have not been found
after 5 minutes. The service will continue looking for the PDRs after
logging the PEL.

Change-Id: Ia2200273d04b91cba9cad3cf8465cc9cada73428
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 755af102 27-Feb-2024 Chris Cain <cjcain@us.ibm.com>

Handle other PLDM_STATE_SET_OPERATIONAL states

- Code will no longer assume the OCC is not running if an unexpected
state is received. It will continue to look for a good/known state.
- Added code t

Handle other PLDM_STATE_SET_OPERATIONAL states

- Code will no longer assume the OCC is not running if an unexpected
state is received. It will continue to look for a good/known state.
- Added code that will throttle the occ-control pldm journal traces
if unable to read the OCC active sensor states. In some error
conditions, this tracing would flood the trace and the repeated traces
are not helpful for debug.
- Change some journal entries to ERR when the state indicated that the
system was in safe mode (OCCs disabled)
- If request for occ active sensor state was sent, and then a PLDM
sensor event comes in for that instance, the event status is used and
the response is ignored.
- Added README for occ-control

Signed-off-by: Chris Cain <cjcain@us.ibm.com>
Change-Id: Ic26f1d0c4dc59e7a61b965b052d649e4bc152fde

show more ...


# ad8f4524 25-Oct-2023 Matt Spinler <spinler@us.ibm.com>

Create sensors for DIMM DVFS temps

Like it does for the processor, the OCC also sends down the throttle
(DVFS) temperatures for all of the DIMM related temp sensors in the
'_max' sysfs files.

This

Create sensors for DIMM DVFS temps

Like it does for the processor, the OCC also sends down the throttle
(DVFS) temperatures for all of the DIMM related temp sensors in the
'_max' sysfs files.

This commit makes D-Bus sensors out of them as well so that fan control
can use them.

They are named:
- dimm_intmb_dvfs_temp
- dimm_dram_dvfs_temp
- dimm_dram_extmb_dvfs_temp
- dimm_pmic_dvfs_temp
- dimm_extmb_dvfs_temp}

Tested:
On a Rainier 2U with 3 types of DIMM temps available:
$ busctl get-property org.open_power.OCC.Control
/xyz/openbmc_project/sensors/temperature/dimm_dram_dvfs_temp
xyz.openbmc_project.Sensor.Value Value
d 69

$ busctl get-property org.open_power.OCC.Control
/xyz/openbmc_project/sensors/temperature/dimm_pmic_dvfs_temp
xyz.openbmc_project.Sensor.Value Value
d 85

$ busctl get-property org.open_power.OCC.Control
/xyz/openbmc_project/sensors/temperature/dimm_intmb_dvfs_temp
xyz.openbmc_project.Sensor.Value Value
d 89

Change-Id: Ia4417fa05dc2ecef1a54110c639a8ef51891b272
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# af40808f 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9541d521bf67882215a4a66dce020e38ac2df065

show more ...


# 31a2f13a 20-May-2022 Sheldon Bailey <baileysh@us.ibm.com>

Add safe mode to user interface

putting in code that puts safe mode onto dbus.
Tested: inject error that puts in safe mode, dbus CMD
to read dbus safeMode.
Signed-off-by: Sheldon Bailey <baileysh@us

Add safe mode to user interface

putting in code that puts safe mode onto dbus.
Tested: inject error that puts in safe mode, dbus CMD
to read dbus safeMode.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: I48c5b41a48d0883a8d1e2916da8725391a7bcbc2

show more ...


# c8dd4599 12-May-2022 Sheldon Bailey <baileysh@us.ibm.com>

Fix Max fan speed with Deconfigured DIMM

Fan Speeds Remain at Maximum Speed With Deconfigured DIMMs
Tested: Injected Errors on DIMMs.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: I

Fix Max fan speed with Deconfigured DIMM

Fan Speeds Remain at Maximum Speed With Deconfigured DIMMs
Tested: Injected Errors on DIMMs.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: I797698f888cd9fb431d4f490c144eb5ad942bcd8

show more ...


# bd551de3 26-Apr-2022 Chris Cain <cjcain@us.ibm.com>

Queue active sensor updates before status objs created

If an OCC Active sensor update comes in before the Status objects have
been created, the value is lost. This commit will save that sensor
valu

Queue active sensor updates before status objs created

If an OCC Active sensor update comes in before the Status objects have
been created, the value is lost. This commit will save that sensor
value until the status objects are created.
Also, prevent querying the master sysfs file if OCCs are not yet activated.

Change-Id: I8c0d2686024278ec7435e19cf99f59802e1ecceb
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 11fd1314 19-Apr-2022 Sheldon Bailey <baileysh@us.ibm.com>

openpower_occ_control: Support new APSS sensor IDs

Add APSS sensor IDs and Names to powerSensorName.
Tested: command line occ poll, occ sensors.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
C

openpower_occ_control: Support new APSS sensor IDs

Add APSS sensor IDs and Names to powerSensorName.
Tested: command line occ poll, occ sensors.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: Ia9b0040fbf97d2c2f07c18b343fba6a064ccdcb0

show more ...


# bae4d07e 28-Feb-2022 Chris Cain <cjcain@us.ibm.com>

Wait for OCC Active PDR to become available

occ-control was attempting to communicate with OCCs before the OCC
Active sensor PDR was available. This commit will wait until all PDRs
are available bef

Wait for OCC Active PDR to become available

occ-control was attempting to communicate with OCCs before the OCC
Active sensor PDR was available. This commit will wait until all PDRs
are available before allowing communication with the OCCs.
It will also read the OCC Active sensor to determine the state before
allowing communication.

When Hostboot moves a system to safe mode it will set the PLDM state of
the OCC Active sensor to PLDM_STATE_SET_OPERATIONAL_RUNNING_STATUS_DORMANT
This commit will also handle processing of that DORMANT status.

Change-Id: I348cf14455d9373898deec2ac4a04b3752e81c4a
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 373af757 21-Feb-2022 Sheldon Bailey <baileysh@us.ibm.com>

openpower-occ-control:failure to read OCC state.

Failure to read OCC state set the OCCs sensors to Nan/Not Functional
Tested: cronus error inject on OCC with and without OCC resets.
Signed-off-by: S

openpower-occ-control:failure to read OCC state.

Failure to read OCC state set the OCCs sensors to Nan/Not Functional
Tested: cronus error inject on OCC with and without OCC resets.
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
Change-Id: I2a6bb6a431f09ea816979b3a482b54a28e21db53
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>

show more ...


# 40501a23 14-Mar-2022 Chris Cain <cjcain@us.ibm.com>

Monitor for power cap changes when occ-control started

The object that is monitoring for power cap changes needs to get created
when occ-control is started so that changes are not missed.
Added vali

Monitor for power cap changes when occ-control started

The object that is monitoring for power cap changes needs to get created
when occ-control is started so that changes are not missed.
Added validation check to ensure that the value sent to the OCC matches
the user configured value on dbus.

Verified on Raininer

Change-Id: I0d77f4569e5459ff58d6fc72147153133d2104a3
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 5d66a0aa 09-Feb-2022 Chris Cain <cjcain@us.ibm.com>

Expose power cap min/max on dbus

The min and max power cap values will be read from sysfs files and then
the data will be put on the dbus. This will allow users to know the
valid range of power cap

Expose power cap min/max on dbus

The min and max power cap values will be read from sysfs files and then
the data will be put on the dbus. This will allow users to know the
valid range of power cap available.

The PowerCap object was moved from Manager to Status.

Change-Id: I5196cc8645f84c31a5282cf844109bae47b09bf7
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 36f9cded 22-Nov-2021 Chris Cain <cjcain@us.ibm.com>

Add support for OEM Power Modes

- Allow mode to be set via PassThrough interface
- Allow non-customer OEM power modes to be persisted
- Persist any OEM power mode settings
- moved mode related code

Add support for OEM Power Modes

- Allow mode to be set via PassThrough interface
- Allow non-customer OEM power modes to be persisted
- Persist any OEM power mode settings
- moved mode related code from Status to PowerMode object
- merged PowerIPS into PowerMode object

Tested on Everest and Rainier.
Setting mode through PassThrough/ce-login:
busctl call org.open_power.OCC.Control /org/open_power/control/occ0 org.open_power.OCC.PassThrough SetMode yq 11 3600
Trace (via PassThrough interface)
openpower-occ-control[4440]: PassThrough::setMode() Setting Power Mode 11 (data: 3600)
openpower-occ-control[4440]: PowerMode::sendModeChange: SET_MODE(11,3600) command to OCC0 (9 bytes)
Trace (setting mode via GUI/Redfish):
openpower-occ-control[4440]: Power Mode Change Requested: xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance
openpower-occ-control[4440]: PowerMode::sendModeChange: SET_MODE(12,0) command to OCC0 (9 bytes)
Verified when system in any OEM mode that Redfish also reports OEM
Verified all modes are persisted across PM Complex resets and reboots

Change-Id: Idd0be05cb6fd74dbd0776145f212c49addd1c365
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# f3a4a69f 27-Dec-2021 George Liu <liuxiwei@inspur.com>

Fix some warnings by cppcheck

Warning message:
../../../occ_events.hpp:16:9: warning: Value stored to 'event' is never read [deadcode.DeadStores]
event = sd_event_unref(event);
^

Fix some warnings by cppcheck

Warning message:
../../../occ_events.hpp:16:9: warning: Value stored to 'event' is never read [deadcode.DeadStores]
event = sd_event_unref(event);
^ ~~~~~~~~~~~~~~~~~~~~~
../../../occ_events.hpp:26:9: warning: Value stored to 'eventSource' is never read [deadcode.DeadStores]
eventSource = sd_event_source_unref(eventSource);

occ_dbus.cpp:34:47: performance: Searching before insertion is not necessary. [stlFindInsert]
path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str()));
^
occ_dbus.cpp:61:47: performance: Searching before insertion is not necessary. [stlFindInsert]
path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str()));
^
occ_dbus.cpp:88:47: performance: Searching before insertion is not necessary. [stlFindInsert]
path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str()));
^
occ_dbus.cpp:115:47: performance: Searching before insertion is not necessary. [stlFindInsert]
path, std::make_unique<SensorIntf>(utils::getBus(), path.c_str()));
^
occ_dbus.cpp:158:80: performance: Searching before insertion is not necessary. [stlFindInsert]
operationalStatus.emplace(path, std::make_unique<OperationalStatusIntf>(
^
occ_pass_through.hpp:42:5: style: Class 'PassThrough' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
PassThrough(const char* path);
^
powercap.hpp:41:5: style: Class 'PowerCap' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
PowerCap(Status& occStatus,
^
occ_manager.hpp:77:5: style: Struct 'Manager' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
Manager(EventPtr& event) :
^
occ_status.hpp:307:26: style: Local variable 'path' shadows outer variable [shadowVariable]
auto path = fs::path(estimatedPath);
^
occ_status.hpp:207:17: note: Shadowed declaration
std::string path;
^
occ_status.hpp:307:26: note: Shadow variable
auto path = fs::path(estimatedPath);
^
pldm.hpp:55:14: warning: Member variable 'Interface::OCCSensorOffset' is not initialized in the constructor. [uninitMemberVar]
explicit Interface(
^
pldm.hpp:55:14: warning: Member variable 'Interface::SBESensorOffset' is not initialized in the constructor. [uninitMemberVar]
explicit Interface(
^
powermode.hpp:60:5: style: Class 'PowerMode' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
PowerMode(Status& occStatus) :
^
powermode.hpp:96:5: style: Class 'PowerIPS' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
PowerIPS(Status& occStatus) :
^
occ_manager.cpp:321:24: style: The scope of the variable 'path' can be reduced. [variableScope]
constexpr auto path = "/org/openpower/dump";
^
occ_manager.cpp:322:24: style: The scope of the variable 'interface' can be reduced. [variableScope]
constexpr auto interface = "xyz.openbmc_project.Dump.Create";
^
occ_manager.cpp:323:24: style: The scope of the variable 'function' can be reduced. [variableScope]
constexpr auto function = "CreateDump";
^
pldm.cpp:78:16: style: Local variable 'pdr' shadows outer variable [shadowVariable]
for (auto& pdr : pdrs)
^
pldm.cpp:48:10: note: Shadowed declaration
auto pdr =
^
pldm.cpp:78:16: note: Shadow variable
for (auto& pdr : pdrs)
^
pldm.cpp:248:16: style: Local variable 'pdr' shadows outer variable [shadowVariable]
for (auto& pdr : pdrs)
^
pldm.cpp:221:10: note: Shadowed declaration
auto pdr =
^
pldm.cpp:248:16: note: Shadow variable
for (auto& pdr : pdrs)
^
powermode.cpp:28:22: style: Variable 'pmode' is assigned a value that is never used. [unreadVariable]
SysPwrMode pmode = SysPwrMode::NO_CHANGE;

Tested: Use cppcheck to build successfully and eliminate the above
warning message.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I72751dc94db684fc558b4bb57b1924be64ce6760

show more ...


# a7b74dc3 10-Nov-2021 Chris Cain <cjcain@us.ibm.com>

Clean up error cases on boot or when app restarted

- Detect when no or duplicate masters are found (force reset)
- Prevent sending commands to OCC when OCC is disabled
- Detect OCC state changes to

Clean up error cases on boot or when app restarted

- Detect when no or duplicate masters are found (force reset)
- Prevent sending commands to OCC when OCC is disabled
- Detect OCC state changes to SAFE (after 60 sec force reset)

Tested on Everest and Rainier hardware

Signed-off-by: Chris Cain <cjcain@us.ibm.com>
Change-Id: I490f182405e11da207b42a0607a532566479bfd9

show more ...


# 17257673 22-Oct-2021 Chris Cain <cjcain@us.ibm.com>

Send ambient and altitude to OCC

After the OCCs go active or anytime the ambient temperature changes the
ambient temperature and alititude will get sent to each OCC.
The altitude is only read once.

Send ambient and altitude to OCC

After the OCCs go active or anytime the ambient temperature changes the
ambient temperature and alititude will get sent to each OCC.
The altitude is only read once. If the altitude was not valid,
another attempt to read it will be done when the ambient temperature
is going to be re-sent.

Tested on Everest and Rainier systems

Change-Id: Icd64c50c05469bc985cfcaa3fcc74c3db5b41429
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# ace67d85 18-Oct-2021 Matt Spinler <spinler@us.ibm.com>

Add proc IO Ring and core/IO ring DVFS sensors

Add support for the processor IO ring temperature sensor which the OCC
uses fru type 9 for. There is one per OCC.

Add support for reading the process

Add proc IO Ring and core/IO ring DVFS sensors

Add support for the processor IO ring temperature sensor which the OCC
uses fru type 9 for. There is one per OCC.

Add support for reading the processor core and IO ring DVFS (Dynamic
Voltage and Frequency Slewing) temperature values out of the tempN_max
files and putting them on D-Bus. These values are the temperatures at
which the OCC starts using DVFS to cool the chip and are being put on
D-Bus so that fan control can read them and increase fan speeds before
then so the OCC doesn't have to do the DVFS.

Even though there is a value in the tempN_max file for every core, there
only needs to be one value on D-Bus per OCC. These are put in the
sensors namespace using the xyz.openbmc_project.Sensor.Value interface.
They do not need associations to the chassis, and they don't need to be
set to NaN when the OCCs aren't active, since the values can never
change.

There are values in the tempN_max files for most, if not all, other
temperature types as well, but the IO ring and core DVFS temps are the
only ones that aren't known ahead of time because they come from the
processor EEPROM.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I3e3f7a2a5db4053ea055e7baa16f0b0bf6eddbca

show more ...


# cbad219e 07-Oct-2021 Eddie James <eajames@linux.ibm.com>

Add SBE timeout handling

Add an Error instance to detect SBE timeouts in the driver.
Refactor the PLDM code to handle another requeset type (the HRESET) and
another type of sensor event (success or

Add SBE timeout handling

Add an Error instance to detect SBE timeouts in the driver.
Refactor the PLDM code to handle another requeset type (the HRESET) and
another type of sensor event (success or failure of the HRESET).
Handle the timeout and the PLDM event state change in the Manager by
changing the SBE state and requesting an SBE dump if necessary.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Change-Id: I30d8f9de1914d9808ddb7b547cc57085a5e5779e

show more ...


# 1d51da29 21-Sep-2021 Chris Cain <cjcain@us.ibm.com>

Use Idle Power Saver parameters from DBus

Allows users to enable and update the IPS parameters instead of
using hardcoded values.

Change-Id: I9010c4b4d3dbdf130a4a778f71c87279681a9f1a
Signed-off-by:

Use Idle Power Saver parameters from DBus

Allows users to enable and update the IPS parameters instead of
using hardcoded values.

Change-Id: I9010c4b4d3dbdf130a4a778f71c87279681a9f1a
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


12