Skip to content
  1. Sep 06, 2019
  2. Aug 22, 2019
  3. Aug 15, 2019
  4. Aug 14, 2019
  5. Aug 13, 2019
  6. Aug 12, 2019
  7. Aug 06, 2019
    • John Wang's avatar
      base: GetTID responder implementation · 5c4f80df
      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: default avatarJohn Wang <wangzqbj@inspur.com>
      Change-Id: I7adb0e1274f326fe6cf148771f230f530c9a567c
      5c4f80df
  8. Aug 02, 2019
    • Sampa Misra's avatar
      libpldm: implement encode/decode APIs for GetPDR · 7fcfb66b
      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: default avatarSampa Misra <sampmisr@in.ibm.com>
      Change-Id: I9c17e0a4dd4e02b3c8b50eb55958c687c988f421
      7fcfb66b
    • Lakshminarayana R. Kammath's avatar
      PLDMTOOL : Implement a PLDM requester tool. · 27693a41
      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: default avatarLakshminarayana R. Kammath <lkammath@in.ibm.com>
      Change-Id: I758b5f5cf03ad9b91ce47144fe46cd79b41381f3
      27693a41
  9. Aug 01, 2019
    • Jinu Joy Thomas's avatar
      pldmd: add runtime switch to toggle debug logs · 75dd4427
      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: default avatarJinu Joy Thomas <jinu.joy.thomas@in.ibm.com>
      Change-Id: I48b1a0e919bc87f732e3c87f40225e0a63b727aa
      75dd4427
    • Deepak Kodihalli's avatar
      libpldmresponder: BIOS: create dir to store tables · c3d20895
      Deepak Kodihalli authored
      
      
      The directory where BIOS tables are persisted must be created by the
      code.
      
      Signed-off-by: default avatarDeepak Kodihalli <dkodihal@in.ibm.com>
      Change-Id: I2acdce9e032707145f0ee4c1d2ab803954f46b1c
      c3d20895
    • Deepak Kodihalli's avatar
      oem-ibm: fixup location of config files · 832d4caf
      Deepak Kodihalli authored
      
      
      Config files typically reside in the sysconfig dir(/etc).
      
      Signed-off-by: default avatarDeepak Kodihalli <dkodihal@in.ibm.com>
      Change-Id: I0255053e026a8b0b6d67330e7a9e3b8268482eff
      832d4caf
    • Deepak Kodihalli's avatar
      Revert "Optimised PLDM daemon to use vectored IO" · 58c7a89c
      Deepak Kodihalli authored
      With this change, I don't see BMC's PLDM responses going out.
      
      This reverts commit ad30c54e.
      
      Change-Id: I64d28a39dc39c9ccce411a1b1bb80b748ffd57cd
      58c7a89c
  10. Jul 24, 2019
    • vkaverap's avatar
      oem-ibm responder : Implement ReadFile and WriteFile · 5b914c31
      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: default avatarvkaverap <vkaverap@in.ibm.com>
      5b914c31
    • vkaverap's avatar
      oem-ibm: libpldm: add file IO APIs · 2ffe329e
      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: default avatarvkaverap <vkaverap@in.ibm.com>
      2ffe329e
    • Sampa Misra's avatar
      GetBIOSTable responder implementation · b37be313
      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: default avatarSampa Misra <sampmisr@in.ibm.com>
      b37be313
    • Tom Joseph's avatar
      Add APIs for parsing BIOS configuration JSON · 52552ef3
      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: default avatarTom Joseph <tomjoseph@in.ibm.com>
      52552ef3
    • Deepak Kodihalli's avatar
      Add APIs to store/load BIOS tables · cb7f2d44
      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: default avatarDeepak Kodihalli <dkodihal@in.ibm.com>
      Change-Id: I4a771a368c6931464f45ae4a8f467b579c7a5d74
      cb7f2d44
    • Zahed Hossain's avatar
      Optimised PLDM daemon to use vectored IO · ad30c54e
      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: default avatarZahed Hossain <zahzahed@in.ibm.com>
      ad30c54e
  11. Jul 12, 2019
    • Zahed Hossain's avatar
      Decode APIs now accept const struct pldm_msg *msg · 223a73d9
      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: default avatarZahed Hossain <zahzahed@in.ibm.com>
      223a73d9
  12. Jul 08, 2019
    • Zahed Hossain's avatar
      Updated supported PDLM commands list · 5e4e3838
      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: default avatarZahed Hossain <zahzahed@in.ibm.com>
      5e4e3838
  13. Jul 04, 2019
    • Jinu Joy Thomas's avatar
      Fix instance id in pldm response · 33705fda
      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: default avatarJinu Joy Thomas <jinu.joy.thomas@in.ibm.com>
      Change-Id: I0e6c0d5582674bc6b0dd75ceb35dd41ed9127cd3
      33705fda
  14. Jul 02, 2019
  15. Jun 27, 2019
  16. Jun 26, 2019
    • Tom Joseph's avatar
      Sync ibm-pldm-oem repository changes to pldm repository · 0c6d22cc
      Tom Joseph authored
      
      
      Change-Id: I6f30b39f483647ad84fe2fbe1c24298841040801
      Signed-off-by: default avatarTom Joseph <tomjoseph@in.ibm.com>
      0c6d22cc
    • Jinu Joy Thomas's avatar
      Implement the PLDM Daemon. · f666db13
      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: default avatarJinu Joy Thomas <jinu.joy.thomas@in.ibm.com>
      f666db13
  17. Jun 19, 2019
    • Deepak Kodihalli's avatar
      Map state effecter id to D-Bus object path · d0782965
      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: default avatarDeepak Kodihalli <dkodihal@in.ibm.com>
      d0782965
    • Deepak Kodihalli's avatar
      PDR: implement generation framework · c6e8fb50
      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: default avatarDeepak Kodihalli <dkodihal@in.ibm.com>
      c6e8fb50
    • Priyanga's avatar
      Simplify encode/decode for PLDM platform commands · 7257fdf0
      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: default avatarPriyanga <priyram1@in.ibm.com>
      7257fdf0
  18. Jun 18, 2019
  19. Jun 17, 2019
  20. Jun 11, 2019
  21. Jun 10, 2019
    • vkaverap's avatar
      PLDM Message Structure Change · a6575b84
      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: default avatarvkaverap <vkaverap@in.ibm.com>
      a6575b84
  22. May 28, 2019
  23. May 09, 2019
  24. Apr 30, 2019
Loading