- Apr 27, 2024
-
-
Manojkiran Eda authored
OpenBMC as a project has moved away from using yocto x86 sdks for unit testing. Instead now the preferred way to build and test code is by two ways: 1. Leveraging the meson subproject support 2. Using openbmc docker container Since x86 sdks needed some weird hacks in the code base like figuring out the linker arguments ourselves & running custom bash commands from the meson build files. Also with changing yocto code base, its a large maintainer burden to make sure this support works. Tested: Code builds & unit tests are passed with both the approaches mentioned above. Change-Id: Iaf55e2c003ffd9ee1a295de5bdfd14d81222e94b Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 25, 2024
-
-
Manojkiran Eda authored
It was reported that, there is an inaccurate check in host_pdr_handler code that could lead to an unbound access of an array resulting in pldm crash. This commit aims at fixing it. Resolves openbmc/pldm/#36 Change-Id: I1bba25f5b1cad55a30ce956f83b8c15b93149219 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 24, 2024
-
-
Manojkiran Eda authored
OpenBMC CI has migrated from using `pycodestyle` to `flake8` as part of this[1] commit. Unlike `pycodestyle` , `flake8` does not rely on the presence of setup.cfg file in their root path as a trigger, but it runs on all repositories by default. Hence there is no need of having setup.cfg file, so removing it from the repository. [1]: https://github.com/openbmc/openbmc-build-scripts/commit/c5ad7ff440cfd94fc025efbd45a3859475b18820 Change-Id: I8e648f3230d1f2a83b620978b36bda88aba7ebc0 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
Manojkiran Eda authored
This patchset is improved version of the existing code for several reasons: 1.The code is more concise and easier to read. It uses modern C++ features such as `std::ranges::for_each` and `std::format`, which express the intent of the code more clearly compared to the nested if-else statements and manual formatting. 2.The code now has fewer lines of code and avoids the need for creating and managing an `std::ostringstream` object manually, which simplifies the function and reduces the risk of errors. 3.This patch uses type-safe range-based for loop and `uint8_t` type directly, whereas the existing code uses `int` for iterating over the buffer elements, which may lead to unintentional type conversions or loss of precision. 4.While the performance impact may not be significant for this patch, using `std::ranges::for_each` with lambdas might allow for more optimization opportunities by the compiler compared to the traditional loop used in existing code. Overall, this patchset leverages modern C++ features to achieve the same functionality in a more concise, readable, and type-safe manner, making it preferable. Change-Id: I7be547ade053638cb4ca459ee795195f6f0883bf Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
DelphineCCChiu authored
Initialize "totalNumComponentUpdates" and "compUpdateCompletedCount" to 0 to avoid potential errors caused by uninitialized variables. Change-Id: I27f57330e77f98109a09b3270a3dd6fd50e8fb52 Signed-off-by:
DelphineCCChiu <delphine_cc_chiu@wiwynn.com>
-
Manojkiran Eda authored
cppcheck flags style warnings to indicate when we declare a variable and never use it. Its effective dead code, this patch aims at fixing all the [unusedVariable] warnings reported by the openbmc repo-ci. Change-Id: Ie51176c6b2ced7251b467b2d456e9f3088637121 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 23, 2024
-
-
Manojkiran Eda authored
This commit fixes odd looking inconsistent spacing while tracing the BIOS attribute updates. Change-Id: Ib9dba3ca28e86ac64d67fe2b7ef5e3f66ce971b5 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 22, 2024
-
-
Manojkiran Eda authored
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>
-
- Apr 17, 2024
-
-
Archana Kakani authored
Below are the, System specific bios attribute infrastructure commits Commit - https://gerrit.openbmc.org/c/openbmc/pldm/+/55997 - https://gerrit.openbmc.org/c/openbmc/pldm/+/68451 Adding BIOS Attribute files for system types mentioned below 1. Rainier-1s4u 2. Rainier-2u 3. Rainier-4u 4. Everest 5. Bonnell Change-Id: I209dcff347cf83322857a2ac23353269f23217f3 Signed-off-by:
Archana Kakani <archana.kakani@ibm.com>
-
Manojkiran Eda authored
This reverts commit d28f08cf. Reason for revert : Pel severity is completely openpower-specific , we should not polluting common code with IBM specific things, hence reverting this change for now. Change-Id: If11721b1522097460ba07d51335b7ebbe821311a Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 16, 2024
-
-
Pavithra Barithaya authored
Declaring the const-ness of a parameter is just another form of type safety. The benefit of const correctness is that it prevents you from inadvertently modifying something you didn’t expect would be modified. The commit fixes places in the code where a parameter could be a constant. Change-Id: Ie6f1d4b37373979a3efef8cb617294d41dec888c Signed-off-by:
Pavithra Barithaya <pavithrabarithaya07@gmail.com>
-
- Apr 15, 2024
-
-
Archana Kakani authored
PLDM users who want to use bios attributes based on the system type can enable this meson option. With disabled option default bios json files are picked to build bios attribute tables. Added meson option "system-specific-bios-json" to add the support for system specific bios attributes. Below is the pre-requisite to support system specific bios attributes: 1. Entity Manager service is active 2. Entity Manager should have Decorator.Compatible interface and system type in Names property under this interface 3. BIOS Attribute json files are added into the folder(Named on the System Type property value) and should be installed under /usr/share/pldm/bios/ With disabled "system-specific-bios-json" option default bios attributes are populated. Tested: Poweron system-specific-bios-json enabled/disabled Change-Id: I95a953cdb12c344d22f487b83040356a1b5fa937 Signed-off-by:
Archana Kakani <archana.kakani@ibm.com>
-
Archana Kakani authored
This is the infrastructure commit to support PCIe Topology PCIe topology refers to the physical arrangement of PCIe devices within the system. Topology data contains links connecting PCIe device to the PCIe Controller. This commit adds support for PCIe Topology and Cable information filetype. Topology information is provided by host using FILIO mechanism. This commit adds support for handling 1. Topology file(PLDM_FILE_TYPE_PCIE_TOPOLOGY) 2. Cable information file(PLDM_FILE_TYPE_CABLE_INFO) Tested: Updated Unit test and tested power on. Change-Id: Ic77f4f9921dd855c61c3929b5a458d80b1691b48 Signed-off-by:
Archana Kakani <archana.kakani@ibm.com>
-
Archana Kakani authored
Entity manager service hosts the compatible interface and populates the Names property with the chassis type. It is seen that the Names property is updated pretty late on the way to BMC ready state. And by that time pldmd is already creating the bios table assuming that the system type is not detected. To fix this behavior, rather than creating the bios table early, we need to wait until we get the system type from the entity manager daemon. System Type is fetched from Entity Manager Decorator.Compatible interface [1]. PLDM registers the service name only after building the BIOS tables, to avoids failures to bios updates from other applications Tested: Power off/On successfully in Simulator [1] https://github.com/openbmc/entity-manager/commit/9bac6409d4bd684f058517f41de33ba1d17e5666 Change-Id: I4d431061eaaf8842f6382c2e83807f725653e19b Signed-off-by:
Archana Kakani <archana.kakani@ibm.com>
-
Zach Clark authored
This commit updates the pldm-softpoweroff application so that it can properly locate the PLDM effecter and sensor PDRs for the graceful poweroff request. It also updates the host terminus ID to the correct value. Tested by: Running the application when Hostboot was IPLing, and also when PHYP was at standby. root@ever39bmc:~# /tmp/pldm-softpoweroff Getting the response. PLDM RC = 0 Timer started waiting for host soft off, TIMEOUT_IN_SEC = 0x1c20 root@ever39bmc:~# echo $? 0 Signed-off-by:
Zach Clark <zach@ibm.com> Change-Id: I7408611881abecfb5169816af032e2fb9d3a8a09
-
Sagar Srinivas authored
This commit introduces a config file for the soft power off app. The config file specifies the order of remote PDRs to be checked during the soft power off process. Previously, the entity type was hardcoded in the codebase, limiting scalability. With this change, the softoff app gains flexibility for future expansions. TESTED: By running 'obmcutil poweroff' with various remote entities during boot-up. Signed-off-by:
Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: Ib8d2aba6a05fc4e9da4b042fd67890e6282ed784
-
- Apr 14, 2024
-
-
Patrick Williams authored
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 Change-Id: Id9161c24e5ed91f7194d6d536a29ecda02e8dc84 Signed-off-by:
Patrick Williams <patrick@stwcx.xyz>
-
- Apr 13, 2024
-
-
Riya Dixit authored
This commit implements functionality to retrieve the managed object of a specific DBUS service on a particular path. Additionally implements a function template for inventory objects which efficiently enables retrieval of managed object for Inventory Manager. Tested: Added unit test cases for checking the return value. Change-Id: Ide652f843db1623bdacebf3e269e03895bbb7f1a Signed-off-by:
Riya Dixit <riyadixitagra@gmail.com>
-
- Apr 12, 2024
-
-
Thu Nguyen authored
`pldmTransport.recvMsg` in `pldmd` will call `pldm_transport_af_mctp_recv` in libpldm. This function allocates memory of `requestMsg` and copy the MCTP request message data to `requestMsg`. `pldmd` should free memory of requestMsg after using. Tested: 1. Check the memory usage of `pldmd`. There is no memory leak. Signed-off-by:
Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ie9270509e60790618c1a399fa3c9bf34f6f54907
-
- Apr 10, 2024
-
-
Pavithra Barithaya authored
This clang error is generated when the value stored to a variable is never read in the code. Change-Id: Ib68741b3aaf8856010d0073675abc2fdb3012712 Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Manojkiran Eda authored
It seems that we are trying to convert file objects to strings which is considered as a misfeature since it does not work reliably. This is the warning that is seen while building pldm: ``` WARNING: Broken features used: * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'} ``` Tested: Rebuild pldm repository with the fix and it builds pldm without the mentioned warning above. Change-Id: If8fedf488d33de6dccc2c1b45c2bfe124fbc3384 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Apr 02, 2024
-
-
Pavithra Barithaya authored
Severity is part of the PEL User Header section, and is used to specify the PEL severity. This commit adds an option to pass severity parameter while logging PEL. This will help to classify PELs based on their severity. The commit also maintains uniformity in the PEL Error logged. Tested: By creating the error logs(pel) in error scenarios. Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com> Change-Id: Ic084d49b8ffe9aaea2c36c9fefa95a10a9c1c3ec
-
Sagar Srinivas authored
This commit replaces occurrences of 'find' with 'contains' to access elements in a std::map according to the latest C++ standard (since C++20). However, contains() is not suitable in all situations as in the case where we want to use the element contained in the map using contains(), then it would do 2 searches instead of 1 in the case where we use find() which fetches the element from the map also. Here are some relevant links to C++ documentation and resources: [1]: https://en.cppreference.com/w/cpp/container/map/find [2]: https://en.cppreference.com/w/cpp/container/map/contains [3]: https://wg21.link/N4861 Signed-off-by:
Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: If589e52026417c1c14a6a946e48826b749034e9a
-
Pavithra Barithaya authored
This commit sets the PCIE config space data sent from host with a prefix '0x' and the hex value. This change was needed as the Redfish validator [1] expects the fields to be in a particular Regex form otherwise it fails to validate. Tested: Ran a Redfish Validator against the changes. Result: Before this change: ERROR - VendorId: String '5348' does not match pattern ''^0[xX](([a-fA-F]|[0-9]){2}){2}$'' ERROR - DeviceId: String '5719' does not match pattern ''^0[xX](([a-fA-F]|[0-9]){2}){2}$'' ..... After this change : Successfully passed [1] https://www.dmtf.org/sites/default/files/standards/documents/ DSP0268_2022.2.pdf Change-Id: I2b1d34532e94b84b34577cb2d1d7f5b955633bf6 Signed-off-by:
Pavithra Barithaya <pavithrabarithaya07@gmail.com>
-
- Mar 29, 2024
-
-
nothingIIersonal authored
Added GetSensorReading command to get the current sensor value and its state. Tested results: ``` root@bmc:~# pldmtool platform getSensorReading -h get the numeric sensor reading Usage: pldmtool platform GetSensorReading [OPTIONS] Options: -h,--help Print this help message and exit -m,--mctp_eid UINT MCTP endpoint ID -v,--verbose -n,--retry-count UINT Number of retry when PLDM request message is failed -i,--sensor_id UINT REQUIRED Sensor ID that is used to identify and access the sensor -r,--rearm UINT REQUIRED Manually re-arm EventState after responding to this request root@bmc:~# pldmtool platform getSensorReading -m9 -r0 -i300 { "sensorDataSize": "uint8", "sensorOperationalState": "Sensor Enabled", "sensorEventMessageEnable": "Sensor Events Enabled", "presentState": "Sensor Normal", "previousState": "Sensor Unknown", "eventState": "Sensor Normal", "presentReading": 38 } ``` Change-Id: I83a111eef73ee20a06c699405a9cdf1f848dd66a Signed-off-by:
Ruslan Magomedov <velochimc@mail.ru>
-
- Mar 26, 2024
-
-
Manojkiran Eda authored
Previously, the sensor events generated by the PLDM stack only included the current state of the sensor without any reference to the previous state. This commit introduces a new feature to address this limitation by caching the previous states of all sensors. The enhancement ensures that platform event messages(sensor events) now contain the correct previous state information alongside the current state. Behavior Model: 1. Upon the initial occurrence of a sensor event, both the current state and the previous state are identical, adhering to the specification. 2. Subsequently, when the PLDM stack sends out sensor events, it retrieves the previous state from its cache and populates it accordingly. Testing: 1. Example: Change the value of a sensor, such as dimm8 identify, to false using busctl. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 01 ] - Note: Initially, both the event state and the previous state are 01. 2. Change the value of dimm8 identify to true. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 02 01 ] - Result: Event state: 02, Previous state: 01. 3. Change the value of dimm8 identify back to false. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 02 ] - Result: Event state: 01, Previous state: 02. 4. Similar results can be obtained using the getStateSensorReadings command for the same sensor at respective times. Change-Id: Ic93a55e61fd5128cecc698b3555a6639876882ed Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Mar 12, 2024
-
-
Pavithra Barithaya authored
I have been actively contributing to OpenBMC/PLDM for quite some time now. Attached is a summary of my contributions to the repository [1]. I would like to learn and help out on pldm reviews. [1]: https://github.com/openbmc/pldm/commits?author=Pavithrab7 Change-Id: I374c55f7e01a7648010c2964b3cd60d5deb0ef57 Signed-off-by:
Pavithra Barithaya <pavithrabarithaya07@gmail.com>
-
- Mar 11, 2024
-
-
Pavithra Barithaya authored
This commit adds a common function to set the present property to true for all the present FRUs. Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com> Change-Id: Ia218f0de7883ff399e9dec60f03d88c27afed3e9
-
- Mar 06, 2024
-
-
Pavithra Barithaya authored
An “Update Access Key” (UAK) is checked when applying system firmware updates. Entitled updates are applied if the embedded expiration date of the UAK is later than the firmware release date. Host provides us the Firmware User Access Key (FW UAK) Date to BMC in the genesis boot as it will have license information and only Host has the knowledge of it. Also the BMC can use this value even when host is not running. The commit implements the support for access key update in PLDM. The host sends a setFruRecordTable command with the value to be updated. PLDM uses the WriteKeyword method [1] since that will update both the D-Bus cache and the VPD backplane. [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/com/ibm/VPD/Manager.interface.yaml Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com> Change-Id: Ib089787db3a3c42eedb833852dc48b8fa87be7e4
-
- Mar 05, 2024
-
-
Sampa Misra authored
The major difference between the standard FRUs and the IBM specific FRUs is the format in which the VPD data is written and its model type. If the model property is filled it is a IBM specific FRU, if not then that can be an industry standard FRU. Change-Id: I9c01b99e37107bc3caeb88336626bc9e514e78f0 Signed-off-by:
Sampa Misra <sampmisr@in.ibm.com>
-
- Feb 28, 2024
-
-
Manojkiran Eda authored
In its present condition, the instance database gets initialized within the hostSoftOff function. Consequently, once the function execution is complete, the database goes out of scope, triggering the invocation of the instanceDb destructor. This, in turn, prematurely destroys the instance database in the middle of the softpoweroff flow, resulting in a double free corruption. Tested: After implementing the fix, softoff was tested to ensure it does not crash. Change-Id: I251201b06864a8a5273bfaa23468a06ad678763a Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
Sagar Srinivas authored
Infrastructure commit- https://gerrit.openbmc.org/c/openbmc/pldm/+/69548 This commit would add similar change for oem sensor json too. TESTED: with pldmtool raw commands sending sensor events to the BMC. Signed-off-by:
Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: I82bc849195fa3b65d6afb353c852aada163bba46
-
- Feb 26, 2024
-
-
Manojkiran Eda authored
I appreciate the contributions made by @Sampa to the OpenBMC project. However, I haven't seen any active involvement from her since 2021. While it's understandable that priorities may shift, I want to express gratitude for her past contributions. Thank you Sampa, for your past efforts. Change-Id: I91c6ba7553753dfbc0c31b42b1553f3942bc3ffa Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Feb 23, 2024
-
-
Kamalkumar Patel authored
This update resolves a crash occurring in pldm when attempting to retrieve the system type from the entity manager service. The issue is resolved by implementing exception handling for potential errors during the dbus call. Testing: Tested in simulator and pldm is working fine without crash. Change-Id: I6dae2c6b5a5001b801f02d359a48acb497ad7323 Signed-off-by:
Kamalkumar Patel <kamalkumar.patel@ibm.com>
-
Sagar Srinivas authored
With the adoption of LG2 we do not need iostream prints to the journal. The library was referred but never used in these cases. Signed-off-by:
Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: I11d3f00284e4f16b63cddb8da2fed14d59672ba1
-
- Feb 22, 2024
-
-
Sagar Srinivas authored
In the current state, PLDM does not support having a state set ID field in the event JSONs, this commit would add that support in PLDM there by allowing hosts to have multiple sensors with the same entity instance number, type and container id, but with different state sets. TESTED: with pldmtool raw commands sending sensor events to the BMC. Signed-off-by:
Sagar Srinivas <sagar.srinivas@ibm.com> Change-Id: If9bb9bde27d6b35f5904ac199801dbdffde0f57e
-
Manojkiran Eda authored
In the current state, we attempt to create an effecter PDR even if the D-Bus object that is being modeled as an effecter is absent at the time of creation. However, this behavior may not be beneficial, as assuming that the D-Bus backend will magically appear later does not necessarily mean that we will be able to process it, we only process the JSON files during the first getPDR request. Therefore, it would be more efficient to skip creating the effecter in the absence of the D-Bus object. This commit also addresses an error trace by including the dbus object path when it is not present on the system, rather than the opaque effecter id number which does not provide contextual information and may make it harder to diagnose issues. Change-Id: I84239c75684f611b7985df027a93ba4531f783d0 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
Manojkiran Eda authored
In the current state, we attempt to create a sensor PDR even if the D-Bus object that is being modeled as a sensor is absent at the time of creation. However, this behavior may not be beneficial, as assuming that the D-Bus backend will magically appear later does not necessarily mean that we will be able to process it and send sensor events, since we only process the JSON files only during the first getPDR request. Therefore, it would be more efficient to skip creating a sensor during the absence of the D-Bus object. This commit also addresses an error trace by including the dbus object path when it is not present on the system, rather than the opaque sensor id number which does not provide contextual information and may make it harder to diagnose issues. Change-Id: I5747319f15c212ab6654b9d7accfce28782c9565 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Feb 19, 2024
-
-
Pavithra Barithaya authored
The commit implements the setFruRecordTable command and also updates the DBus property for the IBM cable cards for which the host sends a setFruRecordTable command. Tested: using pldmtool Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com> Change-Id: I70e4f85f627577d8ca1bc90447b10e9e2e8e7ccd
-
Kamalkumar Patel authored
- There are some of the listed paths below which don't have "Present" property. Due to this, the FRU present property check was throwing "Resource not found" error which misguides the user. - The commit adds support to fix this misguiding error trace. Paths: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_1 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_1 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_1 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_1 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_1 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_0 /xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_1 Change-Id: I5a8fae3a5dbae428f14ccc90aeba8319a48c11b2 Signed-off-by:
Kamalkumar Patel <kamalkumar.patel@ibm.com>
-