History log of /openbmc/pldm/libpldmresponder/base.hpp (Results 1 – 20 of 20)
Revision Date Author Comments
# b3b84b49 23-Aug-2024 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

clang-tidy: Enable modernize-deprecated-headers check

Some headers from C library were deprecated in C++ and are no
longer welcome in C++ codebases. Some have no effect in C++ [1].

[1]: https://rel

clang-tidy: Enable modernize-deprecated-headers check

Some headers from C library were deprecated in C++ and are no
longer welcome in C++ codebases. Some have no effect in C++ [1].

[1]: https://releases.llvm.org/13.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-deprecated-headers.html

Change-Id: Ia3b1df10175e2e661c8fffb82e357c9db81b2e9c
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>

show more ...


# 16c2a0a0 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

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

show more ...


# a881c170 21-Jun-2021 George Liu <liuxiwei@inspur.com>

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry points in pldmd.

Tested: enabled oem-ibm and built pldm successfully.

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

show more ...


# 90314a3f 17-Oct-2023 Sagar Srinivas <sagar.srinivas@ibm.com>

Reorganize the setEventReceiver code

This commit is to re-organise the code to make the
setEventReceiver optional when GetTID gets called.

Currently, it is being called on every GetTID command.
Thi

Reorganize the setEventReceiver code

This commit is to re-organise the code to make the
setEventReceiver optional when GetTID gets called.

Currently, it is being called on every GetTID command.
This is and OEM behaviour, which was implemented at -
https://gerrit.openbmc.org/c/openbmc/pldm/+/41779/36

Also, setEventReceiver is a command defined in the platform
Spec, so rightfully placing it under the platform handler.

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Ib60e9d46a8eaf4806c5ec2e9575f4e219bc80eab

show more ...


# d2e48991 05-Dec-2023 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

Refactor: Handler expands TID parameter

Adding tid as a parameter to each handler so that the handler
can know the message sent from which device

Tested:
- Unit Tests passed.

Change-Id: Ida37bf611

Refactor: Handler expands TID parameter

Adding tid as a parameter to each handler so that the handler
can know the message sent from which device

Tested:
- Unit Tests passed.

Change-Id: Ida37bf61146d2f59ea11ebc7bf009f7837ed496d
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

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


# a330b2f0 04-May-2023 Andrew Jeffery <andrew@aj.id.au>

pldmd: Migrate instance ID allocation to pldm::InstanceIdDb

This removes use of `pldm::dbus_api::Requester` from around the
code-base. This makes progress towards removing the DBus API entirely
once

pldmd: Migrate instance ID allocation to pldm::InstanceIdDb

This removes use of `pldm::dbus_api::Requester` from around the
code-base. This makes progress towards removing the DBus API entirely
once all its consumers are converted to the libpldm instance ID APIs.

There was never a good reason for the code using the class to have
knowledge that it was related to DBus anyway, so this is, in-effect, a
double clean up improving separation of concerns.

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

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


# 6c39c7a7 05-Dec-2022 ArchanaKakani <archana.kakani@ibm.com>

Populate correct terminusId

Hardcoded terminus id 0 is used at multiple places in the current code.
Made changes to populate correct terminus id instead of hardcoded one.

Change-Id: I63cedcb38fb2d9

Populate correct terminusId

Hardcoded terminus id 0 is used at multiple places in the current code.
Made changes to populate correct terminus id instead of hardcoded one.

Change-Id: I63cedcb38fb2d993e2e4a2b45846c19531d55839
Signed-off-by: ArchanaKakani <archana.kakani@ibm.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 ...


# 79669c94 28-Apr-2021 Sagar Srinivas <sagar.srinivas@ibm.com>

oem_ibm: Reset Watchdog Timer

The watchdog timer is started as soon as the BMC
is powered on. Host sends GetTID to BMC, BMC
responds to that and sends SetEventReceiver
command wi

oem_ibm: Reset Watchdog Timer

