summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drop explicit command entryPatrick Venture2018-11-151-8/+3
| | | | | | | | | The command entry for blobTransferCmd was accepted into phosphor-host-ipmid's oem header. Therefore, no longer specify it locally. Change-Id: Ib5879cb31f855c5b5662e659d71c21e5fd6c50a3 Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: load handlers and use factory symbolPatrick Venture2018-11-144-7/+59
| | | | | | | | Use a predefined factory symbol to build each handler after loading the library. Change-Id: I0369c6e46a57c2e8533409d8b06eb74a3962434c Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: add -export-dynamic to Makefile linker flagsPatrick Venture2018-11-141-0/+1
| | | | | | | | | | Add -export-dynamic to Makefile linker flags so that blob handlers can access getBlobManager() when they're loaded. Tested: The symbols are now exported, however, blob handlers still cannot resolve blobs::getBlobManager(). Change-Id: I025fdbd701133fc59356e3a0ed8881b2cdd0f2a0 Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: flip library search logicPatrick Venture2018-11-131-1/+6
| | | | | | | | | | Fix library search logic to load libraries installed of the format: libname.so.? versus libname.so because the recipe creates a symlink of the form libname.so.? only. Tested: Now it finds and loads the handlers. Change-Id: Ie7280f41a678bf78db226bb458c02396e352da56 Signed-off-by: Patrick Venture <venture@google.com>
* bugfix: skip 0'd crc bytes on reply computationPatrick Venture2018-11-132-4/+3
| | | | | | | | | | Skip the 0'd CRC bytes on reply computation, mirroring the skipping during request validation. Tested: Verified via client the CRC for the reply now matches expectations. Change-Id: I18da28604a388fb4210c55f3e54410a067b9f10a Signed-off-by: Patrick Venture <venture@google.com>
* process: add IPMI error return mechanism and update errorsPatrick Venture2018-11-1314-40/+79
| | | | | | | | | | | The IPMI packet validation code must return specific IPMI errors corresponding to what error has occurred instead of the invalid command error. Update all IPMI handler pieces to return more specific errors. Change-Id: I8d21e92015d84cc0880e3b83991aed7288e19eab Signed-off-by: Patrick Venture <venture@google.com>
* build: Add -flto to CXXFLAGSPatrick Venture2018-11-091-1/+2
| | | | | | | Add -flto to CXXFLAGS to allow build optimization. Change-Id: Icc7bd996bd512a0d84a35b6a0449f69611a69de1 Signed-off-by: Patrick Venture <venture@google.com>
* build: cleanup MakefilePatrick Venture2018-11-091-17/+22
| | | | | | | | Cleanup spaces from the Makefile. Automake is ok with spaces, but for a cleaner file, use tabs. Change-Id: Ie18f80a5e65a05611472e61801b669e1564b17e1 Signed-off-by: Patrick Venture <venture@google.com>
* main: s/blobs-ipmid/blob-ipmid/ for library pathPatrick Venture2018-11-081-1/+1
| | | | | | | | | Fixup a typo in the library path. The library path will be specified in a later patchset from the configure.ac by default, but that typo would have just lived there instead. Change-Id: Ia9f95fc46e3835781e4dbe3b3fdb2d9d36b7e565 Signed-off-by: Patrick Venture <venture@google.com>
* manager: fixup to use find_ifPatrick Venture2018-10-241-9/+7
| | | | | | | | | | | [manager.cpp:150]: (style) Consider using std::find_if algorithm instead of a raw loop. Note: Amusingly switching to a const iterator allowed cppcheck to find this cleanup. Change-Id: I16d87d4dde165fbb226259d1abc8deaa51569af1 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: apply const to read-only iteratorsPatrick Venture2018-10-241-2/+2
| | | | | | | Apply const to read-only iterators. Change-Id: Ib58f98596cb9f185d3b16a0b1fbd895dd37d3fd6 Signed-off-by: Patrick Venture <venture@google.com>
* main: catch exceptions when loading blob handlersBenjamin Fair2018-10-231-1/+12
| | | | | | | | | | If an error occurs while attempting to load the blob handlers (such as a filesystem error), the uncaught exception will crash the entire IPMI daemon. Instead, catch the exception and print an error message. Tested: ipmid doesn't crash when /usr/lib/blobs-ipmid is missing Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Ic316f6e5aa3c4bc6eba4fa2e561b338f4b20f606
* manager: reduce scope of variablePatrick Venture2018-10-121-2/+1
| | | | | | | The lsess variable can have a smaller scope. Change-Id: I79aa84b25b52708c8c35ed1a56dbfe89dabd29fb Signed-off-by: Patrick Venture <venture@google.com>
* new command: BmcBlobWriteMetaPatrick Venture2018-10-1013-0/+271
| | | | | | | Implement new command BmcBlobWriteMeta. Change-Id: I2e148f4bde4ef5d24db7e30bb02bdde024d9166a Signed-off-by: Patrick Venture <venture@google.com>
* build: fixup paths to leverage ipmiprovider symlinksPatrick Venture2018-10-091-7/+12
| | | | | | | Add a comment and fix up the destination folder for the example handler. Change-Id: Idc3bfbb77d4d103092b49c7cc63d462fe23a5f61 Signed-off-by: Patrick Venture <venture@google.com>
* process: rework lookup to use map for handlersPatrick Venture2018-10-041-38/+19
| | | | | | | | Switches lookup to use a map as adding another command makes the list too long. Change-Id: I35257ff5ae8c4c14c88aa2fa7d866642370ef38f Signed-off-by: Patrick Venture <venture@google.com>
* test mock: add implementation of getBlobManagerPatrick Venture2018-10-041-0/+12
| | | | | | | | This is a basic implementation that can be improved later. It provides for returning a pointer that you provide in your test when needed. Change-Id: I4647c7f8cb55fa2f37ce1561af5d528b75832d56 Signed-off-by: Patrick Venture <venture@google.com>
* README: Add new command: BmcBlobWriteMetaPatrick Venture2018-10-041-0/+24
| | | | | | | | The BmcBlobWriteMeta command provides the notion that some blob object may have meta data that can be updated by the host or caller. Change-Id: Ief8e1bc5d49b7e0e4df61ef34d6b873777fabdb1 Signed-off-by: Patrick Venture <venture@google.com>
* manager: return abstract base typePatrick Venture2018-10-044-6/+5
| | | | | | | | Unit-tests later required knowing the vtable for a BlobManager, and this should avoid that needless complication. Change-Id: I7a208d08c2065b7383fd5095e00d17c1ab3b0cf5 Signed-off-by: Patrick Venture <venture@google.com>
* header: install test mock headersPatrick Venture2018-10-0424-31/+24
| | | | | | | | IPMI Blob handlers will need to include these mocks when building unit-tests. Therefore, they must be installed. Change-Id: I4c8ed0fa1a4a8912853c024206ef5e61f87707d8 Signed-off-by: Patrick Venture <venture@google.com>
* main: now seeks out shared library handlers are load-timePatrick Venture2018-10-014-26/+33
| | | | | | | | | phosphor-ipmi-blobs now detects blob handlers compiled into shared libraries on the BMC and loads them at start-up when it's loaded by phosphor-host-ipmid. Change-Id: Ib1b6b8f75aa544a263d37f71e133a9a188704de3 Signed-off-by: Patrick Venture <venture@google.com>
* utils: add methods for finding and loading handlersPatrick Venture2018-09-304-4/+64
| | | | | | | | This module provides a couple basic methods for enumerating and then loading handlers. Change-Id: I4f58be313190c48de25c2b9578b7c622afefc656 Signed-off-by: Patrick Venture <venture@google.com>
* manager: add getBlobManager as an exported methodPatrick Venture2018-09-273-5/+25
| | | | | | | | getBlobManager will allow a library to get ahold of the BlobManager for registration purposes. Change-Id: I75f41601d10d59293c7752da8307507cc2c88434 Signed-off-by: Patrick Venture <venture@google.com>
* example: fixup compilationPatrick Venture2018-09-272-1/+6
| | | | | | | The example handler had compilation errors. Change-Id: I53392b53f021bf01887559cee4bd79b2799f5730 Signed-off-by: Patrick Venture <venture@google.com>
* move blobs and manager header into installation dirPatrick Venture2018-09-2719-23/+27
| | | | | | | | The blobs and manager header will be used by handlers once we've transitioned to dynamic loading. Change-Id: Ieae8fcfe383007731cb4f8b2619612c3bfa47f50 Signed-off-by: Patrick Venture <venture@google.com>
* gitignore: add *.loPatrick Venture2018-09-271-0/+1
| | | | | | | Adds *.lo to the ignored files list. Change-Id: Iff18258584eec18f740ebe03815311c4245a4d96 Signed-off-by: Patrick Venture <venture@google.com>
* build: add ENABLE_EXAMPLE macro on enable-example conditionPatrick Venture2018-09-261-0/+4
| | | | | | | | | Previously, the ENABLE_EXAMPLE was only an AM_CONDITIONAL and therefore not passed down to the source environment via config.h. This fixes that. Change-Id: I8e02112f12c4aaef22eda76cc9e50b9bf7f32dda Signed-off-by: Patrick Venture <venture@google.com>
* build: drop systemd requirementPatrick Venture2018-09-211-1/+0
| | | | | | | The library currently does not require linking against systemd. Change-Id: I787e718b0b33bdd68aba4afc712a97dec97795aa Signed-off-by: Patrick Venture <venture@google.com>
* add example handlerPatrick Venture2018-09-205-1/+260
| | | | | | | | This adds an example handler to demonstrate how one can add a specific type of BLOB handler. Change-Id: Ib5421f1b945b45998b40d3939a4dab9cdf39aaa9 Signed-off-by: Patrick Venture <venture@google.com>
* Build as c++17Patrick Venture2018-09-151-1/+1
| | | | | | | Setting as separate patch to not require move until user is ready. Change-Id: Ia15de3ba1a4332dc51cc5539e895d7ab5ee072c7 Signed-off-by: Patrick Venture <venture@google.com>
* initial drop of phosphor-ipmi-blobsPatrick Venture2018-09-1544-0/+4369
| | | | | | | | This implements a majority of the OEM IPMI BLOBS protocol. The only piece missing from this is the timed expiration of sessions. Change-Id: I82c9d17b625c94fc3340edcfabbbf1ffeb5ad7ac Signed-off-by: Patrick Venture <venture@google.com>
* adds README.mdPatrick Venture2018-09-151-0/+344
| | | | | | | Adds the design document as a README for the project. Change-Id: Ida502441c0dd0fef7c9a63e9bee69122b7c7e24b Signed-off-by: Patrick Venture <venture@google.com>
* Initial commitBrad Bishop2018-09-121-0/+201
OpenPOWER on IntegriCloud