summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fru_gen: eliminate unnecessary mapsPatrick Williams2017-06-021-4/+5
| | | | | | | | | | | | | | The type of the generated fru data contained a map of a map of a map of a map, but for all except the outermost map, all elements were iterated over when using the map. Therefore, change them to a vector<pair<...>> instead. Vector should generate smaller code and allow faster iteration. Vector insert and iteration are both linear where as map is O(n lg n). Change-Id: I475e5a40b4051e4ce9478a565c889c1751241987 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* fru_gen: reduce map in generated dataPatrick Williams2017-06-023-36/+22
| | | | | | | | | | | | | | | | Eliminate one level of the generated "frus" map by creating a structure for the lowest-level member. This should reduce the impact of a gcc bug that consumes excessive memory when compiling the generated map. Also removed the runtime calculation of the 'delimiter' character and instead generated it in the fru_gen python script. Resolves openbmc/openbmc#1441. Resolves openbmc/openbmc#1166. Change-Id: Iafe049d034354d58b68d357b4f49fd5e21b2c8c7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* fru_gen: fixes for python3Patrick Williams2017-06-022-8/+8
| | | | | | | | | | The iter{keys,items} functions have become just 'keys' and 'items' in python3. Python2 also has keys and items, which is slightly less efficient for iteration but none of these maps are large enough to be of concern. Change-Id: If6e8f36ad39074e0a6c022fb09e3a43b0928af19 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* writefrudata: removed un-needed sd_bus_refPatrick Williams2017-04-181-1/+1
| | | | | | | | sdbusplus's bus object has a change in semantics that no longer require a 'sd_bus_ref' call. See changes for openbmc/openbmc#1432. Change-Id: I853b9d88aa5711d29be3edce5d4ad67bfd27b3d1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Trimmed out code paths that relied on the old namespace.Patrick Venture2017-04-171-250/+0
| | | | | | | | | | | There were references to the skeleton because it was still updating items in the old namespace. This trims those out, however, doesn't clean up all the extra bits. That will be a subsequent commit. Fixes openbmc/openbmc#1425. Change-Id: Ibe9af614458bced70f478f70ffb5b5195034bc7e Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: Reuse ipmi bus for inventory-notifyPatrick Williams2017-03-311-3/+3
| | | | | | | Partially fixes openbmc/openbmc#875. Change-Id: Ieaaa65fa8432ffa873dcf2f4f96f9c1e09de3008 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Move object_mapper per dbus path conventions.Leonel Gonzalez2017-03-201-1/+1
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: I467a9ffa68d9539c5c1f71e2dfa3281a347d5951 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
* Add gen_pimrules scriptBrad Bishop2017-02-281-0/+183
| | | | | | | Add a script for generating PIM rules. Change-Id: I9de54785938fcbf8de3a1ac8f42fa37a52f99d2c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* React to inventory manager path changeBrad Bishop2017-02-231-1/+1
| | | | | | | | /xyz/openbmc_project/Inventory becomes /xyz/openbmc_project/inventory Change-Id: I95c1174b3cdbcd73a88c6bc004016e089c12f3e4 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* inventory: update extra propertiesDeepak Kodihalli2017-02-221-16/+32
| | | | | Change-Id: I8b403f07855cccb001eb63d6c5f11c5e1f58c874 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* build : provide extra properties yaml as configDeepak Kodihalli2017-02-212-2/+7
| | | | | | | | | | Make it possible for the openpower-vpd-parser recipe to be able to supply the extra properties YAML as configurable input. Use extra-properties-example.yaml as input. Change-Id: I3cfffa6bb9709b4dbf5c487ab198960cc52e3863 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* inventory: enable updating extra propertiesDeepak Kodihalli2017-02-213-0/+69
| | | | | | | | | | | | | | While the IPMI FRU parser, in order to update inventory, receives most properties from the host IPMI, there could be some properties whose values could be provided by other sources, such as the Machine Readable Workbook. Provide a mechanism to enable the above by having the extra property information and values supplied via a YAML file, via which code is generated, which in turn can be used by the parser to update inventory. Change-Id: I30a2a9129d97485a0c31c3dec0155d5e1a008101 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add header to house commonly used typesDeepak Kodihalli2017-02-211-0/+25
| | | | | Change-Id: I51f0decd8c71c4442556ce4d5fcfc10bd82efa48 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Inventory: Add chassis fru dataRatan Gupta2017-02-201-2/+1
| | | | | Change-Id: Idc83199d584ffe6d1b66debcb36244dd393495d0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Inventory: Implement writing custom IPMI FRU propertyRatan Gupta2017-02-201-2/+34
| | | | | Change-Id: I9286045c3c10cd8bed840f03cfcc92a5b236d9ca Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Correct install of libwritefrudata.laMatthew Barth2017-02-171-2/+1
| | | | | Change-Id: I11784dd3faf3d4c6d76b8484b224e71a2817a95c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* build: check for sdbusplus packageDeepak Kodihalli2017-02-172-2/+4
| | | | | Change-Id: Id29024e34ac0c930fd4ff51c9886736324ea68e1 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix bug in FRU data processing logicDeepak Kodihalli2017-02-141-165/+31
| | | | | | | | The logic assumed IPMI FRU data is encoded in ascii always, but the data could be ascii or binary. Handle both encodings. Change-Id: Ie89bb077fd32a23bb96bd4cda78b66d2ccdd9774 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix FRU area checkDeepak Kodihalli2017-02-141-4/+2
| | | | | | | | One of the IPMI FRU area checks deals with the old openbmc skeleton interfaces, which is no longer valid. Fixed that. Change-Id: Id406d4967d130136d4ac2a8efff94dac65d7ee0e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Initialise members of class ipmi_fruDeepak Kodihalli2017-02-141-8/+8
| | | | | | | | The class ipmi_fru has a disabled default ctor, and the custom one doesn't initialise all class members. Fix this issue. Change-Id: I9a0364743ba5afe41a319f9091fd8b0bd85f1777 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* inventory : adhere to change in PIM Notify()Ratan Gupta2017-02-141-24/+25
| | | | | Change-Id: I83efc8ad799aaa879525d84b97779d5b98f168c4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the generated FRU Map in cpp.Ratan Gupta2017-02-145-38/+37
| | | | | Change-Id: Id83220e5e2876f4112ba76d698b2062e2a08dd3d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* rename frup.h -> frup.hppRatan Gupta2017-02-114-3/+3
| | | | | | | This header contains c++ code. Change-Id: I4bc6cf0ddfbdc6ac4d93580a5203bb59537bbb04 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* fru_gen: Handle empty yaml filesBrad Bishop2017-02-071-0/+2
| | | | | | | | Allow the build to work in the event of an empty YAML file. Change-Id: I3d36b57852446959aeb836ab69958c16387c02fc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* writefrudata : invoke inventory managerRatan Gupta2017-02-011-19/+65
| | | | | | | | | Make a call to the inventory manager to construct inventory objects for IPMI FRUs Change-Id: I4b36ecc85bc78214c9c47032bafd013f6ff27fe9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Re-factor to use MRW and Inventory interfacesRatan Gupta2017-02-013-165/+214
| | | | | | | | | The write FRU command now figures out properties to be written for a FRU via a generated header file, which in turn is generated via scrips deriving their inputs from MRW and Inventory d-bus interfaces. Change-Id: I9939aeec24566cf518f4e63dc6ae344b236a541f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Change c->cpp.Ratan Gupta2017-02-012-1/+1
| | | | | | | It is required as we would be using c++ containers. Change-Id: Ifefc468ac7b2e94d1b9948a6aeb7f8d42d8e6555 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* build: add rule to generate fru-gen.hppDeepak Kodihalli2017-02-012-0/+12
| | | | | | | | fru-gen.hpp needs as input a YAML file. Enable this to be provided via autotools configuration. Change-Id: I586c14651840b6a9697a93261f79c2a48f14071f Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add IPMI FRU parser code generator.Ratan Gupta2017-02-013-0/+226
| | | | | | | | Add a script that generates c++ structures based on system dependent configuration. Change-Id: I3a005b2dd31d7db3137bed9be6df2a0658c48d82 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add privilege levels for commandsTom2017-01-312-2/+4
| | | | | | | | Add privilege level and package the provider library into /usr/lib/ipmid-providers Change-Id: I33be3ab696ba477a938b1c0272119420353d6d99 Signed-off-by: Tom <tomjoseph@in.ibm.com>
* Convert build process to autotoolsMatthew Barth2016-10-195-82/+104
| | | | | | | | | Replaced the use of a manual Makefile with the use of autotools to automatically verify and generate the necessary build files. Follow the steps outlined within the README.md file to build the package. Change-Id: Iaef09f17006ee51ac45f84c6c59826dcc567e279 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Change H->hpp & C->cppMatthew Barth2016-10-187-6/+6
| | | | | Change-Id: I4bb8cf7a58c517f348a524d3e027ebcd1dcd0dea Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Ensure all tools are building with -Wall and -WerrorMatthew Barth2016-08-302-20/+12
| | | | | | | | | Added -Werror to CFLAGS & CXXFLAGS. Also corrected resulting compiler errors, including commenting out possible future-use variables. Change-Id: If70c7fdbf1d02f29e3d2cab5fa12b51bf5302cd5 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Fix warnings in printf formatPatrick Williams2016-08-181-7/+7
| | | | | | | | | A number of arguments to printf were 'size_t', which is the same size as 'int' only on 32-bit architectures. Replace all %d format strings with %zd where size_t is the type passed. Change-Id: Ida863312d692f47ca8240f32b75b8c55a8accc19 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Fix compile failurePatrick Williams2016-08-181-1/+3
| | | | | | | | Improper const was added in 804077 to one of the variables used as a parameter to mapper_get_service. Change-Id: I29eeb255794af381c48b505e12a7d68db6d5c54a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Improper use of non-const c-string.Patrick Williams2016-08-081-2/+3
| | | | | | | | | | | | | | | | sd_bus_message_read(..."s"...) gives a pointer to a char* from within the message. Even though the message is in writable memory, it is generally bad to write to the char* from within it. Also, as a reviewer it is less of a concern to see a const char* that is lacking a free than it is a char*. Changing to const char* hopefully avoids the confusion as to why the c-string does not have a corresponding free. Eventually this code will likely transition over to the sdbusplus interfaces and this will be irrelevant. Change-Id: I0dfe948bb2f0eee03042ba9b9dc7563995f59027 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Use mapper binding for busname queriesBrad Bishop2016-07-272-8/+40
| | | | | | | | | Prefer mapper queries to hardcoded busnames. React to /org/openbmc/managers/system GetObjectById API change. Change-Id: I651b820622c3bff51c05365b811b41e73fde997c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #18 from vishwabmc/masterPatrick Williams2016-06-151-5/+46
|\ | | | | Fixes openbmc/ipmi-fru-parser#3
| * Update BINARY encoded IPMI FRU area data to FRU Inventoryvishwa2016-06-151-5/+46
|/ | | | | | | | | | | | | | | | IPMI fru record format can contain BINARY and ASCII encodings. There was an error in the way FRU parser was handling the BINARY encoded data and that resulted in incorrect updates to FRU Inventory object. The reason why it was done like that was to workaround a limitation encountered while creating the dictionary having a name and value pair where value is an array of bytes. This proposed fix will convert the array of binary encoded data into ascii string and updates the FRU inventory as a string. Since string is a single element, it fits in within the limits of dictionary. Fixes openbmc/ipmi-fru-parser#3
* Merge pull request #20 from bradbishop/versionPatrick Williams2016-06-142-9/+19
|\ | | | | Add shared library versioning
| * Add shared library versioningBrad Bishop2016-06-131-5/+10
| | | | | | | | | | | | Use -soname and install a library symlink. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
| * Makefile whitespace fixesBrad Bishop2016-06-131-5/+5
| | | | | | | | | | | | A couple spaces at the end of line. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
| * Added gitignoreBrad Bishop2016-06-131-0/+5
|/ | | | Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Replacing std::ifstream by access(2) for checking file existencevishwa2016-06-061-1/+1
| | | | Fixes openbmc/ipmi-fru-parser#12.
* Merge pull request #14 from adamliyi/fix_lookup_0411Patrick Williams2016-05-241-5/+90
|\ | | | | Using new getFRUOjbect() API to fix 'not found in lookup' error message
| * Using new getFRUArea() API to fix 'not found in lookup' error messageYi Li2016-04-281-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ipmi-fru-parser calls the dbus method SystemManager::getObjectFromId('FRU_STR', fru_area_name) for each fru areas to get the dbus object path of fru area, even if the fru area does not exist. Also ipmi_validate_fru_area() may be invoked multipul times before full fru data is parsed. This will generate duplicated error messages from SystemManager:, e.g: "ERROR SystemManager: dbus.String(u'INTERNAL_13') not found in lookup". In this case, "INTERNAL" area does not exists for FRU In another pull request for skeleton, a new method: getFRUArea(fru_id) is added specially for ipmi-fru-parser. See PR: https://github.com/openbmc/skeleton/pull/62. ipmi-fru-parser gets fru area names defined in Skeleton, and it calls getObjectFromId() only for fru_aream_name already defined. This way the 'not found in lookup' error message can be avoided. Signed-off-by: Yi Li <adamliyi@msn.com>
* | Merge pull request #15 from anoo1/frusizePatrick Williams2016-05-242-2/+2
|\ \ | |/ |/| Increase size of buffer length variable
| * Replace uint8_t buffer length variable with size_tAdriana Kobylak2016-05-162-2/+2
|/ | | | | | | | | | | The latest Barreleye vpd contains additional custom fields in one of the board sections, pushing the size of the buffer over 0x100. The current variable that stores the buffer size is set to be size_t, but the function using it crops it to uint8_t which doesn't fit the extended size. Changing the function to use size_t. Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Merge pull request #10 from vishwabmc/masternkskjames2016-01-285-318/+652
|\ | | | | Set Fault and Present status while handling fru
| * Set Fault and Present status while handling fruvishwa2016-01-225-318/+652
|/
OpenPOWER on IntegriCloud