CHROMIUM: ramoops: Copy the entire buffer to deal with bit rot
If unclean shutdown is done by yanking power rails, the RAM may be in a
state where it is not getting refreshed for a short period of time. This
can cause bit rotting in RAM and throw off the wraparound and buffer
size calculation logic. To get around this, copy the entire console
buffer. Note that this, of course, won't do anything to fix the bit
rotting but the intent here is that some logs are better than none.
BUG=chrome-os-partner:13249
TEST=on a snow or link system do a warm reboot by pressing
alt-volume_up-r keys together. The system should reboot. Upon bootup,
check contents of "/dev/pstore/console-ramoops" and ensure they are from
dmesg of the previous boot.
Change-Id: I68b2b10a6b3fc29329979cc0c659b440436b771f
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32180
Reviewed-by: Doug Anderson <dianders@chromium.org>