History log of /openbmc/pldm/libpldmresponder/platform_state_effecter.hpp (Results 1 – 15 of 15)
Revision Date Author Comments
# 2576aecd 17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I539a0c5baa63be240fc1c76367c0af338dd89c7b
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# 1e5c81e0 03-May-2024 Riya Dixit <riyadixitagra@gmail.com>

pldm: Remove unnecessary type casting in logs

This commit removes the unnecessary type casting of values of the
journal logs based on supported types mentioned in LG2 documentation
[1].

Testing: Ve

pldm: Remove unnecessary type casting in logs

This commit removes the unnecessary type casting of values of the
journal logs based on supported types mentioned in LG2 documentation
[1].

Testing: Verified the debug traces to correct.

'''
For Instance:
Earlier -
error(”TYPE = {TYPE} “, “TYPE”, static_cast<unsigned>(PLDM_STATE_EFFECTER_PDR));
Journal trace -
May 27 08:16:51 p10bmc pldmd[931]: TYPE = 11

After Correction -
error(”TYPE = {TYPE}“, “TYPE”, PLDM_STATE_EFFECTER_PDR);
Journal trace -
May 27 08:16:51 p10bmc pldmd[931]: TYPE = Enum(11)
'''

[1]: https://github.com/openbmc/phosphor-logging/blob/master/docs/structured-logging.md#lg2

Change-Id: Ia649ecd4ecbb73c421f7844885f58a6835805719
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 89644441 31-Mar-2024 Riya Dixit <riyadixitagra@gmail.com>

libpldmresponder: Improving Logs (lg2)

This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti

libpldmresponder: Improving Logs (lg2)

This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti-pattern document [1]. Additionally, based on the
requirement this commit adds more debug information to logs.

[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings

Change-Id: I7dc5c308a8cd76573995e07d01d1a6037bca31ba
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 3daf7a1c 17-Apr-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

libpldmresponder: fix a potential pldm crash

In the current state, pldm does create the sensor/effecter even in the
absence of the underlying dbus resource. There is a bug in the responder
code due

libpldmresponder: fix a potential pldm crash

In the current state, pldm does create the sensor/effecter even in the
absence of the underlying dbus resource. There is a bug in the responder
code due to which we emplace an empty dbus value map into the handler
with a sensor ID. And if the remote PLDM endpoint queries for the state
of the sensor, pldm would crash since it tries to read content from the
empty dbus value map. This commit would fix the crash by adding
necessary bound checks.

Testing:
1. Unit tests passed.
2. Functionally verified the fix by giving a dummy dbus object path and
making sure that the sensor/effecter is not created & also ensured that
pldm does not crash.

Change-Id: I5fb06677f6ae1bd74f9ec741b311f59737caf79d
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# acb20299 29-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

pldmd: Account for pldm_pdr_init() returning NULL

Historically, libpldm's pldm_pdr_init() has internall used assert() to
enforce that the returned value is not NULL. Efforts are underway to
remove t

pldmd: Account for pldm_pdr_init() returning NULL

Historically, libpldm's pldm_pdr_init() has internall used assert() to
enforce that the returned value is not NULL. Efforts are underway to
remove this reliance on assert() in libpldm to ensure consumers aren't
ungracefully terminated.

This change chooses to return an appropriate error to the
caller of pldmd's internal APIs where possible. However, in a number of
circumstances there was either not a sensible value that could be
returned, or it was not possible to return a value without further
refactoring. In these circumstances we choose to throw
`std::runtime_error`, which will at least do what it can to unwind.
While it may feel like it falls short of proper error handling, the
reality is the calling code is already structured such that it pretends
allocation failures never occur. The switch to throwing a runtime error
makes a strict improvement over the immediate termination implemented by
assert().

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ibb6bc3abf62e32f05ac079453853873298db6c4f

show more ...


# 47792274 13-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

pldm: Include config.h via compiler argument

This removes any ambiguity about which config.h is being included.
Subprojects such as libpldm and phosphor-logging also generate config.h
files, and the

pldm: Include config.h via compiler argument

This removes any ambiguity about which config.h is being included.
Subprojects such as libpldm and phosphor-logging also generate config.h
files, and these are exposed in the include path.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3e0ccd6339f088380ffa29d41167b07aefc7dd16

show more ...


# 6da4f91b 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

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

show more ...


# 49cfb138 02-Mar-2023 Riya Dixit <riyadixitagra@gmail.com>

PLDM: Implementing Phosphor-Logging/LG2 logging

This commit adds changes in PLDM for implementing
structured LG2 logging, thereby moving away from
std::cout/cerr practice of logging which are
output

PLDM: Implementing Phosphor-Logging/LG2 logging

This commit adds changes in PLDM for implementing
structured LG2 logging, thereby moving away from
std::cout/cerr practice of logging which are
output streams and not logging mechanism.

PLDM now can make use of lg2 features like accurate
CODE LINE Number and CODE_FUNCTION Name and better
detailing in json object values which can be used in
log tracking.

More detailed logging change:
https://gist.github.com/riyadixitagra/c251685c1ba84248181891f7bc282395

Tested:
Ran a power off, on, cycle, and reset-reload.

Change-Id: I0485035f15f278c3fd172f0581b053c1c37f3a5b
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# c453e164 21-Dec-2022 George Liu <liuxiwei@inspur.com>

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm succ

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm successfully after enabling ibm-oem

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

show more ...


# 5079ac4a 19-Aug-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes awa

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes away an #includer’s ability to effectively
disambiguate and to use alternatives. It also makes #included headers
order-dependent as they might have different meaning when included in
different orders."

For further reading:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive

The guidelines don't call out using using namespace from namespace
scope, but it is only marginally less problematic and still unexpected,
so this patch removes those as well.

The process used to do the update is roughly:

1 - git grep 'using namespace' **.hpp
2 - For each instance, remove the offending 'using namespace' line
3 - build
4 - add 'using namespace' to cpp files or fully resolve types in hpp
files until the project builds again.

Further cleanup is possible - for example cpp files could be scrubbed
for unnecessary namespace qualification - this was not done here to make
review as simple as possible.

Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# bd5e2eaa 22-Apr-2021 George Liu <liuxiwei@inspur.com>

Fix potential map::at error

There are some potential errors, when using the map::at method,
the process may hang due to out of bounds. so the exception should
be caught.

Als

Fix potential map::at error

There are some potential errors, when using the map::at method,
the process may hang due to out of bounds. so the exception should
be caught.

Also, use the map::contains method of C++20 instead of map::find.

Tested: built pldm successfully and worked.

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

show more ...


# d130e1a3 17-Jun-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

common: code re-org

Move common files under a common/ directory.

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


# 1521f6d1 16-Jun-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

pldmd: code re-org

Move code specific to the pldm main app to its own directory.

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

pldmd: code re-org

Move code specific to the pldm main app to its own directory.

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

show more ...


# 6492f524 15-Jun-2020 George Liu <liuxiwei@inspur.com>

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Also, other OpenBMC repos are doing the same.

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

show more ...


# 0d7aca8c 30-Mar-2020 George Liu <liuxiwei@inspur.com>

pldm: Optimized the setXXXHandler method in platform.hpp

Since other PDR types(eg: numeric effecter PDR) need to be added later,
all setXXXHandler methods are best separated, which is ea

pldm: Optimized the setXXXHandler method in platform.hpp

Since other PDR types(eg: numeric effecter PDR) need to be added later,
all setXXXHandler methods are best separated, which is easy to maintain
and read.
so moved the setStateEffecterStateHandler method to
platform_state_effecter.hpp.

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

show more ...