d0ba43af | 09-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
clang-tidy: Enable cppcoreguidelines-pro-type-reinterpret-cast
There are ways to avoid reinterpret_cast<>() in many circumstances. For libpldm, often its use can be replaced with placement-new. Enab
clang-tidy: Enable cppcoreguidelines-pro-type-reinterpret-cast
There are ways to avoid reinterpret_cast<>() in many circumstances. For libpldm, often its use can be replaced with placement-new. Enable the lint for reinterpret_cast<>() to prevent its use in future changes. This way we can stay inside the language rather than rely on implementation-defined behavior.
Existing uses of reinterpret_cast<>() are marked NOLINT for now, with the intent that we clean them up over time. The insertion of the NOLINTs was automated with sed.
Change-Id: If6654f774e438de9262fe9f9012c6b574764c326 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
7a3c14ec | 08-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
base: Add size and buffer macros for struct pldm_msg
Give library users a supported way to allocate pldm_msg buffers on the stack.
A demonstration conversion is done in tests/oem/ibm/host.cpp.
Cha
base: Add size and buffer macros for struct pldm_msg
Give library users a supported way to allocate pldm_msg buffers on the stack.
A demonstration conversion is done in tests/oem/ibm/host.cpp.
Change-Id: I71158bd6b062c6e6522dc4a4cdcb089a139cd841 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
e984a461 | 07-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Format build files with `meson format`
Additionally, add the formatting command to `scripts/pre-submit` so it's run by OpenBMC's CI (via `scripts/run-ci`).
Change-Id: Ifb8fc06106b8cfa9155e98
meson: Format build files with `meson format`
Additionally, add the formatting command to `scripts/pre-submit` so it's run by OpenBMC's CI (via `scripts/run-ci`).
Change-Id: Ifb8fc06106b8cfa9155e986528b769a5ca450b4c Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
48761c62 | 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into 'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of both src/ and tests/
libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into 'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of both src/ and tests/.
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP4014_2.14.0.pdf
libpldm is a concrete C implementation of the PLDM family of specifications. This invokes some accidental complexity[2] such as the msgbuf APIs and other concerns.
[2]: https://en.wikipedia.org/wiki/No_Silver_Bullet
Separate the essential complexity (everything under the dsp/ subdirectories) from the accidental complexity (almost everything else).
While doing so, I took the opportunity to drop the 'libpldm_' prefix and '_test' suffix from a variety of tests. The 'libpldm_' prefix is a hangover from the days when libpldm was a subproject of OpenBMC's pldm repo. The '_test' suffix feels redundant given the parent directory path.
Note that we maintain separation of the src/ and tests/. The test suite is implemented in C++ while libpldm's APIs are declared and defined in C. The ability to chop all the tests and C++ out of the implementation by ignoring a subtree seems like a desirable property when vendoring the library into other projects.
Finally, update the x86_64 GCC ABI dump, as rearranging the source causes a lot of churn in its definitions.
Change-Id: Icffcc6cf48b3101ecd38168827c0a81cffb8f083 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d480b704 | 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
tests: meson: Push build configuration down to leaf directories
I feel this keeps things a bit more self-contained.
Change-Id: I68de6e4b0269d64b620b6c339825113e31074b4c Signed-off-by: Andrew Jeffer
tests: meson: Push build configuration down to leaf directories
I feel this keeps things a bit more self-contained.
Change-Id: I68de6e4b0269d64b620b6c339825113e31074b4c Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
dc7d3b5b | 06-Feb-2024 |
Pavithra Barithaya <pavithra.b@ibm.com> |
libpldm: Change hexadecimal literals to lowercase
As per a comment at [1].
The change was generated with the following:
``` sed -Ei 's/0[xX]([0-9]*[A-F][0-9]*)+/\L\0/g' $(git ls-files) ```
[1]: h
libpldm: Change hexadecimal literals to lowercase
As per a comment at [1].
The change was generated with the following:
``` sed -Ei 's/0[xX]([0-9]*[A-F][0-9]*)+/\L\0/g' $(git ls-files) ```
[1]: https://gerrit.openbmc.org/c/openbmc/libpldm/+/69192
Change-Id: Ib0a41dfaf626aec3167e773262883f9c1de797b2 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
a7989cd6 | 30-Oct-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
meson: Fix for OEM header collision issue
It needs to be possible to build libpldm with any number of oem features enabled simultaneously. If the header files are same then the earlier implementatio
meson: Fix for OEM header collision issue
It needs to be possible to build libpldm with any number of oem features enabled simultaneously. If the header files are same then the earlier implementation will not work.
Install the header file in a way that doesn't break any oem portions. Also the symlinks are generated to the older location until we migrate the applications using the files to new location.
Tested: The headers are installed in the new location and symlinks are generated.
Change-Id: I1455d52ff4b0c7f74b49d136bf582182537592d1 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
b0c1d20a | 07-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Fix header use
The headers need to work whether we're building libpldm in the repo or we're building another project depending on the headers in the system include directory.
Tidy up the p
libpldm: Fix header use
The headers need to work whether we're building libpldm in the repo or we're building another project depending on the headers in the system include directory.
Tidy up the paths involved and switch to defining the public headers as system headers for the purpose of the build.
Change-Id: I49413988c94d393ea5761bc4684edcd2c2482a98 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
5a706073 | 05-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
clang-tidy: Fix modernize-deprecated-headers diagnostic
For example:
``` /mnt/host/andrew/src/openbmc/libpldm/build/../tests/libpldm_bios_test.cpp:2:10: error: inclusion of deprecated C++ header 's
clang-tidy: Fix modernize-deprecated-headers diagnostic
For example:
``` /mnt/host/andrew/src/openbmc/libpldm/build/../tests/libpldm_bios_test.cpp:2:10: error: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [modernize-deprecated-headers,-warnings-as-errors] ^~~~~~~~~~ <cstdint> ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ifebba7d7c21cc60a389a8783361fc23226135ee0
show more ...
|
9a8e4975 | 28-Nov-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix includes using iwyu tool
These changes are done by running iwyu manually under clang14.
IWYU can increase readability, make maintenance easier, and avoid errors in some cases. See details in ``
Fix includes using iwyu tool
These changes are done by running iwyu manually under clang14.
IWYU can increase readability, make maintenance easier, and avoid errors in some cases. See details in ``` https: //github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md. ``` Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Idaaeffd78c9ad7db2b41a057d40f889ade297c55
show more ...
|
9c766792 | 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 ...
|