summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x201
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-06 17:20:31 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-22 20:54:57 +0100
commit2d8520b275d47e0670e7f9e166e0f63c32855548 (patch)
tree71b69480daeb5e800b3863448cd0776dba265b7c /src/mainboard/lenovo/x201
parent97e1b11f416aa23787e71b6133702b82daf1552e (diff)
CBMEM: Replace cbmem_initialize() with cbmem_recovery()
The replacement function confirms CBMEM TOC is wiped clean on power cycles and resets. It also introduces compatibility interface to ease up transition to DYNAMIC_CBMEM. Change-Id: Ic5445c5bff4aff22a43821f3064f2df458b9f250 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4668 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard/lenovo/x201')
-rw-r--r--src/mainboard/lenovo/x201/romstage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mainboard/lenovo/x201/romstage.c b/src/mainboard/lenovo/x201/romstage.c
index 18645acb05..7935e5618e 100644
--- a/src/mainboard/lenovo/x201/romstage.c
+++ b/src/mainboard/lenovo/x201/romstage.c
@@ -331,7 +331,11 @@ void main(unsigned long bist)
outl(reg32 & ~(7 << 10), DEFAULT_PMBASE + 0x04);
}
- cbmem_initted = !cbmem_initialize();
+ /* FIXME: If not in s3resume, raminit() calls cbmem_recovery(0),
+ * clears all of CBMEM region and puts in MRC training results.
+ * Tell here we are doing resume to avoid wiping CBMEM region
+ * again. */
+ cbmem_initted = !cbmem_recovery(1);
#if CONFIG_HAVE_ACPI_RESUME
/* If there is no high memory area, we didn't boot before, so