Implement the PLDM Daemon.
The pldm daemon is a PLDM responder.
PLDM messages received by the PLDM daemon from the MCTP daemon are routed
to the respective command handler to create a response. This response will
be sent back by the PLDM daemon to the requester.
PLDM daemon and MCTP daemon interact with each other using UNIX domain sockets,
as documented in https://github.com/openbmc/docs/blob/master/designs/mctp.md
Implemented a way for the PLDM responder library to register handlers for
specific PLDM commands. This is as per the registration scheme
documented in README.md.
Support for enabling verbosity in the PLDM Daemon (tracing the receive and
response message packets) are conditionally compiled.You would need to
provide the --enable-verbose flag to configure to enable it.
We discard response messages received currently.
Fixed Handler function signature for bios and file_io types.
Tested :
Updated system with the Daemon and did a 'obmcutil poweron'
The Daemon was build with the verbose enabled configuration
Could boot a hypervisor that sends PLDM commands.
Below is the transactions recorded in the journal
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Received Msg
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Buffer Data: 09 01 81 3f 06 00
00 00 00 00 00 00 00 00 00 08 00 00 00 01 00 00 00 00 00
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Sending Msg
Jun 25 13:35:27 witherspoon-128 pldmd[1980]: Buffer Data: 09 01 00 3f 06 80
00 00 00 00
Change-Id: I22cfd85103bce167239219fbcc59c25b09528211
Signed-off-by: Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com>
diff --git a/configure.ac b/configure.ac
index b1e7fc1..3ffeca4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
AM_SILENT_RULES([yes])
+AC_CONFIG_MACRO_DIRS([m4])
# Make sure the default CFLAGS of `-O2 -g` don't override CODE_COVERAGE_CFLAGS
# It is important that this comes before AC_PROG_C{C,XX}, as we are attempting
@@ -73,8 +74,20 @@
Enable PLDM OEM command support For IBM.
]))
AM_CONDITIONAL([OEM_IBM], [test "x$enable_oem_ibm" = "xyes"])
-AS_IF([test "x$oem-ibm" == "xtrue"], [
+AS_IF([test "x$enable_oem_ibm" == "xyes"], [
AX_APPEND_COMPILE_FLAGS([-DOEM_IBM], [CXXFLAGS])
+ AX_APPEND_COMPILE_FLAGS([-DOEM_IBM], [CFLAGS])
+])
+
+# Setup verbose option
+AC_ARG_ENABLE([verbose], AS_HELP_STRING([
+ --enable-verbose
+ ], [
+ Enable verbosity for PLDM Daemon.
+]))
+AS_IF([test "x$enable_verbose" == "xyes"], [
+ AX_APPEND_COMPILE_FLAGS([-DVERBOSE], [CXXFLAGS])
+ AX_APPEND_COMPILE_FLAGS([-DVERBOSE], [CFLAGS])
])
# Create configured output