[coreboot-gerrit] New patch to review for coreboot: e624ae2 CBMEM: Rename utility file

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Thu Jan 1 12:43:42 CET 2015


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/8031

-gerrit

commit e624ae2cf503e8bc1b6c72ea4f22a46fa288a400
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Wed Dec 31 19:13:12 2014 +0200

    CBMEM: Rename utility file
    
    This file will have CBMEM init hooks API one day.
    
    Change-Id: I0c31495d4217a5eb235b13e6d8e8c99a87a3b840
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/lib/Makefile.inc   |  4 +++-
 src/lib/cbmem_common.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/cbmem_info.c   | 45 ---------------------------------------------
 3 files changed, 52 insertions(+), 46 deletions(-)

diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 0501091..ec3c2f4 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -81,7 +81,9 @@ else
 ramstage-y += cbmem.c
 romstage-y += cbmem.c
 endif # CONFIG_DYNAMIC_CBMEM
-ramstage-y += cbmem_info.c
+
+romstage-y += cbmem_common.c
+ramstage-y += cbmem_common.c
 
 ramstage-y += hexdump.c
 romstage-y += hexdump.c
diff --git a/src/lib/cbmem_common.c b/src/lib/cbmem_common.c
new file mode 100644
index 0000000..a800173
--- /dev/null
+++ b/src/lib/cbmem_common.c
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied wacbmem_entryanty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+#include <console/console.h>
+#include <cbmem.h>
+#include <stdlib.h>
+
+#ifndef __PRE_RAM__
+
+static const struct cbmem_id_to_name cbmem_ids[] = { CBMEM_ID_TO_NAME_TABLE };
+
+void cbmem_print_entry(int n, u32 id, u64 base, u64 size)
+{
+	int i;
+	const char *name;
+
+	name = NULL;
+	for (i = 0; i < ARRAY_SIZE(cbmem_ids); i++) {
+		if (cbmem_ids[i].id == id) {
+			name = cbmem_ids[i].name;
+			break;
+		}
+	}
+
+	if (name == NULL)
+		printk(BIOS_DEBUG, "%08x ", id);
+	else
+		printk(BIOS_DEBUG, "%s", name);
+	printk(BIOS_DEBUG, "%2d. ", n);
+	printk(BIOS_DEBUG, "%08llx ", base);
+	printk(BIOS_DEBUG, "%08llx\n", size);
+}
+
+#endif /* !__PRE_RAM__ */
diff --git a/src/lib/cbmem_info.c b/src/lib/cbmem_info.c
deleted file mode 100644
index 7b1168d..0000000
--- a/src/lib/cbmem_info.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied wacbmem_entryanty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-#include <console/console.h>
-#include <cbmem.h>
-#include <stdlib.h>
-
-static const struct cbmem_id_to_name cbmem_ids[] = { CBMEM_ID_TO_NAME_TABLE };
-
-void cbmem_print_entry(int n, u32 id, u64 base, u64 size)
-{
-	int i;
-	const char *name;
-
-	name = NULL;
-	for (i = 0; i < ARRAY_SIZE(cbmem_ids); i++) {
-		if (cbmem_ids[i].id == id) {
-			name = cbmem_ids[i].name;
-			break;
-		}
-	}
-
-	if (name == NULL)
-		printk(BIOS_DEBUG, "%08x ", id);
-	else
-		printk(BIOS_DEBUG, "%s", name);
-	printk(BIOS_DEBUG, "%2d. ", n);
-	printk(BIOS_DEBUG, "%08llx ", base);
-	printk(BIOS_DEBUG, "%08llx\n", size);
-}



More information about the coreboot-gerrit mailing list