History log of /openbmc/openpower-occ-control/occ_pass_through.cpp (Results 1 – 25 of 27)
Revision Date Author Comments
# 48002498 13-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

prefer std::format over fmt

Switch to std::format to remove the dependency on fmt.

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


# d8aab2a9 21-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

elog-errors: remove generated file

Moved the YAML to phosphor-dbus-interfaces directly and removed
the generated files here.

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

elog-errors: remove generated file

Moved the YAML to phosphor-dbus-interfaces directly and removed
the generated files here.

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

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 ...


# d4c19a07 22-Apr-2022 Chris Cain <cjcain@us.ibm.com>

Prevent updating power cap sysfs file when OCC not active

The power cap can be updated at any time, but occ-control should only
update the sysfs files when the OCCs are active.
Also prevent sending

Prevent updating power cap sysfs file when OCC not active

The power cap can be updated at any time, but occ-control should only
update the sysfs files when the OCCs are active.
Also prevent sending pass through commands when OCC is not
active.

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

show more ...


# c567dc8d 01-Apr-2022 Chris Cain <cjcain@us.ibm.com>

Prevent termination on OCC open/read/write errors

Instead of creating an elog and terminating, the code will now retry on
a Open/Read/Write failure and if it continues to fail, it will return a
Comm

Prevent termination on OCC open/read/write errors

Instead of creating an elog and terminating, the code will now retry on
a Open/Read/Write failure and if it continues to fail, it will return a
CommFailure to the caller. Then the caller of can determine how to
handle (reset PM complex or ignore).
Normally all communication errors with the OCC should trigger an OCC
reset.

Change-Id: Ibf272270156edae565231ca429f15e8fca2f15bc
Signed-off-by: Chris Cain <cjcain@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 ...


# 6fa848a9 24-Jan-2022 Chris Cain <cjcain@us.ibm.com>

Fix occ-control terminations

1. Ensure PowerMode object created before attempting to use
2. Only call setChassisAssociation after getting successful temperature
reading.

Tested on Everest hw

Chang

Fix occ-control terminations

1. Ensure PowerMode object created before attempting to use
2. Only call setChassisAssociation after getting successful temperature
reading.

Tested on Everest hw

Change-Id: I308c072cf5ab0235086c136ba7644125de0a8c6a
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 ...


# b5ca1015 09-Sep-2021 George Liu <liuxiwei@inspur.com>

Update clang-format

refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Tested: built openpower-occ-control successfully.

Signed-off-by: George Liu <

Update clang-format

refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Tested: built openpower-occ-control successfully.

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

show more ...


# f3b7514e 09-Jun-2021 George Liu <liuxiwei@inspur.com>

Refactor D-Bus object

- The intent behind this commit is to refactor D-Bus, and abstract
the bus, getService, getProperty and other methods into the utils
file, and other file op

Refactor D-Bus object

- The intent behind this commit is to refactor D-Bus, and abstract
the bus, getService, getProperty and other methods into the utils
file, and other file operations D-Bus only need to include
uitls.hpp.

- We can also continue to add other general methods such as
setPropery, getSubTree in the utils file in the future.

- Also, removed redundant files(occ_finder.hpp and occ_finder.cpp).

Tested: built openpower-occ-control successfully and worked.

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

show more ...


# a8857c50 27-Jan-2021 Chris Cain <cjcain@us.ibm.com>

Trigger periodic OCC POLL commands when the OCCs are running

The OCC control app will periodically trigger kernel poll commands
to the OCC when the OCCs are active.
Code change also

Trigger periodic OCC POLL commands when the OCCs are running

The OCC control app will periodically trigger kernel poll commands
to the OCC when the OCCs are active.
Code change also adds an interface to allow any OCC command to be
sent to an OCC. The pass-through interface was also updated to
use the new command object.

Tested: I did several IPLs on multiple Rainier systems to verify
the changes. I forced OCC resets to ensure polling stopped when
OCCs were disabled and restarted after it came out of reset.

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

show more ...


# e0962703 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: replace message::variant with std::variant

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


# 305ff8b1 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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


# 94df8c90 14-Sep-2018 Gunnar Mills <gmills@us.ibm.com>

clang-format: Update to match docs repo

Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/mas

clang-format: Update to match docs repo

Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting

Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 4f4712d8 21-Jun-2018 Eddie James <eajames@us.ibm.com>

passthrough: only open /dev/occX during the operation

The file handle was left open constantly, resulting in dead file handles
when FSI is rescanned.

Change-Id: I1ca8b330131eaad

passthrough: only open /dev/occX during the operation

The file handle was left open constantly, resulting in dead file handles
when FSI is rescanned.

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

show more ...


# 3e5422ed 10-Aug-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Delay opening OCC device until bind

