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 ...
|
27a022ca | 10-Aug-2022 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organi
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organisation of the source code to make it work as a subproject.
There are no .c/.h files changes in this commit, only meson changes and re-organising the code structure.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I20a71c0c972b1fd81fb359d604433618799102c6
show more ...
|
84b790cb | 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: I8e2242adb79be342562c9b7f3d2153dfdf578085
show more ...
|
d020a4fb | 02-Jun-2022 |
Andrew Geissler <geissonator@yahoo.com> |
remove wants on synch targets in soft off
openbmc/phosphor-state-manager#21 highlights an architecture issue with OpenBMC's use of synchronization targets. When a service, such as pldmSoftPowerOff.s
remove wants on synch targets in soft off
openbmc/phosphor-state-manager#21 highlights an architecture issue with OpenBMC's use of synchronization targets. When a service, such as pldmSoftPowerOff.service, runs both in a standard power off target, as well as in other paths (like the host graceful quiesce path), there is an issue.
The service starts the synchronization targets in the quiesce path and this causes them to already be running on the power off, resulting in the synchronization targets not actually coordinating the power off.
The direction this commit takes OpenBMC is that if a service needs to run outside of the standard power on or off path, then they can not have a Wants or Requires clause in the service file.
The following commit was done a while back to address this issue: https://gerrit.openbmc.org/c/openbmc/phosphor-state-manager/+/40026
That is that we ensure the primary power on and off targets start the synchronization targets so services requiring them can just use a Before or After clause.
The piece that was never done was to go and fix the services which fell into this bucket.
Tested: - Did multiple boots, reboots, and host crash tests and saw no issues
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I7260f4aad666acf127f9766cf27dd54f4a18ebe4
show more ...
|
8c2135c5 | 25-May-2022 |
Andrew Geissler <geissonator@yahoo.com> |
softoff: ensure stopped on any boot of host
Saw an interesting issue recently where the system ended up in a situation where the pldmSoftPowerOff application was running through an entire reboot of
softoff: ensure stopped on any boot of host
Saw an interesting issue recently where the system ended up in a situation where the pldmSoftPowerOff application was running through an entire reboot of the host firmware.
Another bug induced the issue, but basically the pldmSoftPowerOff service was waiting for the host to indicate it had shutdown, when in fact the host had already been stopped and the system was rebooted. The reason the pldmSoftPowerOff service was not stopped on the reboot of the host is because it conflicts with the incorrect target. The obmc-host-start@.target is only run on fresh boots of the system. The obmc-host-startmin@.target is called on all boots, including reboots.
To ensure pldmSoftPowerOff is always stopped when the host is being booted, change the conflicts.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ib2c730b9472a39bd73d85046f61a6f093b7a5a80
show more ...
|
9915d022 | 21-Dec-2021 |
George Liu <liuxiwei@inspur.com> |
softoff: Check the return value of the HOST
When BMC sends `set_state_effecter_states` command, only when HOST responds successfully(PLDM_SUCCESS), it will continue to wait for the HOST to do the pr
softoff: Check the return value of the HOST
When BMC sends `set_state_effecter_states` command, only when HOST responds successfully(PLDM_SUCCESS), it will continue to wait for the HOST to do the preparatory work before shutdown, otherwise it will directly exit the softoff daemon.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Idfd5e50cf3372c89fbc48d8f1ad67a2c3b800352
show more ...
|
31a78447 | 12-Sep-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix issues reported by static analysis tool
Following are the issues reported by the clang static analysis tool in the CI, this commit is an attempt to fix those. 1. warning: Value stored to 'rc' du
Fix issues reported by static analysis tool
Following are the issues reported by the clang static analysis tool in the CI, this commit is an attempt to fix those. 1. warning: Value stored to 'rc' during its initialization is never read [deadcode.DeadStores] auto rc = getHostState(); 2. warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch] if (!pdr) 3. warning: Value stored to 'type' during its initialization is never read [deadcode.DeadStores] uint8_t type = requestMsg[1]; 4. warning: Value stored to 'sum' during its initialization is never read [deadcode.DeadStores] auto sum = crc32(fruData.data(), recordTableSize + pads); 5. warning: Value stored to 'responsePtr' during its initialization is never read [deadcode.DeadStores] auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I0673403a36c90025afd0f2b1bca1d7f3ea052033
show more ...
|
4fea7a20 | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic8c3ff9b8b0fa64ef1d17ba305b9030284a1ee68
show more ...
|
adbb2452 | 19-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: provide an option to skip systemd units
The systemd pkg-config tells clients to install unit files to (a subdir of) rootprefix, not prefix. This means our attempt to substitute our prefix in
build: provide an option to skip systemd units
The systemd pkg-config tells clients to install unit files to (a subdir of) rootprefix, not prefix. This means our attempt to substitute our prefix into systemd_system_unitdir doesn't have any impact - thus we remove the substitution.
Rather than attempt to cook up some kind of support for rootprefix, which is a quasi-standard variable anyway, provide a mechanism to simply skip installing the systemd unit files. This enables users with a prefix pointing somewhere they can access to get all the way through the install process without needing root or contaminating the build system.
It would be reasonable to use this option in the future to turn off any additional systemd support added to the project.
Change-Id: I9a06cc09a2d940fed8a7fdc2f583f5949a0ecd47 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
a1d27606 | 17-Apr-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Replace deprecated get_pkgconfig_variable with get_variable
- Meson 0.57 warns that get_pkgconfig_variable is deprecated and we should be using get_variable instead.
Tested By:
Setup docker, and
Replace deprecated get_pkgconfig_variable with get_variable
- Meson 0.57 warns that get_pkgconfig_variable is deprecated and we should be using get_variable instead.
Tested By:
Setup docker, and made sure the service files are installed in the desired directory.
Installing /home/juliet/Documents/Work/docker/ci_test_area/pldm/build/pldmd.service to /lib/systemd/system Installing /home/juliet/Documents/Work/docker/ci_test_area/pldm/build/pldm_verbosity to /etc/default Installing /home/juliet/Documents/Work/docker/ci_test_area/pldm/build/softoff/pldmSoftPowerOff.service to /lib/systemd/system
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I2da6f5fecc37e91eb927b2ebae9bd59de59d1b08
show more ...
|
3b1dc01d | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: add wrapfiles for dependencies
Add wrapfiles for all dependencies and update meson.build files to ensure dependencies are requested in all cases. This enables out-of-bitbake/out-of-sdk builds
build: add wrapfiles for dependencies
Add wrapfiles for all dependencies and update meson.build files to ensure dependencies are requested in all cases. This enables out-of-bitbake/out-of-sdk builds for this repository and enables it to be used as a meson subproject.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0f2f7eed98f7f7555cafefc2605e1031a7f0adaf
show more ...
|
6f4479c7 | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: rename dependency variable
Per [1], the conventions for dependency variables are to be named '<project or lib>_dep'. This allows consistency when using this project as a meson-subproject els
build: rename dependency variable
Per [1], the conventions for dependency variables are to be named '<project or lib>_dep'. This allows consistency when using this project as a meson-subproject elsewhere.
Switch the name from 'libpldm' to 'libpldm_dep'.
1. https://mesonbuild.com/Subprojects.html#naming-convention-for-dependency-variables
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I98c8e2148610b45755b45029d1d38206bac5b885
show more ...
|
b0d15f1f | 16-Apr-2021 |
Deepak Kodihalli <deepak.kodihalli.83@gmail.com> |
build: switch to C++20
Signed-off-by: Deepak Kodihalli <deepak.kodihalli.83@gmail.com> Change-Id: I514e8210bfcc4c4546720de19b151d9a4dae1fc5 |
bcf91acc | 14-Mar-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix a possible null pointer dereference
- This commit would fix a potential null pointer dereference.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ic323bde2c4bd35c35132e43104
Fix a possible null pointer dereference
- This commit would fix a potential null pointer dereference.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ic323bde2c4bd35c35132e4310466cd6ae7ec7aeb Signed-off-by: George Liu <liuxiwei@inspur.com>
show more ...
|
9f8d2b0a | 24-Mar-2021 |
Sampa Misra <sampmisr@in.ibm.com> |
Revert "Fix return value for the pldm_send method"
This reverts commit 4d25f6a6f4a027d51863393e55cb770ededf0358.
Reason for revert: <sendMsg returns the number of bytes transferred in success. that
Revert "Fix return value for the pldm_send method"
This reverts commit 4d25f6a6f4a027d51863393e55cb770ededf0358.
Reason for revert: <sendMsg returns the number of bytes transferred in success. that is being treated as error response as per current code. blocking Host to power on. Reverting for now until we find a better solution>
Change-Id: I606f0245075e38eb99de74219453dc5f781d46b7
show more ...
|
4d25f6a6 | 16-Mar-2021 |
George Liu <liuxiwei@inspur.com> |
Fix return value for the pldm_send method
- If the caller uses invalid mctp_eid to call the pldm_send/sendmsg method, it will return a value greater than 0(non -1).
- At this time, the pldm_send
Fix return value for the pldm_send method
- If the caller uses invalid mctp_eid to call the pldm_send/sendmsg method, it will return a value greater than 0(non -1).
- At this time, the pldm_send method will return to `PLDM_REQUESTER_SUCCESS`, and will cause the pldm daemon to die.
Tested: - use an invalid mctp_eid: Before: pldmtool platform getpdr -d 0 -m 11 -v the pldm daemon to die.
After: pldmtool platform getpdr -d 0 -m 11 -v Request Message: 0b 01 80 02 51 00 00 00 00 00 00 00 00 01 ff ff 00 00 Failed to call pldm_send_recv, rc = 18 pldmSendRecv: Failed to receive RC = 18
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I12eb5a83e7848a5aaec3e7f38b142a9e64d3dd45
show more ...
|
a2767e68 | 24-Feb-2021 |
George Liu <liuxiwei@inspur.com> |
softoff: Fix sdeventplus exception
error link: https://jenkins.openbmc.org/job/CI-MISC/job/ci-repository-ppc64le/1255/console
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: If5db9c421df
softoff: Fix sdeventplus exception
error link: https://jenkins.openbmc.org/job/CI-MISC/job/ci-repository-ppc64le/1255/console
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: If5db9c421df502348e6fdf6e64c46c8cdf02e758
show more ...
|
5b5fa436 | 22-Jan-2021 |
Andrew Geissler <geissonator@yahoo.com> |
softoff: support host transition state
State management recently introduced transition states. See the following for more information: https://github.com/openbmc/phosphor-dbus-interfaces/commit/9f65
softoff: support host transition state
State management recently introduced transition states. See the following for more information: https://github.com/openbmc/phosphor-dbus-interfaces/commit/9f65dfeaa5ab22cae03db45c9916868da9864f83
Both the pldm soft off service and the new service which sets the host transition state run at the same time. If the state service runs first then the pldm soft off code incorrectly skips running.
We could make an After relationship with the service but since it's a defined API, lets just handle in software with this commit.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I55515ff78f0406cba1dcb946173deeb0fcb98d34
show more ...
|
001f7885 | 04-Jan-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Remove redundant dependency calls
- In the current state, the build system has too many dependency calls, because of which meson tries to find the same dependendency mutiple times & prints a tra
Remove redundant dependency calls
- In the current state, the build system has too many dependency calls, because of which meson tries to find the same dependendency mutiple times & prints a trace on the console.This would have been an ideal solution when all the subdirectories are subprojects in meson but in the current context it is not.
- Even though meson uses the cached dependency objects rather than fetching them every time, it might not give any added advantage on the performance front.
- But checking for the same dependency mutiple times gives a false impression to the users & this can be avoided by re-using the dependency objects across subdirectories.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ic428b2ab1897e4dc4a0024164c07fd416c927da1
show more ...
|
29d22119 | 18-Nov-2020 |
Tom Joseph <tomjoseph@in.ibm.com> |
softoff: Don't return error completion code if PDR not found
System Firmware has not implemented effecter for handling softoff. To handle that gracefully, as well as the scenario in which PDR exchan
softoff: Don't return error completion code if PDR not found
System Firmware has not implemented effecter for handling softoff. To handle that gracefully, as well as the scenario in which PDR exchange has not happened, the softoff application will exit gracefully in either scenarios.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com> Change-Id: I09478b5f0c8b87ce639f238035e7fb0513ffff7e
show more ...
|
30450fe3 | 29-Oct-2020 |
Andrew Geissler <geissonator@yahoo.com> |
host-stop: ensure soft off is run in correct seq
The flow of synchronization targets during a obmc-host-stop@.target is the following: obmc-host-stop-pre -> obmc-host-stopping -> obmc-host-stopped
host-stop: ensure soft off is run in correct seq
The flow of synchronization targets during a obmc-host-stop@.target is the following: obmc-host-stop-pre -> obmc-host-stopping -> obmc-host-stopped
The obmc-host-stop-pre is where we notify the host that a shutdown is occurring and allow it to gracefully shut itself down. This is where pldmSoftPowerOff.service should run.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I909e69effa18f05df99da3cc3e9026064f1e0e7b
show more ...
|
184f6026 | 16-Apr-2020 |
Chicago Duan <duanzhijia01@inspur.com> |
soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
show more ...
|
4c1a3fda | 09-Mar-2020 |
George Liu <liuxiwei@inspur.com> |
soft-off: Add pldm host soft off requester application.
Since the phosphor-softpoweroff is too tied up to IPMI, we need to implement a new pldm host soft off requester application in parallel in the
soft-off: Add pldm host soft off requester application.
Since the phosphor-softpoweroff is too tied up to IPMI, we need to implement a new pldm host soft off requester application in parallel in the pldm repo.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I47534bb25c976a0004a1cd9f07d7590e605ce243 Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
show more ...
|