History log of /openbmc/pldm/libpldmresponder/bios_table.cpp (Results 1 – 21 of 21)
Revision Date Author Comments
# 89644441 31-Mar-2024 Riya Dixit <riyadixitagra@gmail.com>

libpldmresponder: Improving Logs (lg2)

This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti

libpldmresponder: Improving Logs (lg2)

This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti-pattern document [1]. Additionally, based on the
requirement this commit adds more debug information to logs.

[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings

Change-Id: I7dc5c308a8cd76573995e07d01d1a6037bca31ba
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 58cbcaf2 06-Oct-2023 Kamalkumar Patel <kamalkumar.patel@ibm.com>

PLDM:Catching exception precisely and printing it

Correcting catch block in PLDM repo to print all
exception precisely so pldm trace can be more
useful to identify defect easily.

Change-Id: If2e86d

PLDM:Catching exception precisely and printing it

Correcting catch block in PLDM repo to print all
exception precisely so pldm trace can be more
useful to identify defect easily.

Change-Id: If2e86dcb031ddc2e927e7836d7f4359f5b44cdec
Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>

show more ...


# c727fb40 11-Jul-2023 Andrew Jeffery <andrew@aj.id.au>

pldm: Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()

pldm_bios_table_attr_value_entry_encode_integer() is deprecated in
libpldm as it uses assert() to sanitize its parameters. Us

pldm: Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()

pldm_bios_table_attr_value_entry_encode_integer() is deprecated in
libpldm as it uses assert() to sanitize its parameters. Use
pldm_bios_table_attr_value_entry_encode_integer_check() instead, which
returns a value indicating success or failure.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic308d24a83fe3371a7ef074cb1d20092a06a1291

show more ...


# c43f2115 29-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: pldm_bios_table_append_pad_checksum() is deprecated

Migrate to pldm_bios_table_append_pad_checksum_check() which does not
sanitize its behaviour with assert().

Signed-off-by: Andr

libpldmresponder: pldm_bios_table_append_pad_checksum() is deprecated

Migrate to pldm_bios_table_append_pad_checksum_check() which does not
sanitize its behaviour with assert().

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ide288bb40e5acabd2bf85870849bf176ddcbc621

show more ...


# d15ecf92 27-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

pldm: Migrate off deprecated libpldm BIOS table entry encoding APIs

libpldm has deprecated the affected APIs. Prefer using their `*_check()`
variants as these return an error code rather than preven

pldm: Migrate off deprecated libpldm BIOS table entry encoding APIs

libpldm has deprecated the affected APIs. Prefer using their `*_check()`
variants as these return an error code rather than prevent misbehaviour
with assert().

1. pldm_bios_table_attr_entry_integer_encode()
2. pldm_bios_table_attr_value_entry_encode_enum()
3. pldm_bios_table_attr_value_entry_encode_string()
4. pldm_bios_table_attr_value_entry_encode_integer()

Tested: Successfully booted a p10bmc host, dumped each of the BIOS
tables with pldmtool without issue

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I823b24884e518f8c53fd153b3bc30569595ecd86

show more ...


# 488f19d0 13-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

pldm: Convert to pldm_bios_table_*_check() APIs

The pldm_bios_table_*_check() APIs wrap around unchecked equivalents
that only sanitize their parameters using assert(). The checks included
in the pl

pldm: Convert to pldm_bios_table_*_check() APIs

The pldm_bios_table_*_check() APIs wrap around unchecked equivalents
that only sanitize their parameters using assert(). The checks included
in the pldm_bios_table_*_check() APIs test the same conditions that
would trigger the assert()s in the unchecked APIs but instead return an
error code on failure.

Use of the unchecked APIs has the potential to blow up the pldmd
process, but also requires that libpldm continue to be built with
`-UNDEBUG` to avoid undefined behaviour (by aborting the process). This
impacts the performance of the library in addition to be a bit of a UX
disaster.

The unchecked APIs are deprecated in libpldm as a step improve its
safety and code generation:

https://gerrit.openbmc.org/c/openbmc/libpldm/+/64179

Tested: Booted the host on a p10bmc system with the patch applied.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I9677a7fa5ca59d04865963b367f3bb55c8676cfb

show more ...


# 6da4f91b 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I61b093f75011417cc9c7acf9605200f4fa429bac
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

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 ...


# 561c019a 06-Dec-2022 ArchanaKakani <archana.kakani@ibm.com>

Fixed compilation error

Fixed the compilation error caused due to libpldm changes.

Change-Id: I63c6a015ac626114cfbe15681facbfbf14c2abf4
Signed-off-by: ArchanaKakani <archana.kakani@ibm.com>


# b941eeb4 17-Aug-2022 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix libpldm includes in the responder

The header files from libpldm are installed in
libpldm/<.h> pattern, so fixing the header includes to
have folder name prepended.

Signed-off-by: Manojkiran Eda

Fix libpldm includes in the responder

The header files from libpldm are installed in
libpldm/<.h> pattern, so fixing the header includes to
have folder name prepended.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I0c1c326b3bac4e328d679253c60ac69f2082041e

show more ...


# 51330585 06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6a2316d11f1dd70d8dc2368c2aa01d88cf1cdb26


# 6492f524 15-Jun-2020 George Liu <liuxiwei@inspur.com>

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Also, other OpenBMC repos are doing the same.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I449e88bb4e1e262060110e1a8f3e8db3ddfc74cf

show more ...


# 45fed20f 01-Apr-2020 John Wang <wangzqbj@inspur.com>

bios_table: Implement find attr entry by string handle

Implement find attribute table entry by string handle

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I884043df1

bios_table: Implement find attr entry by string handle

Implement find attribute table entry by string handle

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I884043df1b75e48d737bb37b8f0f724c32bb3334

show more ...


# 3be7085e 13-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSEnumAttribute

Implement BIOSEnumAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for enum att

bios: Implement BIOSEnumAttribute

Implement BIOSEnumAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for enum attribute

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Ia6230485fd2d6d05f9f2ddb3a80b81f6556aee9f

show more ...


# 95e6b3c1 12-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSIntegerAttribute

Implement BIOSIntegerAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for in

bios: Implement BIOSIntegerAttribute

Implement BIOSIntegerAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for integer attribute

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I57d5b5dbcb74f9a404f5133426208f4c6851dea2

show more ...


# d965934f 27-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSConfig

Load the parsed json configs into memory.
And provid APIs to get/set on bios tables.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Ida

bios: Implement BIOSConfig

Load the parsed json configs into memory.
And provid APIs to get/set on bios tables.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Ida1fedc923d31afc61dd2d4aec70d81bb6a90ae9

show more ...


# 29683b53 27-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSStringAttribute

Implement BIOSStringAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for stri

bios: Implement BIOSStringAttribute

Implement BIOSStringAttribute, most of the code is copied from
bios/bios_parser.cpp.

Implement SetAttrValueOnDbus and constructEntry for string attribute

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Ic7c6b35d32738d698d7649f97cb7843606b8a2ba

show more ...


# e2efdcce 12-Feb-2020 John Wang <wangzqbj@inspur.com>

bios: Implement BIOSAttribute

BIOS tables are built based on json entry. When a bios attribute
is set by pldm, the corresponding dbus backend should be synchronized.

Then, the B

bios: Implement BIOSAttribute

BIOS tables are built based on json entry. When a bios attribute
is set by pldm, the corresponding dbus backend should be synchronized.

Then, the BIOSAttribute class is abstracted, and it provides the following two
interfaces

1. constructEntry: Construct the entry of the attribute/attribute-value table
2. setAttrValueOnDbus: Update the corresponding dbus backend

Specific types of attributes are implemented based on BIOSAttribute. eg
BIOSStringAttribute, BIOSEnumAttribute, BIOSIntegerAttribute.

Once the BIOS Handler is loaded, all attributes would be constructed from json.
We use BIOSConfig(class) to persist all attributes in ram.

BIOSConfig provides the following methods.

- buildTables: Build tables
- removeTables: Remove the persistent tables
- setAttrValue: Set attribute value on dbus and update the bios table
- getBIOSTable: Get bios table by table type

After we implemented BIOSConfig/BIOSSIntegerAttribute/BIOSStringAttribute/BIOSEnumAttribute,
we will use the new interface(BIOSConfig) in BIOS Handler.

It will have the following advantages

1. Different types of attribute implementations are placed in different files, improving readability
2. Logic to operate bios tables is no longer coupled with BIOS Handler.

In addition, added a c++ wrapper for string table. After
completing this refactor, will move the implementation to a common
place. It's useful for pldmtool.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I11e304c470360ca5fde23e4969494bb03de475c0

show more ...


# e297b9f4 02-Feb-2020 John Wang <wangzqbj@inspur.com>

Remove findStringName/Handle functions

Use the `find` functions in BiosStringTable.

Tested: all the code changes are about building bios tables.
tested on fp5280g2, with json

Remove findStringName/Handle functions

Use the `find` functions in BiosStringTable.

Tested: all the code changes are about building bios tables.
tested on fp5280g2, with json
https://gist.github.com/wangzqbj/b24558331cb35d14fca3b555ef03e458

saw the built tables are as expected.

$ pldmtool bios GetBIOSTable -t 0
...
...
PLDM StringTable:
BIOSStringHandle : BIOSString
0 : CodeUpdatePolicy
1 : Concurrent
2 : Disruptive
3 : Led
4 : Model
5 : OUTLET
6 : Off
7 : On
8 : str_example3

$ pldmtool bios GetBIOSTable -t 1
...
...
PLDM AttributeTable:
AttributeHandle: 0, AttributeNameHandle: 0(CodeUpdatePolicy)
AttributeType: BIOSEnumerationReadOnly
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 1(Concurrent)
PossibleValueStringHandle[1] = 2(Disruptive)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)
AttributeHandle: 1, AttributeNameHandle: 3(Led)
AttributeType: BIOSEnumeration
NumberOfPossibleValues: 2
PossibleValueStringHandle[0] = 7(On)
PossibleValueStringHandle[1] = 6(Off)
NumberOfDefaultValues: 1
DefaultValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 2, AttributeNameHandle: 5(OUTLET)
AttributeType: BIOSInteger
LowerBound: 0
UpperBound: 68002
ScalarIncrement: 1
DefaultValue: 0
AttributeHandle: 3, AttributeNameHandle: 4(Model)
AttributeType: BIOSString
StringType: 0x01
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 8
DefaultString: FP5280G2
AttributeHandle: 4, AttributeNameHandle: 8(str_example3)
AttributeType: BIOSStringReadOnly
StringType: 0x00
MinimumStringLength: 1
MaximumStringLength: 100
DefaultStringLength: 2
DefaultString: ef

