236d864b | 18-Nov-2024 |
Amithash Prasasd <amithash@meta.com> |
Install commit.hpp into target include directory
This ensures that users can include commit.hpp which is needed to generate event logs
Change-Id: Ie04479d9a9ef41a3e3533db7bc20d33ff22b38be Signed-of
Install commit.hpp into target include directory
This ensures that users can include commit.hpp which is needed to generate event logs
Change-Id: Ie04479d9a9ef41a3e3533db7bc20d33ff22b38be Signed-off-by: Amithash Prasasd <amithash@meta.com>
show more ...
|
c6396da5 | 14-Nov-2024 |
Deepa Karthikeyan <deepakala.karthikeyan@ibm.com> |
openpower-pels: Fix libguard initialization
The initialization of libguard was being skipped because the device tree was not set up during the initial phosphor-logging phase. As a result, all guard
openpower-pels: Fix libguard initialization
The initialization of libguard was being skipped because the device tree was not set up during the initial phosphor-logging phase. As a result, all guard library calls failed, preventing the creation of system guards in the event of an error.
To address this, the libguard initialization has been moved to the point where guard creation occurs. Since libguard initialization is lightweight, this change has no noticeable impact on performance.
The fix has been tested, and guards are now correctly created as expected.
``` root@p10bmc:~# putscom pu.c 20018600 8000000000000000 -n0 -p0 -cft pu.c k0:n0:s0:p00:c0 /usr/bin/edbg putscom pu.c 20018600 8000000000000000 -n0 -p0 -cft
root@p10bmc:~# guard -l ID | ERROR | Type | Path 0x00000001 | 0x50000a78 | unrecoverable | physical:sys-0/node-0/proc-0/eq-0/fc-0/core-0 ``` Change-Id: I8c718be4638743dc1015d0f4f327a4f65c9d9c2d Signed-off-by: deepakalak <deepakala.karthikeyan@ibm.com>
show more ...
|
fc14867b | 06-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: simplify commit functions
Eliminate the template indirection for the commit function in favor of a base-class overload. There was previously a public template specialization of `lg2::c
lg2: commit: simplify commit functions
Eliminate the template indirection for the commit function in favor of a base-class overload. There was previously a public template specialization of `lg2::commit` and a private base-class implementation (in the `details` namespace). The template implementations provided no stronger type-checking, since it was already a concept requiring inheritance from the base-class. The template precluded simple code such as:
```cpp try { //... } catch (const sdbusplus::exception::generated_event_base& e) { lg2::commit(e); } ```
By making the base-class types public, rather than hidden in the details namespace, and removing the templates, the code is simpler and more usable.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If0a3e1331eff36aec4b9f7e4950636360d59306e
show more ...
|
dc35e307 | 05-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
log-create: add CLI utility to create events
Add utility to allow creation of events from the command line and shell scripts. The utility ensures that the correct data arguments are passed, or else
log-create: add CLI utility to create events
Add utility to allow creation of events from the command line and shell scripts. The utility ensures that the correct data arguments are passed, or else fails the creation.
Tested:
``` $ ./builddir/log-create xyz.openbmc_project.Sensor.Threshold.SensorFailure --json '{ "SENSOR_NAME": "Example-Sensor" }' <3> OPENBMC_MESSAGE_ID={"xyz.openbmc_project.Sensor.Threshold.SensorFailure":{"SENSOR_NAME":"Example-Sensor","_SOURCE":{"COLUMN":45,"FILE":"../log_create_main.cpp","FUNCTION":"int generate_event(const std::string&, const nlohmann::json_abi_v3_11_2::json&)","LINE":34,"PID":264326}}} /xyz/openbmc_project/logging/entry/1
$ busctl --user introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 -l | cat xyz.openbmc_project.Logging.Entry interface - - - .AdditionalData property as 5 "SENSOR_NAME=\"Example-Sensor\"" "_CODE_FILE=../log_create_main.cpp" "_CODE_FUNC=int generate_event(const std::string&, const nlohmann::json_abi_v3_11_2::json&)" "_CODE_LINE=34" "_PID=264326" emits-change writable .Id property u 1 emits-change writable .Message property s "xyz.openbmc_project.Sensor.Threshold.SensorFailure" emits-change writable .Severity property s "xyz.openbmc_project.Logging.Entry.Level.Critical" emits-change writable
$ ./builddir/log-create xyz.openbmc_project.Sensor.Threshold.SensorFailure terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::out_of_range' what(): [json.exception.out_of_range.403] key 'SENSOR_NAME' not found
$ ./builddir/log-create xyz.openbmc_project.Invalid.Event.Name Unknown event: xyz.openbmc_project.Invalid.Event.Name ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I357b453f8fecc9d224aa412ad7f3cc6b8c2a4ad8
show more ...
|
5effae2d | 05-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
README: update for lg2::commit support
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I49a67f365106755862df2aafbac5512da2bfee2b |
6eb96bf7 | 05-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add support for journal-only method
The design document for the new event system references an option to log events to the journal rather than to dbus[1] using the 'OPENBMC_MESSAGE_ID'
lg2: commit: add support for journal-only method
The design document for the new event system references an option to log events to the journal rather than to dbus[1] using the 'OPENBMC_MESSAGE_ID' identifier. Add support and test cases for this as a meson option.
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md#phosphor-logging
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6cb94453c6cc95a9ccbbbc11859b70ef12d375fd
show more ...
|
9ca4d137 | 31-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
manager: use new Logging.Cleared event
Modify the internal manager support for creating internal events to be able to support the sdbusplus generated events. Transition from the local Logging.Error
manager: use new Logging.Cleared event
Modify the internal manager support for creating internal events to be able to support the sdbusplus generated events. Transition from the local Logging.Error.LogsCleared to the global Logging.Cleared event. Clean up references to the old event.
Tested: ``` $ busctl --user call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Collection.DeleteAll DeleteAll $ busctl --user introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 -l | cat NAME TYPE SIGNATURE RESULT/VALUE FLAGS xyz.openbmc_project.Logging.Entry interface - - - .GetEntry method - h - .AdditionalData property as 5 "NUMBER_OF_LOGS=210" "_CODE_FILE=../log_manager.hpp" "_CODE_FUNC=virtual void phosphor::logging::Manager::deleteAll()" "_CODE_LINE=361" "_PID=3318436" emits-change writable .EventId property s "" emits-change writable .Id property u 1 emits-change writable .Message property s "xyz.openbmc_project.Logging.Cleared" emits-change writable .Resolution property s "" emits-change writable .Resolved property b false emits-change writable .ServiceProviderNotify property s "xyz.openbmc_project.Logging.Entry.Notify.NotSupported" emits-change writable .Severity property s "xyz.openbmc_project.Logging.Entry.Level.Informational" emits-change writable .Timestamp property t 1730408674348 emits-change writable .UpdateTimestamp property t 1730408674348 emits-change writable ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I470f33ae2f5bfae6bf6d6a80ac2c5f028e41da95
show more ...
|
247fed60 | 31-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: extract source location information and add to event
sdbusplus will add PID and std::source_location information, from the event origination point, to the event. Extract this and add i
lg2: commit: extract source location information and add to event
sdbusplus will add PID and std::source_location information, from the event origination point, to the event. Extract this and add it to the event.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6364ba0f74231fca2815c770bc3e56c2780d199e
show more ...
|
f0af358f | 10-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add methods for new sdbusplus events
Add implementations and test cases for the `lg2::commit` functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25a87fd65738e4d
lg2: commit: add methods for new sdbusplus events
Add implementations and test cases for the `lg2::commit` functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25a87fd65738e4debbe98f3473709f77d51777e9
show more ...
|
e001cd79 | 07-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add stubs to support new sdbusplus events
Create empty stubs for the commit functions from the new event log design[1].
[1]: https://github.com/openbmc/docs/blob/master/designs/event-l
lg2: commit: add stubs to support new sdbusplus events
Create empty stubs for the commit functions from the new event log design[1].
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8c0232858f41b875e78d5e41f17c065ca727429d
show more ...
|
ff35be3e | 15-Oct-2024 |
Deepa Karthikeyan <deepakala.karthikeyan@ibm.com> |
openpower-pels: Create guard using libguard
Replace CreateWithEntityPath D-Bus method with guard library calls for creating guard entries, as CreateWithEntityPath is not an approved dbus method.
Te
openpower-pels: Create guard using libguard
Replace CreateWithEntityPath D-Bus method with guard library calls for creating guard entries, as CreateWithEntityPath is not an approved dbus method.
Tested and the guard record is created with the corresponding PEL id
``` before injecting the error root@p10bmc:~# guard -l No unresolved records to display
After injecting error, the guard is created using the PEL ID root@p10bmc:~# guard -l ID | ERROR | Type | Path 0x00000001 | 0x5000592b | unrecoverable | physical:sys-0/node-0/proc-0/eq-1/fc-0/core-0 root@p10bmc:~# peltool -l { "0x5000592B": { "SRC": "BD13E510", "Message": "Error Signature: 0x20DA0020 0x00000001 0x4D740407", "PLID": "0x5000592B", "CreatorID": "BMC", "Subsystem": "Processor Unit (CPU)", "Commit Time": "10/17/2024 09:54:22", "Sev": "Unrecoverable Error", "CompID": "bmc hw diags" } } ```
Change-Id: I7531bce403206beaa119aea0a621e6b47d28ffd0 Signed-off-by: deepakala-k <deepakala.karthikeyan@ibm.com>
show more ...
|
083c7049 | 14-Oct-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Remove dump status bits from PELs
Stop filling in the bits in the PEL that say there are un-offloaded dumps. These require calls to the dump daemon that can be slow and even time out if the du
PEL: Remove dump status bits from PELs
Stop filling in the bits in the PEL that say there are un-offloaded dumps. These require calls to the dump daemon that can be slow and even time out if the dump daemon is busy.
These aren't parsed out in the peltool output anyway, and there are other ways to determine if there are dumps - someone could just look at the dump D-Bus directly.
This isn't a direct revert of the commit that introduced it because of all the merge conflicts trying to do a revert entailed.
Tested: Can still create PELs.
Change-Id: I975f06ebf3638b39315fdea49393d1941a6f5216 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
13db1d38 | 08-Oct-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add a try/catch to a nlohmann::json::dump()
In some automated system boot testing, there was an occurrence of:
``` An extension's create function threw an exception: [json.exception.type_error
PEL: Add a try/catch to a nlohmann::json::dump()
In some automated system boot testing, there was an occurrence of:
``` An extension's create function threw an exception: [json.exception.type_error.316] invalid UTF-8 byte at index 56: 0x20 ```
This is coming from nlohmann::json::dump(), though I'm not sure how an invalid json object can even be constructed, since it would just fail earlier.
This commit adds a try/catch around the only occurrence of dump() that doesn't already have one, as seemingly this is where that exception has to have come from.
Change-Id: I16095459091bcd1df033846517c3b822e504e6ff Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
ec6f1411 | 17-Oct-2024 |
Eddie James <eajames@linux.ibm.com> |
openpower-pels: Check response header
Using the new PLDM API requires checking the response header for the request and datagram flags, as those indicate that the message isn't really a response.
Ch
openpower-pels: Check response header
Using the new PLDM API requires checking the response header for the request and datagram flags, as those indicate that the message isn't really a response.
Change-Id: I38f8e77bd5defaf611695649bb75d589b2548f17 Signed-off-by: Eddie James <eajames@linux.ibm.com>
show more ...
|
4e1456e4 | 03-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
elog: ensure new sdbusplus events cannot be committed directly
sdbusplus events should not be committed in the old way, because they have their metadata directly in the class rather than using the s
elog: ensure new sdbusplus events cannot be committed directly
sdbusplus events should not be committed in the old way, because they have their metadata directly in the class rather than using the side-band metadata YAML (from phosphor-logging). Add compile-time asserts to ensure they cannot be used with the older interfaces.
Tested:
Create a simple test: ``` phosphor::logging::report< sdbusplus::event::xyz::openbmc_project::Logging::Cleared>(); ```
Which fails to compile as follows: ``` In file included from ../test/basic_event_commit.cpp:3: ../lib/include/phosphor-logging/elog.hpp: In instantiation of ‘uint32_t phosphor::logging::report(Args ...) [with T = sdbusplus::event::xyz::openbmc_project::Logging::Cleared; Args = {}; uint32_t = unsigned int]’: ../test/basic_event_commit.cpp:13:66: required from here ../lib/include/phosphor-logging/elog.hpp:205:15: error: static assertion failed: T must NOT be an sdbusplus::generated_event 205 | !std::is_base_of_v<sdbusplus::exception::generated_event<T>, T>, ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9cfc6915d125545067082a4fff717443aedd1531
show more ...
|
84fbb68f | 30-Sep-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add heartbeat action flag to power-on log
The informational PEL for a chassis power on starting is also considered a heartbeat error log.
Change-Id: I7befa66997bcd17fd310304ae76516cfeea7a3e6 S
PEL: Add heartbeat action flag to power-on log
The informational PEL for a chassis power on starting is also considered a heartbeat error log.
Change-Id: I7befa66997bcd17fd310304ae76516cfeea7a3e6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
79f206b8 | 03-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
log-manager: fix arg bounds
An incorrect argument count check results in `argv[1]` being accessed even when it is not provided. This causes a SEGV on launch of the daemon in normal cases (on a syst
log-manager: fix arg bounds
An incorrect argument count check results in `argv[1]` being accessed even when it is not provided. This causes a SEGV on launch of the daemon in normal cases (on a system) when the temporary path location is not provided.
Fixes: fa2d962b5da807ac17bb7a355709ff05dd10d041 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibe7254533cb6002d73c5a1ada8bb1f35e9c9df53
show more ...
|
730c40fa | 03-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
test: fix resolve-flag test
Due to two commits getting merged in close proximity, a variable for the path to write error logs no longer exists and one test case was broken in compile. Fix that per
test: fix resolve-flag test
Due to two commits getting merged in close proximity, a variable for the path to write error logs no longer exists and one test case was broken in compile. Fix that per the second commit approach.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I567462193ecc729e932da107d8e4932b7c6f5b49
show more ...
|
597f24af | 27-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
Logging.Create: return result path from create call
Support new object path return from Logging.Create.
See Ia010e53fda55cef8b9cfc948482e133f20040320.
``` $ busctl --user call xyz.openbmc_project.
Logging.Create: return result path from create call
Support new object path return from Logging.Create.
See Ia010e53fda55cef8b9cfc948482e133f20040320.
``` $ busctl --user call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Logging.Create Create "ssa{ss}" "Example Event" xyz.openbmc_project.Logging.Entry.Level.Error 0 o "/xyz/openbmc_project/logging/entry/1" $ busctl --user introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 -l NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Association.Definitions interface - - - .Associations property a(sss) 0 emits-change writable xyz.openbmc_project.Common.FilePath interface - - - .Path property s "/tmp/phosphor-logging/errors/1" emits-change writable xyz.openbmc_project.Logging.Entry interface - - - .GetEntry method - h - .AdditionalData property as 0 emits-change writable .EventId property s "" emits-change writable .Id property u 1 emits-change writable .Message property s "Example Event" emits-change writable .Resolution property s "" emits-change writable .Resolved property b false emits-change writable .ServiceProviderNotify property s "xyz.openbmc_project.Logging.Entry.Notify.NotSupported" emits-change writable .Severity property s "xyz.openbmc_project.Logging.Entry.Level.Error" emits-change writable .Timestamp property t 1727728256156 emits-change writable .UpdateTimestamp property t 1727728256156 emits-change writable xyz.openbmc_project.Object.Delete interface - - - .Delete method - - - xyz.openbmc_project.Software.Version interface - - - .Purpose property s "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" emits-change writable .Version property s "2.15" emits-change writable ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id2f45a1376a88d9785e860a47ea1135179b28ed9
show more ...
|
fa2d962b | 30-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
log-manager: enable non-standard path for local tests
Enable the log-manager to be launched with a path other than `/var/phosphor-logging` to allow it to be ran on a development system for test purp
log-manager: enable non-standard path for local tests
Enable the log-manager to be launched with a path other than `/var/phosphor-logging` to allow it to be ran on a development system for test purposes. This required some refactoring throughout as to how paths were handled.
Tested:
After running tests, `/tmp/phosphor-logging` is populated with entries. Launching `./builddir/phosphor-log-manager /tmp/phosphor-logging`, the log-manager will have the entries on dbus:
``` $ busctl --user tree xyz.openbmc_project.Logging └─ /xyz └─ /xyz/openbmc_project └─ /xyz/openbmc_project/logging ├─ /xyz/openbmc_project/logging/entry │ ├─ /xyz/openbmc_project/logging/entry/100 │ ├─ /xyz/openbmc_project/logging/entry/101 │ ├─ /xyz/openbmc_project/logging/entry/102 │ ├─ /xyz/openbmc_project/logging/entry/103 ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I84968edeed0dcf73aaf8bb653060b6d3400b9b7b
show more ...
|
253bfb72 | 30-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: time: use gmtime for all operations
The test cases in `bcd_time_test.cpp` could fail if the executing host were not in UTC. By default the BMC uses UTC but the development systems a
openpower-pels: time: use gmtime for all operations
The test cases in `bcd_time_test.cpp` could fail if the executing host were not in UTC. By default the BMC uses UTC but the development systems are often in a user's local time zone. Switch all time operations to work off UTC by using gmtime/timegm instead of localtime/mktime.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6230fd014f44123fe917a8e2b39e3b903d3a05e8
show more ...
|
916bb97e | 26-Sep-2024 |
Arya K Padman <aryakpadman@gmail.com> |
PEL: Prohibit PEL resolving if associated guard record exists
The commit prohibits marking the 'Resolve' flag of the PEL as 'true' until the associated guard record resolved if one exists.The user w
PEL: Prohibit PEL resolving if associated guard record exists
The commit prohibits marking the 'Resolve' flag of the PEL as 'true' until the associated guard record resolved if one exists.The user will get notified with the same by throwing the DBUS error `sdbusplus::xyz::openbmc_project::Common::Error::Unavailable`.
Implemented approach: The PELs will be prohibited from deleting also if the PEL is associated with a guard record. Hence, implementation is like that resolve will be prohibited until delete does the same.
Tested: Sample output:
``` busctl set-property xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/406 xyz.openbmc_project.Logging.Entry Resolved b true
Failed to set property Resolved on interface xyz.openbmc_project.Logging.Entry: The service is temporarily unavailable. ``` Change-Id: I77cc191e95c494423d3c875c231fdace8237cf22 Signed-off-by: Arya K Padman<aryakpadman@gmail.com>
show more ...
|
66f3675d | 30-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: fru-identity: fix crash in setPartNumber
On newer libstdc++ implementations, the following backtrace is observed:
``` #2 0x00007ffff7a578b7 in abort () from /usr/lib64/libc.so.6
openpower-pels: fru-identity: fix crash in setPartNumber
On newer libstdc++ implementations, the following backtrace is observed:
``` #2 0x00007ffff7a578b7 in abort () from /usr/lib64/libc.so.6 #3 0x00007ffff7cda2af in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.so.6 #4 0x000055555556ac6f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::front (this=0x7fffffffd790) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:1315 #5 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::front (this=0x7fffffffd790) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:1315 #6 openpower::pels::src::FRUIdentity::setPartNumber (this=this@entry=0x7fffffffd8a0, partNumber="") at ../extensions/openpower-pels/fru_identity.cpp:216 #7 0x000055555556ae12 in openpower::pels::src::FRUIdentity::FRUIdentity (this=this@entry=0x7fffffffd8a0, partNumber="", ccin="", serialNumber="") at ../extensions/openpower-pels/fru_identity.cpp:102 #8 0x0000555555562aaf in testHWCallout (pn="", ccin="", sn="", expectedPN="", expectedCCIN="", expectedSN="") at ../test/openpower-pels/fru_identity_test.cpp:97 #9 0x00005555555645b0 in FRUIdentityTest_CreateHardwareCalloutTest_Test::TestBody (this=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.tcc:242 ```
Fix this by avoiding accessing `front()` when the part number string is empty. While there, do a minor performance optimization to avoid unnecessary string copies, by using `erase` instead of `substr`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I71cc195596def6ad0cd982e7294e2467beee987c
show more ...
|
70e8a11b | 24-Sep-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Update check for identifying I2C dev paths
Due to changes in the kernel, I2C device paths changed slightly and so the code that identifies if a device path passed in for a callout is for an I2C
PEL: Update check for identifying I2C dev paths
Due to changes in the kernel, I2C device paths changed slightly and so the code that identifies if a device path passed in for a callout is for an I2C device needs an update.
An example of a new canonical device path is: ``` /sys/devices/platform/ahb/1e780000.apb/1e780000.apb:bus@1e78a000/1e78a200.i2c/i2c-3/3-006d ```
Tested: Creating a PEL with CALLOUT_DEVICE_PATH=/sys/bus/i2c/devices/3-006d on an IBM Everest system generates a proper callout, as shown in this captured PEL debug UserData section:
``` "I2C: bus: 3 address: 109 dest: /sys-0/node-0/bellavista-0/Power-riser-conn-0/Fansipan-0/power-supply-conn-2/power-supply-0/power-supply-blackbox-0" ```
Change-Id: I4efb9135982f417560172df99dfe36f98e3a9696 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
b0ff05ab | 24-Sep-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Increase PLDM timeout
The current time the code waits for a PLDM response from PHYP before it considers it a timeout is ten seconds, after which it will retry sending the command again. Howeve
PEL: Increase PLDM timeout
The current time the code waits for a PLDM response from PHYP before it considers it a timeout is ten seconds, after which it will retry sending the command again. However, PHYP has two twenty second waits on its responses to the BMC PLDM daemon so ten seconds isn't long enough to know something failed.
There has been a case seen where it took the BMC PLDM code 12 seconds to handle the response from PHYP, in which case the PEL daemon thought it failed and re-sent a new file available command to PHYP for a PEL it already knew about.
The timeout value is being increased to 45 seconds, which is the 40 seconds for the PHYP wait plus some wiggle room.
Even if PHYP does time out trying to respond it does does already know about the PEL, so if we resend it will already have it, but I don't really see any alternatives, as the code can't be sure PHYP got it if it never responded.
Tested: PELs are sent to PHYP. It's rare to hit a case where there are timeouts, so putting this in place anyway.
Change-Id: I3f4ce422f292d8d54c36bd9cf051f776b837b983 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|