dacfa354 | 22-Jun-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
pdr: Add related decode_entity_auxiliary_names_pdr*() APIs
Add `decode_entity_auxiliary_names_pdr()` to decode the entity auxiliary names PDR raw data to the data fields as table 95 in DSP0248_1.2.2
pdr: Add related decode_entity_auxiliary_names_pdr*() APIs
Add `decode_entity_auxiliary_names_pdr()` to decode the entity auxiliary names PDR raw data to the data fields as table 95 in DSP0248_1.2.2. The API will not decode the entity auxiliary names directly - to expose the language tags and names fields the caller has to subsequently call `decode_pldm_entity_auxiliary_names_pdr_index()`. Between the API calls the caller must allocate memory for the `names` field as an array of `struct pldm_entity_auxiliary_name` with `name_string_count` elements.
Change-Id: I5fc3989c4c4595546a70c01eb2b6dadcf8c14303 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
56f73f95 | 07-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
msgbuf: Add pldm_msgbuf_copy_string_utf16()
Safely copy a NUL-terminated UTF16-{BE,LE} string between msgbuf instances.
Change-Id: If96df9598f17ac771d75f0831be270c5e0139578 Signed-off-by: Andrew Je
msgbuf: Add pldm_msgbuf_copy_string_utf16()
Safely copy a NUL-terminated UTF16-{BE,LE} string between msgbuf instances.
Change-Id: If96df9598f17ac771d75f0831be270c5e0139578 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
1523778d | 02-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
msgbuf: Add pldm_msgbuf_span_string_utf16()
Add pldm_msgbuf_span_string_utf16 API to return the start pointer of the utf16 string in message buffer. The API also returns the UTF16 string length in t
msgbuf: Add pldm_msgbuf_span_string_utf16()
Add pldm_msgbuf_span_string_utf16 API to return the start pointer of the utf16 string in message buffer. The API also returns the UTF16 string length in terms of bytes, including the NUL terminator.
``` __attribute__((always_inline)) static inline int pldm_msgbuf_span_string_utf16(struct pldm_msgbuf *ctx, void **cursor, size_t *length) ```
The `cursor` and `length` are optional. Input NULL to `cursor` and `length` will cause the message buffer cursor points to remaining data. The caller can ignore `length` option by input NULL if they don't care about the size of utf16 string.
Change-Id: I1fc2865a21d9925e49416531b85212b3b07dc37a Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
8b879600 | 07-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
msgbuf: Add pldm_msgbuf_copy_string_ascii()
Safely copy a NUL-terminated string between msgbuf instances.
Change-Id: I224dc3f5bbd55fd9d4727ab0de065d5253ee0bea Signed-off-by: Andrew Jeffery <andrew@
msgbuf: Add pldm_msgbuf_copy_string_ascii()
Safely copy a NUL-terminated string between msgbuf instances.
Change-Id: I224dc3f5bbd55fd9d4727ab0de065d5253ee0bea Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
9c83d681 | 02-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
msgbuf: Add pldm_msgbuf_span_string_ascii()
Add pldm_msgbuf_span_string_ascii() API to find the start of the ascii string in the message buffer.
``` pldm_msgbuf_span_string_ascii(struct pldm_msgbuf
msgbuf: Add pldm_msgbuf_span_string_ascii()
Add pldm_msgbuf_span_string_ascii() API to find the start of the ascii string in the message buffer.
``` pldm_msgbuf_span_string_ascii(struct pldm_msgbuf *ctx, void **cursor, size_t *length) ```
The API returns the start pointer of ascii string in the message buffer and length of that ascii string includes Terminator. The `cursor` and `length` are optional. Input NULL to `cursor` and `length` will cause the message buffer cursor points to remaining data. The caller can ignore `length` option by input NULL if they don't care about the size of ascii string.
Change-Id: I4a73b7425ee1e4e5621eb16de6e16189efdf202b Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
1c57144d | 07-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
msgbuf: Generalize array extraction and insertion
Build the type-safe and generic behavior on top of memcpy() via a "private" helper that takes a void pointer.
Change-Id: Iedb8e9237c780735d4cac41fe
msgbuf: Generalize array extraction and insertion
Build the type-safe and generic behavior on top of memcpy() via a "private" helper that takes a void pointer.
Change-Id: Iedb8e9237c780735d4cac41fe0a723c3751c64ce Signed-off-by: Chris Wang <chris.wang.wiwynn@gmail.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
274732fc | 05-Jul-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
pdr: Add pldm_pdr_get_terminus_handle() API
Adds a new libpldm API to get the terminus handle of the particular record given as input from the PDR repo.
Change-Id: I3694cc3974a564296f4584b70de7d6d1
pdr: Add pldm_pdr_get_terminus_handle() API
Adds a new libpldm API to get the terminus handle of the particular record given as input from the PDR repo.
Change-Id: I3694cc3974a564296f4584b70de7d6d1dad2a866 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
e5469f54 | 06-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform: Define macros for the responded transferflags
`Table 16: PollForPlatformEventMessage command format` and `Table 68: GetPDR command format` in DSP0248 v1.2.2 define the values of the respon
platform: Define macros for the responded transferflags
`Table 16: PollForPlatformEventMessage command format` and `Table 68: GetPDR command format` in DSP0248 v1.2.2 define the values of the responded `transferflag` for PLDM platform and control commands. Add the definition for further using.
Change-Id: Ibd97918a7a5add10dbb5db7c044c71daa5bbaa4e Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
b02e0e11 | 05-Jun-2024 |
Varsha Kaverappa <vkaverap@in.ibm.com> |
changelog: Add entry for entity association PDR API
Log entry for new APIs introduced to add a contained entity into an entity association PDR as a new change.
Change-Id: I2f8510ecaab97ae68de53c54d
changelog: Add entry for entity association PDR API
Log entry for new APIs introduced to add a contained entity into an entity association PDR as a new change.
Change-Id: I2f8510ecaab97ae68de53c54d295f55c43cef952 Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>
show more ...
|
4d1b1a54 | 02-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
docs: checklists: Add some more influences and references
Introduce "weird machines" for those who aren't aware of them. The blog also links to Dullien's paper that provides fairly tight definition
docs: checklists: Add some more influences and references
Introduce "weird machines" for those who aren't aware of them. The blog also links to Dullien's paper that provides fairly tight definition for them.
The SEI CERT C Coding Standard is maintained by members of the C standards committee as a more approachable resource for C programmers than the standard itself (which is written for implementers of C more so than users).
Change-Id: I6df09feacd47c0eea42b840784ab2c90a913fcff Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
e4240679 | 28-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
requester: instance-id: Release read lock on conflict
36af84cdbb66 ("requester: Add new APIs for instance ID allocation and freeing") introduced the new instance ID allocation APIs, and some unbalan
requester: instance-id: Release read lock on conflict
36af84cdbb66 ("requester: Add new APIs for instance ID allocation and freeing") introduced the new instance ID allocation APIs, and some unbalanced locking along with it. When a conflict arose on an instance ID, the read lock was not released by the non-owning caller.
Release the lock on conflict and on error, and add a test case to prevent regression.
gitlint-ignore: UC1, B1 Fixes: 36af84cdbb66 ("requester: Add new APIs for instance ID allocation and freeing") Reported-by: Jerry Chen <jerry_c_chen@wiwynn.com> Change-Id: Iecd1583c6b8863b458cc4fbf1ac42b20ca2a3433 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
a1efaa2e | 19-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
include: Drop compat symlinks for IBM OEM headers
These symlinks have been in-place long enough for people to migrate. Provide a coccinelle semantic patch to help anyone who hasn't.
Change-Id: Iab4
include: Drop compat symlinks for IBM OEM headers
These symlinks have been in-place long enough for people to migrate. Provide a coccinelle semantic patch to help anyone who hasn't.
Change-Id: Iab456ebba8d87c57eb2d573b7a8bffb394e0bb00 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
9e3a5d45 | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I25415165df192cfc3bd1405aca81bfa5bf2f7a63 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
d9b70ba7 | 08-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: fru: Rename get_fru_record_by_option_check()
We drop the `_check` suffix so that it is now `get_fru_record_by_option()`.
To do so, introduce some infrastructure that makes renaming APIs easier
dsp: fru: Rename get_fru_record_by_option_check()
We drop the `_check` suffix so that it is now `get_fru_record_by_option()`.
To do so, introduce some infrastructure that makes renaming APIs easier and scripts the migration for users. The renaming process comes in several parts, which are captured in the addition to the changes checklist.
The coccinelle script based off the insight at [1].
[1]: https://stackoverflow.com/questions/42776220/coccinelle-help-to-replace-a-function-with-variable-args
Change-Id: I730b76c3e3c92dcc046fecbee76cd6b040f11d21 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
0ee03b5b | 11-Jun-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
base: Define macros for reserved TIDs
Move the definition of `PLDM_TID_RESERVED` from platform.h to base.h as the value is defined in the base specification (DSP0240). platform.h already includes ba
base: Define macros for reserved TIDs
Move the definition of `PLDM_TID_RESERVED` from platform.h to base.h as the value is defined in the base specification (DSP0240). platform.h already includes base.h so the move is not an API-breaking change.
Further, add the definition for `PLDM_TID_UNASSIGNED`, which is the other reserved TID value.
Change-Id: I191bee73e091a4b0e83c4bffcee38bff3c88ed96 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
de67ab62 | 30-May-2024 |
Tal Yacobi <talycb8@gmail.com> |
platform: Stabilise GetStateEffecterStates functions
See usage example at: https://gerrit.openbmc.org/c/openbmc/pldm/+/71657
Change-Id: I8ef0961dbc8e87fb4ca8533142104b852a7fb0a4 Signed-off-by: Tal
platform: Stabilise GetStateEffecterStates functions
See usage example at: https://gerrit.openbmc.org/c/openbmc/pldm/+/71657
Change-Id: I8ef0961dbc8e87fb4ca8533142104b852a7fb0a4 Signed-off-by: Tal Yacobi <talycb8@gmail.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
f490a38f | 31-May-2024 |
Tal Yacobi <talycb8@gmail.com> |
platform: Change GetStateEffecterStates API error personality
APIs should return negative errno instead of PLDM completion codes.
Change-Id: Ic7017ecc02f3d969aa8fd5c6b1fa89dced484ab1 Signed-off-by:
platform: Change GetStateEffecterStates API error personality
APIs should return negative errno instead of PLDM completion codes.
Change-Id: Ic7017ecc02f3d969aa8fd5c6b1fa89dced484ab1 Signed-off-by: Tal Yacobi <talycb8@gmail.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d861a681 | 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: base: Rework {un,}pack_pldm_header() error handling
The current preference is that library APIs return negative errno values to signal implementation errors. That doesn't jive with existing sta
dsp: base: Rework {un,}pack_pldm_header() error handling
The current preference is that library APIs return negative errno values to signal implementation errors. That doesn't jive with existing stable APIs returning PLDM completion codes, so provide a means to translate between the two.
The first users are the {un,}pack_pldm_header() functions.
Change-Id: I7b7cb97a1d8b96ec0fec1c0a5fbd8503da834d86 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 ...
|
aa16a0d9 | 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Only require C++ if tests are enabled
C++ is only required for the tests as they are implemented using gtest. Don't require a C++ compiler if the tests are disabled.
Change-Id: I660aed484139
meson: Only require C++ if tests are enabled
C++ is only required for the tests as they are implemented using gtest. Don't require a C++ compiler if the tests are disabled.
Change-Id: I660aed484139d6d7d547ce774b5843a272eff9af 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 ...
|
9ca76701 | 02-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
tests: meson: Add note about guarding the transport tests
The transport tests rely on a 'test' transport implementation that will never be marked as stable.
Change-Id: Ib7766c25a435d1bd27f13d45a500
tests: meson: Add note about guarding the transport tests
The transport tests rely on a 'test' transport implementation that will never be marked as stable.
Change-Id: Ib7766c25a435d1bd27f13d45a50018806b225cae Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
44925df8 | 02-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
tests: meson: Sort tests alphabetically
Try to maintain some sense of coherence.
Change-Id: I14b7d8a07a65670e632c03f8532ec48229806a45 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> |
1b1b728b | 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
scripts: Add pre-submit
pre-submit runs through the pre-submission commands outlined in docs/ checklists/changes.md. This allows easy checking via:
``` $ git rebase -x ./scripts/pre-submit origin/m
scripts: Add pre-submit
pre-submit runs through the pre-submission commands outlined in docs/ checklists/changes.md. This allows easy checking via:
``` $ git rebase -x ./scripts/pre-submit origin/main ```
Change-Id: Ib8b0f7725a31081cd70253032e107ed83aa22626 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
1111a97c | 02-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
tests: Add macro guards around new testing APIs
This was overlooked when submitting 37552b998a8b ("pdr: Add contained entity to an association PDR").
`meson configure -Dabi=deprecated,stable build
tests: Add macro guards around new testing APIs
This was overlooked when submitting 37552b998a8b ("pdr: Add contained entity to an association PDR").
`meson configure -Dabi=deprecated,stable build && meson test -C build` now links successfully.
Change-Id: I861e478db73528a40088bd19e247cd33e9adc766 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|