GetBIOSTable responder implementation
This commit implements the GetBIOSTable responder handler
for the BIOS Enumeration type.
One of the tables among String table, Attribute table and Attribute
Value Table are created/fetched and sent to PLDM requester as response to
the command.
Tested:
Following are the tables constructed from the sample json file present at
"test/bios_jsons/enum_attrs.json"
-bash-4.2$ hexdump -C /tmp/AllBiosTables/stringTable
00000000 00 00 07 00 41 6c 6c 6f 77 65 64 01 00 10 00 43 |....Allowed....C|
00000010 6f 64 65 55 70 64 61 74 65 50 6f 6c 69 63 79 02 |odeUpdatePolicy.|
00000020 00 0a 00 43 6f 6e 63 75 72 72 65 6e 74 03 00 0a |...Concurrent...|
00000030 00 44 69 73 72 75 70 74 69 76 65 04 00 0a 00 46 |.Disruptive....F|
00000040 57 42 6f 6f 74 53 69 64 65 05 00 0f 00 48 4d 43 |WBootSide....HMC|
00000050 4d 61 6e 61 67 65 64 53 74 61 74 65 06 00 10 00 |ManagedState....|
00000060 49 6e 62 61 6e 64 43 6f 64 65 55 70 64 61 74 65 |InbandCodeUpdate|
00000070 07 00 0a 00 4e 6f 74 41 6c 6c 6f 77 65 64 08 00 |....NotAllowed..|
00000080 03 00 4f 66 66 09 00 02 00 4f 6e 0a 00 04 00 50 |..Off....On....P|
00000090 65 72 6d 0b 00 04 00 54 65 6d 70 00 37 90 c0 da |erm....Temp.7...|
000000a0
-bash-4.2$ hexdump -C /tmp/AllBiosTables/attributeTable
00000000 00 00 00 01 00 02 02 00 03 00 01 00 01 00 00 04 |................|
00000010 00 02 0a 00 0b 00 01 00 02 00 00 05 00 02 08 00 |................|
00000020 09 00 01 01 03 00 00 06 00 02 00 00 07 00 01 00 |................|
00000030 3b 85 69 a7 |;.i.|
00000034
-bash-4.2$ hexdump -C /tmp/AllBiosTables/attributeValueTable
00000000 00 00 00 01 00 00 00 00 d9 f6 42 58 |..........BX|
0000000c
Change-Id: I06aebcc2c2deea66e867fb775afa76a1e5d18dca
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index cc0d6c2..4b0acca 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -72,16 +72,21 @@
libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
libpldmresponder_bios_test_LDFLAGS = \
$(test_ldflags) \
- $(SDBUSPLUS_LIBS)
+ $(SDBUSPLUS_LIBS) \
+ -lstdc++fs
libpldmresponder_bios_test_LDADD = \
$(top_builddir)/pldmd-registration.o \
$(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
- $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \
$(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \
$(top_builddir)/libpldm/libpldm_la-base.o \
$(top_builddir)/libpldm/libpldm_la-bios.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \
$(CODE_COVERAGE_LIBS) \
- $(SDBUSPLUS_LIBS)
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
+ $(SDBUSPLUS_LIBS) \
+ -lstdc++fs
libpldmresponder_bios_test_SOURCES = \
libpldmresponder_bios_test.cpp
@@ -112,7 +117,7 @@
libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags)
libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags)
libpldmoemresponder_fileio_test_LDADD = \
- $(top_builddir)/pldmd-registration.o \
+ $(top_builddir)/pldmd-registration.o \
$(top_builddir)/libpldm/libpldm_la-base.o \
$(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \
$(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o\
@@ -136,17 +141,20 @@
libpldmresponder_bios_table_test_CPPFLAGS = $(test_cppflags)
libpldmresponder_bios_table_test_CXXFLAGS = $(test_cxxflags)
libpldmresponder_bios_table_test_LDFLAGS = \
- $(test_ldflags) \
- $(SDBUSPLUS_LIBS)
+ $(test_ldflags) \
+ $(SDBUSPLUS_LIBS)
libpldmresponder_bios_table_test_LDADD = \
- $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
- $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \
- $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
- $(top_builddir)/libpldm/libpldm_la-base.o \
- $(top_builddir)/libpldm/libpldm_la-bios.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
+ $(top_builddir)/libpldm/libpldm_la-base.o \
+ $(top_builddir)/libpldm/libpldm_la-bios.o \
+ $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \
$(top_builddir)/pldmd-registration.o \
- $(CODE_COVERAGE_LIBS) \
- $(SDBUSPLUS_LIBS) \
+ $(CODE_COVERAGE_LIBS) \
+ $(SDBUSPLUS_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
-lstdc++fs
libpldmresponder_bios_table_test_SOURCES = \
libpldmresponder_bios_table_test.cpp