$ pldmtool bios GetBIOSTable -t 2
...
...
PLDM AttributeValueTable:
AttributeHandle: 0
AttributeType: BIOSEnumerationReadOnly
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 0, StringHandle = 1(Concurrent)
AttributeHandle: 1
AttributeType: BIOSEnumeration
NumberOfCurrentValues: 1
CurrentValueStringHandleIndex[0] = 1, StringHandle = 6(Off)
AttributeHandle: 2
AttributeType: BIOSInteger
CurrentValue: 0
AttributeHandle: 3
AttributeType: BIOSString
CurrentStringLength: 12
CurrentString: powersupply0
AttributeHandle: 4
AttributeType: BIOSStringReadOnly
CurrentStringLength: 2
CurrentString: ef

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: Iba775caffcdfa51d780cd9c211572d3a359b80b4

show more ...


# f719f3bf 16-Jan-2020 John Wang <wangzqbj@inspur.com>

libpldmresponder: Add BIOSStringTable

s/BIOSStringTable/biosStringTable/g, make the variable begin
with a lowercase letter.

Added a BIOSStringTable class and implemented a comma

libpldmresponder: Add BIOSStringTable

s/BIOSStringTable/biosStringTable/g, make the variable begin
with a lowercase letter.

Added a BIOSStringTable class and implemented a command
method(find string by handle).

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I1e8fbf97025f68a87246e8661d9fdb14cbb62ecf

show more ...


# cb7f2d44 19-Jun-2019 Deepak Kodihalli <dkodihal@in.ibm.com>

Add APIs to store/load BIOS tables

This commit implements C++ APIs to store a PLDM BIOS table into
persistent storage, and to load the same back into memory. This commit
also defines

Add APIs to store/load BIOS tables

This commit implements C++ APIs to store a PLDM BIOS table into
persistent storage, and to load the same back into memory. This commit
also defines C structs representing the different BIOS tables.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I4a771a368c6931464f45ae4a8f467b579c7a5d74

show more ...