The watchdog timer is started as soon as the BMC
is powered on. Host sends GetTID to BMC, BMC
responds to that and sends SetEventReceiver
command with a specified time interval(Heartbeat). Host
is supposed to send PlatformEventMessage to BMC
within the elapsed interval.

We use the same infrastructure as that of surveillance
for implementing host watchdog. The difference between
surveillance and host watchdog is that-
-> Surveillance is host monitoring the BMC if it is
functioning and its us up and running and if the BMC
fails to respond to ping from host, then host will
reset the BMC
-> Watchdog is BMC monitoring if the host boots without
failures, and if host does not respond to pings from
BMC after the watchdog interval, then the watchdog app
triggers a host dump.

Watchdog monitoring is followed by surveillance.

This commit adds change to reset the watchdog
timer on receiving PlatformEventMessage for
heartbeat elapsed time from Host

Tester with pldmtool:
./pldmtool raw -d 0x80 0x02 0x0A 0x01 0x01 0x06 0x01 0x01
Request Message:
08 01 80 02 0a 01 01 06 01 01
Received Msg
08 01 80 02 0a 01 01 06 01 01
Sending Msg
00 02 0a 00 00
Received Msg
08 01 00 02 0a 00 00
Response Message:
08 01 00 02 0a 00 00

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: I9fea658c3f2d3086ad2574ef827a5154dac6960e

show more ...


# a6a8ccd9 01-Apr-2021 Sagar Srinivas <sagar.srinivas@ibm.com>

PLDM: implement surveillance between Host and bmc

This commit is to implement surveillance between host
and bmc, wherein host monitors if bmc is up and
running through constant pings

PLDM: implement surveillance between Host and bmc

This commit is to implement surveillance between host
and bmc, wherein host monitors if bmc is up and
running through constant pings(by sending Platform
EventMessages) sent from host to BMC. And if BMC
fails to respond to the pings, then BMC will be
reset using the KCS interface.

1. Host->BMC - GetTID
2. BMC->Host - Respond to GetTID, SetEventReceiver
3. Host->BMC - Respond to SetEventReceiver
4. BMC->Host - Send PlatformEventMessage after the
elapsed time interval(specified with
SetEventReceiver command)
4. Host->BMC - If BMC fails to send respond to host
within specified interval, Host resets BMC via
the KCS interface

Tested with PLDMTOOL:
SetEventReceiver command:
root@rain127bmc:/tmp# ./pldmtool base GetTID -m 8
Received Msg
08 01 81 00 02
Sending Msg
01 00 02 00 01
{
"Response": 1
}

platformEventMessage command(which will be received
by host):
root@rain118bmc:/tmp# ./pldmtool raw -d 0x80 0x02
0x0A 0x01 0x01 0x06 0x01 0x01
Request Message:
08 01 80 02 0a 01 01 06 01 01
Received Msg
08 01 80 02 0a 01 01 06 01 01
eventClass Checking
Sending Msg
00 02 0a 00 00
Response Message:
08 01 00 02 0a 00 00
Received Msg
08 01 00 02 0a 00 00

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Iac90b2233a873a54504ffa649d324d30525b7ce3

show more ...


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


# bc669f1b 28-Nov-2019 Deepak Kodihalli <dkodihal@in.ibm.com>

pldmd: implement a new handler registration scheme

Implement a PLDM request handler registration scheme that requires
handlers to be C++ objects rather than plain functions. This was nee

pldmd: implement a new handler registration scheme

Implement a PLDM request handler registration scheme that requires
handlers to be C++ objects rather than plain functions. This was needed
for a couple of reasons:

- Perform specific actions at the PLDM daemon startup (that's when the
handlers are loaded).
- Share data across PLDM request messages (for eg FRU/BIOS tables),
without having to resort to globals and statics.

Tested:
- existing unit tests still pass
- added tests for the new registration scheme

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

show more ...


# 5c4f80df 28-Jul-2019 John Wang <wangzqbj@inspur.com>

base: GetTID responder implementation

A pldm terminus is defined as the point of communication termination
for PLDM messages and the PLDM functions associated with those messages.

