cbmem: Add support for new 'coreboot' compatible device tree binding

Hardware / Coreboot - Julius Werner [chromium.org] - 13 January 2015 14:31 UTC

This patch brings the cbmem utility in line with the recent change to coreboot's device tree binding. Since trying to find the right node to place this binding has been so hard (and still isn't quite agreed upon), and because it's really the more correct thing to do, this code searches through the device tree for the 'coreboot' compatible property instead of looking up a hardcoded path. It also provides bullet-proof '#address-cells' handling that should work for any endianness and size.

BUG=chrome-os-partner:29311 TEST=Ran cbmem -c and cbmem -t on Nyan_Big. Also straced the to make sure everything looks as expected. 'time cbmem -t' = ~35ms shows that there is no serious performance problem from the more thorough lookup code.

Original-Change-Id: I806a21270ba6cec6e81232075749016eaf18508b

337de4c cbmem: Add support for new 'coreboot' compatible device tree binding
util/cbmem/cbmem.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 158 insertions(+), 17 deletions(-)

Upstream: review.coreboot.org


  • Share