CHROMIUM: memconsole: Add ACPI method to locate cbmem start
authorDuncan Laurie <dlaurie@chromium.org>
Sat, 24 Dec 2011 04:20:26 +0000 (20:20 -0800)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:14:37 +0000 (15:14 -0700)
commit3f62d5e8bda9430b1ca168570f86ffe43075ba4b
tree4ee662eb4022277d224e71c091beb9f46ac105f9
parentf7c1ef58e4610f2bcc552f1cb4e0238e42e5f72d
CHROMIUM: memconsole: Add ACPI method to locate cbmem start

With >=4GB memory config the memory map can be split and relying
on total memory for a physical address to scan near does not work.

Instead of relying on scanning memory there is now an NVS field
defined in coreboot to get the pointer to the first cbmem entry.

The existing memory walking method is left in place (for now?)
with one fix to check the pointer returned by ioremap.

BUG=chrome-os-partner:7350
TEST=Tested with Stumpy 2GB and 4GB config:

1) install latest coreboot firmware
2) install kernel with this patch
03 verify that /sys/firmware/log is valid

Change-Id: I593fe03027b09d49da7dc133de7aab603c566208
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13476
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
drivers/firmware/google/memconsole.c