base: GetTID responder implementation

A pldm terminus is defined as the point of communication termination
for PLDM messages and the PLDM functions associated with those messages.

The Terminus ID(TID) is a value that identifies a PLDM terminus.

This commit assignes 1 to the BMC as the TID.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I7adb0e1274f326fe6cf148771f230f530c9a567c

show more ...


# f666db13 29-May-2019 Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com>

Implement the PLDM Daemon.

The pldm daemon is a PLDM responder.

PLDM messages received by the PLDM daemon from the MCTP daemon are routed
to the respective command handler to cr

Implement the PLDM Daemon.

The pldm daemon is a PLDM responder.

PLDM messages received by the PLDM daemon from the MCTP daemon are routed
to the respective command handler to create a response. This response will
be sent back by the PLDM daemon to the requester.

PLDM daemon and MCTP daemon interact with each other using UNIX domain sockets,
as documented in https://github.com/openbmc/docs/blob/master/designs/mctp.md

Implemented a way for the PLDM responder library to register handlers for
specific PLDM commands. This is as per the registration scheme
documented in README.md.

Support for enabling verbosity in the PLDM Daemon (tracing the receive and
response message packets) are conditionally compiled.You would need to
provide the --enable-verbose flag to configure to enable it.

We discard response messages received currently.

Fixed Handler function signature for bios and file_io types.

Tested :

Updated system with the Daemon and did a 'obmcutil poweron'
The Daemon was build with the verbose enabled configuration
Could boot a hypervisor that sends PLDM commands.

Below is the transactions recorded in the journal
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Received Msg
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Buffer Data: 09 01 81 3f 06 00
00 00 00 00 00 00 00 00 00 08 00 00 00 01 00 00 00 00 00
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Sending Msg
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Buffer Data: 09 01 00 3f 06 80
00 00 00 00

Change-Id: I22cfd85103bce167239219fbcc59c25b09528211
Signed-off-by: Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com>

show more ...


# a6575b84 03-Apr-2019 vkaverap <vkaverap@in.ibm.com>

PLDM Message Structure Change

With this change, PLDM code is optimised. The PLDM payload message
structure previously consisted of a pointer to the payload message and
the payload le

PLDM Message Structure Change

With this change, PLDM code is optimised. The PLDM payload message
structure previously consisted of a pointer to the payload message and
the payload length, this structure is removed with this commit and the
PLDM message structure now has the PLDM header structure and an array of
size 1 whose address is the starting byte of message payload. Therefore,
pldm msg struct can represent a request/response message in contiguous
memory, thereby enabling simple casts and avoiding memcpys to get from a
uint8_t* to pldm msg or vice versa.

This commit also introduces a change to have the response handlers allocate
memory for responses. This is aligned with the message struct change, and
enables varying length responses.

Change-Id: Ia46d852b8b16bfc7cf04f38435bd4079ad33c66b
Signed-off-by: vkaverap <vkaverap@in.ibm.com>

show more ...


# 432e187c 13-Feb-2019 Sampa Misra <sampmisr@in.ibm.com>

Implement GetPLDMVersion command

This commit implements the GetPLDMVersion which is required
as part of the base PLDM support to know the version of a
given PLDM type.

Chang

Implement GetPLDMVersion command

This commit implements the GetPLDMVersion which is required
as part of the base PLDM support to know the version of a
given PLDM type.

Change-Id: I1bcbd938c5b6833f62e0ee2f474b04d76b6970d9
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...


# 1b24f975 01-Feb-2019 Deepak Kodihalli <dkodihal@in.ibm.com>

Implement discovery commands

This commit does the following
- Implements the GetPLDMTypes and GetPLDMCommands commands. These are
commands that need to be handled by a PLDM device

Implement discovery commands

This commit does the following
- Implements the GetPLDMTypes and GetPLDMCommands commands. These are
commands that need to be handled by a PLDM device as part of the
initial PLDM discovery.
- Sets up the build infrastructure: separate libraries for PLDM
encode/decode libs and the PLDM responder.

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

show more ...