aboutsummaryrefslogtreecommitdiff
path: root/hdata/hdif.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-15hdata: Add an idata array iteratorOliver O'Halloran1-0/+69
Adds HDIF_get_iarray() which retrieves and validates an internal array header and HDIF_iarray_for_each() for walking the individual array entries. This reduces the amount of get-then-check boilerplate that we have with the existing HDIF_get_iarray_item() method for iterating internal data arrays. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-06hdata: Make out-of-range idata print at PR_DEBUGOliver O'Halloran1-2/+2
Some fields just aren't populated on some systems. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-30hdata: print backtraces on HDAT errorsOliver O'Halloran1-0/+9
Currently these aren't sufficently obnoxious, so make them more so. HDAT parse errors usually mean we won't be able to generate enough of a device-tree to boot so we want to make this much more obvious. Suggested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-10hdat: make HDIF_child() print more useful errorsOliver O'Halloran1-2/+2
The HDAT has very fixed relationships between a parent and child structures. When parsing the HDAT we always know what type of child that we expect and we will error out if there is a mismatch between what we get and what expect. This patch just prints out what we got in addition to what we expected to help with debugging. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-10sparse: fix beint16_t degrades to int in hdata/hdif.cStewart Smith1-1/+1
Do the comparison in host endian rather than big endian to silence sparse hdata/hdif.c:25:16: warning: restricted beint16_t degrades to integer Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+140
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>