Fixes openbmc/openbmc#2118

Change-Id: If9e2610fe7443daa2196b0e5989f81bc544266b2
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.co

Delay opening OCC device until bind

Fixes openbmc/openbmc#2118

Change-Id: If9e2610fe7443daa2196b0e5989f81bc544266b2
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# ee4d83df 29-Jun-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Add support to watch for OCC errors

Change-Id: I98d95020a2d01e281e5c8efa825d6b4bd4c6c160
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>


# 2180b2da 28-Jun-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Change occ control service name

Currently, only thing that OCC controller does is create PassThrough
objects. However, there is a need now to create OCC Status objects
and hence some

Change occ control service name

Currently, only thing that OCC controller does is create PassThrough
objects. However, there is a need now to create OCC Status objects
and hence some restructuring is needed to consume that.

Since OCC control now is doing more than one thing, service name is
changed to map to that.

Change-Id: I466979a873d6f14385eb59d0e9d9f3a8b3f95a9b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# fd358d18 08-May-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

Create OCC pass-through objects

Create OCC pass-through d-bus objects when corresponding CPU objects are
created in the inventory.

Resolves openbmc/openbmc#1450.

Change

Create OCC pass-through objects

Create OCC pass-through d-bus objects when corresponding CPU objects are
created in the inventory.

Resolves openbmc/openbmc#1450.

Change-Id: I8da879f51ebef8dcc3d25358def81c5e0dce0617
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 7d700e26 19-May-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Fix data format used in OCC communication

Amester and OCC understand only the sequence that is in bytes.
Current OCC pass-through was sending chunk of 4 bytes and that
was breaking t

Fix data format used in OCC communication

Amester and OCC understand only the sequence that is in bytes.
Current OCC pass-through was sending chunk of 4 bytes and that
was breaking the protocol. Since the REST server only handles 4
bytes, OCC pass-through needs to convert array of 4 bytes into
array of 2 bytes prior to sending to OCC driver.

Similarly, pass-through reader now needs to read one byte at a time
than 4 bytes.

Change-Id: Ifc24636f6b1dfb0cc0052362d2982ecfa652fec5
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# 9bb065b8 18-Apr-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Commit errorlog and exit the application on error scenarios

This application interacts with OCC driver and hence its good to
terminate when there is an error during IO since it would mos

Commit errorlog and exit the application on error scenarios

This application interacts with OCC driver and hence its good to
terminate when there is an error during IO since it would mostly
mean a faulty hardware.

Fixes openbmc/openbmc#1428

Change-Id: I48bc7b2cf19922a7a53dbab78cdd4f2338a7431b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# 67d50ad6 17-Apr-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Write payload to OCC and read it back

This will utilize the OCC driver to send Amester payload to OCC and
does a read to get the contents of OCC-SRAM and passes it back.

Change-

Write payload to OCC and read it back

This will utilize the OCC driver to send Amester payload to OCC and
does a read to get the contents of OCC-SRAM and passes it back.

Change-Id: I68627b21665256df6fabad7768bb139dd6d1b99b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# 38b08d79 14-Apr-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Open device and populate file descriptor

Change-Id: I8159f71ff3dd087f10cdf3b013e1acb60d4758fb
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>


# afd21a65 13-Apr-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Populate device entry based on position

Communicating to OCC from BMC in PassThrough mode involves 2 drivers,
namely;

1) SBE FIFO driver --> Used to communicate with SBE
2)

Populate device entry based on position

Communicating to OCC from BMC in PassThrough mode involves 2 drivers,
namely;

1) SBE FIFO driver --> Used to communicate with SBE
2) OCC driver --> Which uses FIFO driver to write data to OCC
at a predefined address and reads it back from a predefined
OCC address.

Device entry that is of interest here belongs to #2 above.
This will map occ0 to fifo1, occ2 to fifo2 and so on.
Until the udev rules are in place to make sure that a particular
entry always maps to correct device not caring the probing order,
this change here is a best guess that cpu0 and cpu1 would mostly in
all cases be probed in that order.

Change-Id: I485e0ea4eab1b4c6f59ee4b68c0725f9633cd933
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


# f9fbadd6 13-Apr-2017 Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

Remove dead code during sdbus object creation

As part of object creation, Interface added signal gets
broadcasted by default unless told not to do so.
Current code uses the default b

Remove dead code during sdbus object creation

As part of object creation, Interface added signal gets
broadcasted by default unless told not to do so.
Current code uses the default behavior and also makes an explicit
call to broadcast a signal. Although it does not send a signal again,
its un-necessary code that gets executed and should be removed.

Change-Id: I438d6f54eeea9ea930525e956c26a69510ccf83d
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

show more ...


12