[coreboot-gerrit] New patch to review for coreboot: 8663e27 lenovo/x201: Really do EARLY_CBMEM_INIT

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sat Jan 11 20:56:31 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4667

-gerrit

commit 8663e27a9c1e7491fcb8055b34a7b66f31bec96f
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Jan 6 17:18:58 2014 +0200

    lenovo/x201: Really do EARLY_CBMEM_INIT
    
    The board was missing cbmem_initialize() call in romstage. Selecting
    EARLY_CBMEM_INIT implies this is done in romstage.
    
    Change-Id: I9ec93f89fe4cbb9e729532be36db601b6e62bca6
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/mainboard/lenovo/x201/romstage.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/lenovo/x201/romstage.c b/src/mainboard/lenovo/x201/romstage.c
index 8022d7b..18645ac 100644
--- a/src/mainboard/lenovo/x201/romstage.c
+++ b/src/mainboard/lenovo/x201/romstage.c
@@ -230,6 +230,7 @@ static inline u16 read_acpi16(u32 addr)
 void main(unsigned long bist)
 {
 	u32 reg32;
+	int cbmem_initted;
 	int s3resume = 0;
 
 	timestamp_init(rdtsc ());
@@ -329,11 +330,14 @@ void main(unsigned long bist)
 		reg32 = inl(DEFAULT_PMBASE + 0x04);
 		outl(reg32 & ~(7 << 10), DEFAULT_PMBASE + 0x04);
 	}
+
+	cbmem_initted = !cbmem_initialize();
+
 #if CONFIG_HAVE_ACPI_RESUME
 	/* If there is no high memory area, we didn't boot before, so
 	 * this is not a resume. In that case we just create the cbmem toc.
 	 */
-	if (s3resume && cbmem_reinit()) {
+	if (s3resume && cbmem_initted) {
 		void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
 
 		/* copy 1MB - 64K to high tables ram_base to prevent memory corruption



More information about the coreboot-gerrit mailing list