aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi/ipmi-fru.c
AgeCommit message (Collapse)AuthorFilesLines
2015-04-18ipmi: Check for ipmi backend presence before useAlistair Popple1-0/+2
Not all ipmi related functions check for a valid backend before attempting to use it. Under normal circumstances this should not happen as the platform should always register an ipmi backend. However a system should be able to boot without a functional ipmi backend, which is sometimes the case during system bringup. This patch adds presence checks for an ipmi backend before attempting to use it, thus allowing a system with a non-functional backend to boot without ipmi. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-09ipmi: Add a function to (re)initialise a message without allocationAlistair Popple1-4/+3
Currently the only functions we have for initialising ipmi messages with the correct values also allocate memory for the message. In some cases we want to reuse previously allocated messages to avoid continually freeing/allocating memory. This patch introduces a function which (re)initialises a previously allocated message and converts existing instances of this behaviour over to the new function. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-06Move skiboot internal things from opal.h to opal-api.hStewart Smith1-0/+2
This is probably not the best collection of things in the world, but it means that opal.h is much closer to being directly usable by an OS. This triggers a bunch of #include fixes throughout the tree. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-03ipmi/fru: Remove redundant version informationAlistair Popple1-4/+8
The FRU data format limits string length to 31 characters. Currently we truncate the version string as required but leave the redundant (because it's included in the product name field) "skiboot-" at the start of the version. This patch removes the redundant prefix allowing more of the actual version string to be stored. It also fixes a bug which caused the last character of a 31 character version string to be overwritten as well as a rather embarrassing off-by-one buffer overflow. Note that 31 characters should be enough to store the complete version string for any release builds. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi/fru: Add support for populating fru dataAlistair Popple1-0/+233
This patch adds basic support for populating some fru data. Currently we only support adding the skiboot version number to the product information area. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>