summaryrefslogtreecommitdiffstats
path: root/hdata/memory.c
Commit message (Collapse)AuthorAgeFilesLines
* core/fdt: Remove deivce_tree.hGavin Shan2016-03-081-1/+0
| | | | | | | | | None of the functions declared in the header file are public. This removes the header file. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* sparse: fix cast from restricted beint64_t in hdata/memory.cStewart Smith2015-11-101-1/+2
| | | | | | | | | Since skiboot is BE, no skiboot binary change hdata/memory.c:131:9: warning: cast from restricted beint64_t hdata/memory.c:131:9: warning: cast from restricted beint64_t Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* sparse: fix endian annotations in hdata/memory.cStewart Smith2015-11-091-3/+3
| | | | | | | | | | | | | No resulting code changes as we're all BE for now. hdata/memory.c:106:34: warning: incorrect type in argument 1 (different base types) hdata/memory.c:106:34: expected restricted beint32_t [usertype] be_val hdata/memory.c:106:34: got unsigned int [unsigned] [usertype] <noident> hdata/memory.c:113:16: warning: incorrect type in assignment (different base types) hdata/memory.c:113:16: expected unsigned int [unsigned] [usertype] <noident> hdata/memory.c:113:16: got restricted beint32_t Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/memory: Introduce zalloc() return checkKamalesh Babulal2015-07-171-0/+4
| | | | | | | | | | In add_size_to_ram_area(), Introduce check for memory allocation failure, before using it. Fixes Coverity defect#97840. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* find_shared() - Check for return value from dt_find_propertyKamalesh Babulal2015-07-101-2/+5
| | | | | | | | | | In find_shared(), dt_find_property might return NULL value, so check for validity of the pointer before dereferencing it. Fixes Coverity defect#97846. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/memory: Add dimm frequency informationNeelesh Gupta2015-06-091-2/+52
| | | | | | | | | | | | | | | | | | | Fetch the memory bus frequency present in PCIA area and add this information to the memory node. ms-dimm@d000 { [...] description = "32GB CDIMM"; ibm,loc-code = "U78C9.001.WZS03HU-P1-C16"; ibm,memory-bus-frequency = <0x0 0x5f5e1000>; serial-number = "YH10M147C1L1"; fru-type = [4d 53]; [...] }; Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Fix memory leakNeelesh Gupta2015-05-201-3/+5
| | | | | | | | Fix leak and avoid repeated call to the same function Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix bug/warning in hdata/memory.c I introduced in f1a3a19Stewart Smith2014-12-101-2/+3
| | | | | | | | | | | | Passing the wrong parameter to snprintf (sizeof(char*)) rather than actual length of the string. GCC 4.9 told us about it (and broke make check when I enabled -Werror) hdata/test/../memory.c: In function ‘add_address_range’: hdata/test/../memory.c:144:23: error: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix warning of potential unbound stack usage in hdata/memory.cStewart Smith2014-12-051-1/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Remove sprintf: there's no good reason to have this in firmwareStewart Smith2014-11-281-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Remove useless global include memory.hBenjamin Herrenschmidt2014-11-181-1/+0
| | | | | | It only exposed one function that is local to the hdat stuff Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* bump last two hdata/memory.c MS VPD printouts to PR_DEBUGStewart Smith2014-10-151-4/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/memory.c: only prlog with PR_DEBUG most thingsStewart Smith2014-10-151-8/+8
| | | | | | | We will PR_INFO the total amount of memory, as this is just informative. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-021-0/+377
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud