- Sep 06, 2019
-
-
John Wang authored
Fixed some uninitialized variables and assigned a more appropriate value to transferFlag in in SetBiosAttributeCurrentValue in UT Signed-off-by:
John Wang <wangzqbj@inspur.com> Change-Id: Id953b2d02ee4a179f7fb91263c9d4716ed847403
-
- Aug 22, 2019
-
-
John Wang authored
Implement encode/decode APIs for SetBiosAttributeCurrentValue command for both request and responder flow. The unit tests functions also have been added to check these APIs. Signed-off-by:
John Wang <wangzqbj@inspur.com> Change-Id: I5ae03778f2c47df6fc7f41c2ccb41f040cd85359
-
- Aug 15, 2019
-
-
John Wang authored
Make the output of `git status` after the local ci build clean Signed-off-by:
John Wang <wangzqbj@inspur.com> Change-Id: I4b8f4ac0f7a62917582b2766e02bf3245b47da62
-
- Aug 14, 2019
-
-
Deepak Kodihalli authored
CRC must be encoded only if the transfer flag is PLDM_END. The previous code would do an out if bounds access because the caller wouldn't allocate memory to hold the CRC (because the caller intended a single-part transfer). Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I6698b2542b57857ba40bd5945b61bf9af419ec8e
-
Deepak Kodihalli authored
Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I08f5afa443cafeb495f0b333475df220b0fc6f10
-
- Aug 13, 2019
-
-
Zahed Hossain authored
This reverts commit 58c7a89c. Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com> Change-Id: I8e786de99486ac45d710ea6918b41599cedc9c71
-
- Aug 12, 2019
-
-
Zahed Hossain authored
Implemented the functions to encode/decode the request of GetBIOSAttributeCurrentValueByHandle as required for the responder. Corresponding unit test functions have also been added to check the good decode requests and bad decode request. Change-Id: I711bd13a37cfd3a825c58b37029d3c35903c7fc3 Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- Aug 06, 2019
-
-
John Wang authored
A pldm terminus is defined as the point of communication termination for PLDM messages and the PLDM functions associated with those messages. The Terminus ID(TID) is a value that identifies a PLDM terminus. This commit assignes 1 to the BMC as the TID. Signed-off-by:
John Wang <wangzqbj@inspur.com> Change-Id: I7adb0e1274f326fe6cf148771f230f530c9a567c
-
- Aug 02, 2019
-
-
Sampa Misra authored
This commit implements the encode response and decode request of GetPDR command which is defined in PLDM Platform spec DSP0248_1.1.1 This enables the PLDM responder to receive the request and process the response packet. Signed-off-by:
Sampa Misra <sampmisr@in.ibm.com> Change-Id: I9c17e0a4dd4e02b3c8b50eb55958c687c988f421
-
Lakshminarayana R. Kammath authored
Implemented a way for sending PLDM requests for specific PLDM commands. This tool will interact with MCTP daemon using UNIX domain socket, The response got from socket will be displayed on the console in raw format. Tested following PLDM commands: 1) GetPLDMTypes 2) GetPLDMVersion Tested : Verified the RAW response data. ./pldmtool -c GetPLDMTypes Encoded request succesfully : RC = 0 Request Message: 08 01 9b 00 04 00 00 Success in creating the socket : RC = 3 Success in connecting to socket : RC = 0 Success in sending message type as pldm to mctp : RC = 0 Write to socket successful : RC = 7 Total length:7 Loopback response message: 08 01 9b 00 04 00 00 On first recv(),response == request : RC = 0 Total length: 14 Shutdown Socket successful : RC = 0 Socket recv() successful : RC = 0 Response Message : 08 01 00 00 04 00 01 00 00 00 00 00 00 00 ./pldmtool -c GetPLDMVersion base PLDM Type requested : base Encoded request succesfully : RC = 0 Request Message: 08 01 9b 00 03 00 00 00 00 01 00 Success in creating the socket : RC = 3 Success in connecting to socket : RC = 0 Success in sending message type as pldm to mctp : RC = 0 Write to socket successful : RC = 11 Total length:11 Loopback response message: 08 01 9b 00 03 00 00 00 00 01 00 On first recv(),response == request : RC = 0 Total length: 15 Shutdown Socket successful : RC = 0 Socket recv() successful : RC = 0 Response Message: 08 01 00 00 03 00 00 00 00 00 05 f1 f0 f0 00 ./pldmtool -h PLDM requester tool for OpenBMC Usage: ./pldmtool [OPTIONS] —command... [GetPLDMTypes] [GetPLDMVersion] SUBCOMMA ND Positionals: —command TEXT ... REQUIRED PLDM request command GetPLDMTypes TEXT Get PLDM Type GetPLDMVersion TEXT Get PLDM Version Options: -h,--help Print this help message and exit -c TEXT ... REQUIRED PLDM request command Subcommands: BASE PLDM Command Type = BASE BIOS PLDM Command Type = BIOS OEM PLDM Command Type = OEM Signed-off-by:
Lakshminarayana R. Kammath <lkammath@in.ibm.com> Change-Id: I758b5f5cf03ad9b91ce47144fe46cd79b41381f3
-
- Aug 01, 2019
-
-
Jinu Joy Thomas authored
Currently the pldm daemon has a way to enable verbose logging via a configure flag, however, a runtime verbose command line argument will prove more helpful since that way the daemon can quickly be restarted to enable/disable verbose logging without having to rebuild it. Usage: pldmd -v/--verbose $VERBOSE, where $VERBOSE has value 0 being for no verbosity and 1 being full verbosity. No option specified will have $VERBOSE value defaulted to 0. Tested: Without verbosity option (verbosity disabled by default) root@witherspoon:/tmp# ./pldmd & [1] 2274 With verbosity disabled root@witherspoon:/tmp# ./pldmd --verbose 0 & [1] 2275 With verbosity enabled root@witherspoon:/tmp# ./pldmd --verbose 1 & [1] 2276 with verbosity value error root@witherspoon:/tmp# ./pldmd --verbose 3 & [1] 2277 root@witherspoon:/tmp# Usage: ./pldmd [options] Options: --verbose=<0/1> 0 - Disable verbosity, 1 - Enable verbosity Signed-off-by:
Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com> Change-Id: I48b1a0e919bc87f732e3c87f40225e0a63b727aa
-
Deepak Kodihalli authored
The directory where BIOS tables are persisted must be created by the code. Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I2acdce9e032707145f0ee4c1d2ab803954f46b1c
-
Deepak Kodihalli authored
Config files typically reside in the sysconfig dir(/etc). Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I0255053e026a8b0b6d67330e7a9e3b8268482eff
-
Deepak Kodihalli authored
With this change, I don't see BMC's PLDM responses going out. This reverts commit ad30c54e. Change-Id: I64d28a39dc39c9ccce411a1b1bb80b748ffd57cd
-
- Jul 24, 2019
-
-
vkaverap authored
ReadFile and WriteFile command is required for in-band file transfers via LPC channel. These commands will be mostly used for files that are small size. This commit covers responder for ReadFile and WriteFile. Change-Id: Id2cbf7afb9aa3ed193376bc93eaae5b8a334d5f7 Signed-off-by:
vkaverap <vkaverap@in.ibm.com>
-
vkaverap authored
This commit implements encode and decode APIs for in-band readFile and writeFile commands. In-band file IO is preferred over DMA for smaller files. Change-Id: I92ec011560ba39aed497f533074479236abeb766 Signed-off-by:
vkaverap <vkaverap@in.ibm.com>
-
Sampa Misra authored
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>
-
Tom Joseph authored
1) Add API to get the BIOS strings from the JSON configuration files. 2) Add API to parse the config file and setup the lookup data structures for the BIOS attribute table and BIOS attribute value table. 3) Add API to get the possible values and the default values for the BIOS enumeration type. 4) Add API to get the current value of the BIOS enumeration attribute. 5) BIOS attributes can be configured by JSON configuration files which have information to build the BIOS string table, attribute table and attribute value table. Change-Id: I747dd3cfc0801f8262ffafe2d516ae7f4ddeb7a2 Signed-off-by:
Tom Joseph <tomjoseph@in.ibm.com>
-
Deepak Kodihalli authored
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
-
Zahed Hossain authored
The pldm daemon currently receives a PLDM response message as a std::vector<uint8_t> from a command handler which then inserts MCTP EID and Type (as required by the mctp demux daemon) at the beginning of the vector which requires O(n) element moves. The code has been refactored to now use scatter/gather which replaces the vector inserts resulting in O(1). This is accomplished by using sendmsg() instead of sendto() syscall. Change-Id: I47a051ed267eadc3bc9566cca24431b45322205f Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- Jul 12, 2019
-
-
Zahed Hossain authored
All the decode_xxx APIs were changed to accept the complete pldm_msg instead of working with just a specific member (payload) making it consistent with the encode_xxx APIs. Following changes were made through out the code, - decode_xxx now requires to send the const struct pldm_msg *msg instead of a const uint8_t *msg. - Within the decode_xxx function the payload is extracted and used accordingly. - All the calls made to decode_xxx APIs have been modified to now pass the pointer to pldm_msg_hdr (struct pldm_msg *msg). - The test code was modified to now pass the appropriate data to all the encode_xxx APIs. Change-Id: I16a3f6e554ea2c9fa44d55dc8f21f65022bd983a Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- Jul 08, 2019
-
-
Zahed Hossain authored
The associative container "capabilities" was updated to reflect the currently implemented PLDM types and respective commands. The return value of the "getPLDMTypes" in the test code was updated to match with the current PLDM types value. Currently implemented/supported PLDM type with commands are listed below - PLDM Messaging Control and Discovery (0x03,0x04,0x05). - PLDM for Platform Monitoring and Control (0x39). - PLDM for BIOS Control and Configuration (0x0c). Change-Id: Id8372a8280fa05c90733e7fac54e1695127d4e68 Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- Jul 04, 2019
-
-
Jinu Joy Thomas authored
The instance id that is sent on the pldm request message has to be returned in the PLDM response message to the caller, this was defaulted in the initial coding to zero and is fixed now Tested : Booted a hypervisor that sends PLDM commands. Below is the transactions recorded in the journal Jul 03 16:24:10 w70 pldmd[3209]: Buffer Data: 09 01 8b 3f 07 01 00 00 00 00 00 00 00 10 00 00 00 00 00 01 00 00 00 00 00 Jul 03 16:24:10 w70 pldmd[3209]: Sending Msg Jul 03 16:24:10 w70 pldmd[3209]: Buffer Data: 09 01 0b 3f 07 00 10 00 00 00 Jul 03 16:24:11 w70 pldmd[3209]: Received Msg Jul 03 16:24:11 w70 pldmd[3209]: Buffer Data: 09 01 8c 3f 07 00 00 00 00 00 00 02 00 00 10 00 00 00 10 01 00 00 00 00 00 Jul 03 16:24:11 w70 pldmd[3209]: Sending Msg Jul 03 16:24:11 w70 pldmd[3209]: Buffer Data: 09 01 0c 3f 07 00 00 10 00 00 Jul 03 16:24:11 w70 pldmd[3209]: Received Msg Jul 03 16:24:11 w70 pldmd[3209]: Buffer Data: 09 01 8d 3f 07 01 00 00 00 00 00 00 00 10 00 00 00 00 00 01 00 00 00 00 00 Jul 03 16:24:11 w70 pldmd[3209]: Sending Msg Jul 03 16:24:11 w70 pldmd[3209]: Buffer Data: 09 01 0d 3f 07 00 10 00 00 00 Signed-off-by:
Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com> Change-Id: I0e6c0d5582674bc6b0dd75ceb35dd41ed9127cd3
-
- Jul 02, 2019
-
-
Deepak Kodihalli authored
8b976659 has build fails with a pldm bitbake recipe. The fix was mostly about using top_srcdir instead of top_builddir. Change-Id: Ic3ef0e01997921174d28ae10e66e7bdd17c52af8 Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com>
-
- Jun 27, 2019
-
-
Priyanga authored
Change-Id: I756506e8f1678d6ee82528fdb26ea817d4a2b3cf Signed-off-by:
Priyanga <priyram1@in.ibm.com>
-
- Jun 26, 2019
-
-
Tom Joseph authored
Change-Id: I6f30b39f483647ad84fe2fbe1c24298841040801 Signed-off-by:
Tom Joseph <tomjoseph@in.ibm.com>
-
Jinu Joy Thomas authored
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>
-
- Jun 19, 2019
-
-
Deepak Kodihalli authored
Add a way to map state effecter ids to D-Bus object paths (multiple paths in case the effecter is composite). The mapping is specified in the state effecter PDR JSON (because the mapping is system specific), and is stored in a map in memory. This will be used by the get/set state effecter commands to route effecter ids to D-Bus. Change-Id: Ic79fae2445fd257302dd1298830f58b91fed9a1f Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com>
-
Deepak Kodihalli authored
This commit implements a framework that allows describing platform/system specific PDR information in JSON files, which the PLDM responder library parses and builds a PDR out of. Separate JSON files are expected per PDR type. This commit also adds the code to build a state effecter PDR. PDR record handles are implemented as incrementing indices, starting at 1, but this commit enables implementing other type of record handles (for eg offset based). This commit doesn't handle merging of PDRs received from other terminii, so the PDR that's generated now is for the BMC. Merging of PDRs will be implemented in future commits. Change-Id: I005b08c5d29d12fc2459ca8d6e18547107a3da7d Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com>
-
Priyanga authored
The encode/decode for PLDM platform commands was implemented using extensive pointer arithmetic and memcpys. To reduce the pointer usage and also for the simple assignments, structures have been created for each of the PLDM platform commands. Change-Id: I6cf1a4b67b7a50325d2a2845245d937d71e13cb7 Signed-off-by:
Priyanga <priyram1@in.ibm.com>
-
- Jun 18, 2019
-
-
Zahed Hossain authored
Updated the base.cpp to include version details for the PLDM PLATFORM (v1.1.1) and BIOS (v1.0.0) details which initially only had PLDM BASE (v1.0.0) type version defined. Change-Id: If06e3b7ba89947580f3c600912005e436c6611f9 Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
Priyanga authored
The encode/decode for PLDM base commands was implemented using extensive pointer arithmetic and memcpys. To reduce the pointer usage and also for the simple assignments, structures have been created for each of the PLDM base commands. Change-Id: I534931c9aaf799e9dc8efb4a70d8eb9d696f56c2 Signed-off-by:
Priyanga <priyram1@in.ibm.com>
-
Priyanga authored
The encode/decode for PLDM bios commands was implemented using extensive pointer arithmetic and memcpys. To reduce the pointer usage and also for the simple assignments, structures have been created for each of the PLDM bios commands. Change-Id: I34aff3ee817c6c09a28556bd2fd8b60d07374ad2 Signed-off-by:
Priyanga <priyram1@in.ibm.com>
-
- Jun 17, 2019
-
-
Jinu Joy Thomas authored
Create folder structure (oem/ibm) for ibm pldm oem commands. Move the files from the ibm-pldm-oem repo [https://github.com/openbmc/ibm-pldm-oem ] to the folder oem/ibm/ under the pldm repo and enable conditional compilation for it. The test files are also conditionally compiled. You would need to provide --enable-oem-ibm to configure. This is done to simplify the build time and runtime dependencies between the standard and oem implementations. Signed-off-by:
Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com> Change-Id: Iaa93c73faff87290e3d3d5d155d9ecae6e7ee6f9
-
- Jun 11, 2019
-
-
Zahed Hossain authored
Updated to code so that the response params in encode_xxx_resp() functions were encoded only if response was a success, not otherwise. Change-Id: Ie74ed11c77b481814ff08cea600a4c9a9aa3ae6a Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- Jun 10, 2019
-
-
vkaverap authored
With this change, PLDM code is optimised. The PLDM payload message structure previously consisted of a pointer to the payload message and the payload length, this structure is removed with this commit and the PLDM message structure now has the PLDM header structure and an array of size 1 whose address is the starting byte of message payload. Therefore, pldm msg struct can represent a request/response message in contiguous memory, thereby enabling simple casts and avoiding memcpys to get from a uint8_t* to pldm msg or vice versa. This commit also introduces a change to have the response handlers allocate memory for responses. This is aligned with the message struct change, and enables varying length responses. Change-Id: Ia46d852b8b16bfc7cf04f38435bd4079ad33c66b Signed-off-by:
vkaverap <vkaverap@in.ibm.com>
-
- May 28, 2019
-
-
Zahed Hossain authored
The bitfield8_t was missing the bit 4 field - added the same. Change-Id: I4b5be334f0c0b604053c911ca8e9168e35b43875 Signed-off-by:
Zahed Hossain <zahzahed@in.ibm.com>
-
- May 09, 2019
-
-
vkaverap authored
This commit implements the encode request and decode response APIs for the SetStateEffecterStates command. This enables BMC requester apps to send this command and process the received response. Change-Id: I1436c8730553b5a1aed8cda1fa90b8742e5be228 Signed-off-by:
vkaverap <vkaverap@in.ibm.com>
-
- Apr 30, 2019
-
-
Deepak Kodihalli authored
Replace inclusion of phosphor-logging elog-errors.hpp by log.hpp. The latter was what was just needed. Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I0781aec734d5afb54369d9961085413ed755629d
-
Deepak Kodihalli authored
The section describing the pldm daemon was added a bit prematurely. This is still work in progress alongwith the MCTP design. This will be described later on once the design is finalised. Signed-off-by:
Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I0a13c8e561acce64b74ec5f69e6dcab881d087b7
-