[coreboot-gerrit] Patch set updated for coreboot: 77c0ac6 ARM: Always select DYNAMIC_CBMEM

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Nov 28 06:55:37 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/7469

-gerrit

commit 77c0ac60998cad46c059ac1e4ef99c0a6ebed27b
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Nov 10 15:08:47 2014 +0200

    ARM: Always select DYNAMIC_CBMEM
    
    TODO before merge: proper cbmem_top(), there is now just empty stub.
    
    Change-Id: I6939559c720383978a3afec8b6da789f895c81d2
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/arch/arm/tables.c                           |  9 --------
 src/arch/arm64/cbmem.c                          | 30 -------------------------
 src/arch/arm64/tables.c                         | 17 --------------
 src/cpu/allwinner/a10/Kconfig                   |  1 +
 src/cpu/allwinner/a10/cbmem.c                   |  4 ----
 src/cpu/ti/am335x/Kconfig                       |  1 +
 src/cpu/ti/am335x/cbmem.c                       | 24 ++++++++++++++++++++
 src/mainboard/emulation/qemu-armv7/Kconfig      |  1 +
 src/mainboard/emulation/qemu-armv7/Makefile.inc |  3 +++
 src/mainboard/emulation/qemu-armv7/cbmem.c      | 24 ++++++++++++++++++++
 src/soc/qualcomm/ipq806x/Kconfig                |  1 +
 src/soc/qualcomm/ipq806x/cbmem.c                | 24 ++++++++++++++++++++
 12 files changed, 79 insertions(+), 60 deletions(-)

diff --git a/src/arch/arm/tables.c b/src/arch/arm/tables.c
index 20c5a9f..a2b7b9b 100644
--- a/src/arch/arm/tables.c
+++ b/src/arch/arm/tables.c
@@ -29,15 +29,6 @@
 
 #define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
 
-#if !CONFIG_DYNAMIC_CBMEM
-void __attribute__((weak)) get_cbmem_table(uint64_t *base, uint64_t *size)
-{
-	printk(BIOS_WARNING, "WARNING: you need to define get_cbmem_table for your board\n");
-	*base = 0;
-	*size = 0;
-}
-#endif
-
 void cbmem_arch_init(void)
 {
 }
diff --git a/src/arch/arm64/cbmem.c b/src/arch/arm64/cbmem.c
deleted file mode 100644
index b33e9b8..0000000
--- a/src/arch/arm64/cbmem.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * 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 warranty 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 <cbmem.h>
-
-unsigned long get_top_of_ram(void);
-
-unsigned long get_top_of_ram(void)
-{
-        return CONFIG_RAMTOP;
-}
-
-void *cbmem_top(void)
-{
-        return (void *)get_top_of_ram();
-}
diff --git a/src/arch/arm64/tables.c b/src/arch/arm64/tables.c
index 49fab9f..ce7ad5a 100644
--- a/src/arch/arm64/tables.c
+++ b/src/arch/arm64/tables.c
@@ -29,15 +29,6 @@
 
 #define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
 
-#if ! CONFIG_DYNAMIC_CBMEM
-/*
- * TODO: "High" tables are a convention used on x86. Maybe we can
- * clean up that naming at some point.
- */
-uint64_t high_tables_base = 0;
-uint64_t high_tables_size;
-#endif
-
 void cbmem_arch_init(void)
 {
 }
@@ -46,14 +37,6 @@ struct lb_memory *write_tables(void)
 {
 	unsigned long table_pointer, new_table_pointer;
 
-#if ! CONFIG_DYNAMIC_CBMEM
-	if (!high_tables_base) {
-		printk(BIOS_ERR, "ERROR: high_tables_base is not set.\n");
-	}
-
-	printk(BIOS_DEBUG, "high_tables_base: %llx.\n", high_tables_base);
-#endif
-
 	post_code(0x9d);
 
 	table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE,
diff --git a/src/cpu/allwinner/a10/Kconfig b/src/cpu/allwinner/a10/Kconfig
index 387964f..1fb8cb3 100644
--- a/src/cpu/allwinner/a10/Kconfig
+++ b/src/cpu/allwinner/a10/Kconfig
@@ -12,6 +12,7 @@ config CPU_SPECIFIC_OPTIONS
 	select HAVE_MONOTONIC_TIMER
 	select HAVE_UART_SPECIAL
 	select BOOTBLOCK_CONSOLE
+	select DYNAMIC_CBMEM
 
 config BOOTBLOCK_CPU_INIT
 	string
diff --git a/src/cpu/allwinner/a10/cbmem.c b/src/cpu/allwinner/a10/cbmem.c
index 84dc2bf..e051f06 100644
--- a/src/cpu/allwinner/a10/cbmem.c
+++ b/src/cpu/allwinner/a10/cbmem.c
@@ -8,11 +8,7 @@
 #include "ram_segs.h"
 #include <cbmem.h>
 
-#if IS_ENABLED(CONFIG_DYNAMIC_CBMEM)
-
 void *cbmem_top(void)
 {
 	return a1x_get_cbmem_top();
 }
-
-#endif
diff --git a/src/cpu/ti/am335x/Kconfig b/src/cpu/ti/am335x/Kconfig
index 1de871f..42c091c 100644
--- a/src/cpu/ti/am335x/Kconfig
+++ b/src/cpu/ti/am335x/Kconfig
@@ -5,6 +5,7 @@ config CPU_TI_AM335X
 	select HAVE_MONOTONIC_TIMER
 	select HAVE_UART_SPECIAL
 	select BOOTBLOCK_CONSOLE
+	select DYNAMIC_CBMEM
 	bool
 	default n
 
diff --git a/src/cpu/ti/am335x/cbmem.c b/src/cpu/ti/am335x/cbmem.c
new file mode 100644
index 0000000..c104e9c
--- /dev/null
+++ b/src/cpu/ti/am335x/cbmem.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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 warranty 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 <stddef.h>
+#include <cbmem.h>
+
+void *cbmem_top(void)
+{
+        return NULL;
+}
diff --git a/src/mainboard/emulation/qemu-armv7/Kconfig b/src/mainboard/emulation/qemu-armv7/Kconfig
index b275e88..7e24a20 100644
--- a/src/mainboard/emulation/qemu-armv7/Kconfig
+++ b/src/mainboard/emulation/qemu-armv7/Kconfig
@@ -32,6 +32,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	select ARM_ROMSTAGE_ARMV7
 	select ARM_RAMSTAGE_ARMV7
 	select BOARD_ROMSIZE_KB_4096
+	select DYNAMIC_CBMEM
 
 config MAINBOARD_DIR
 	string
diff --git a/src/mainboard/emulation/qemu-armv7/Makefile.inc b/src/mainboard/emulation/qemu-armv7/Makefile.inc
index e088da6..4119f93 100644
--- a/src/mainboard/emulation/qemu-armv7/Makefile.inc
+++ b/src/mainboard/emulation/qemu-armv7/Makefile.inc
@@ -14,6 +14,9 @@
 
 romstage-y += romstage.c
 
+romstage-y += cbmem.c
+ramstage-y += cbmem.c
+
 bootblock-y += media.c
 romstage-y += media.c
 ramstage-y += media.c
diff --git a/src/mainboard/emulation/qemu-armv7/cbmem.c b/src/mainboard/emulation/qemu-armv7/cbmem.c
new file mode 100644
index 0000000..c104e9c
--- /dev/null
+++ b/src/mainboard/emulation/qemu-armv7/cbmem.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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 warranty 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 <stddef.h>
+#include <cbmem.h>
+
+void *cbmem_top(void)
+{
+        return NULL;
+}
diff --git a/src/soc/qualcomm/ipq806x/Kconfig b/src/soc/qualcomm/ipq806x/Kconfig
index 03be33a..4866486 100644
--- a/src/soc/qualcomm/ipq806x/Kconfig
+++ b/src/soc/qualcomm/ipq806x/Kconfig
@@ -2,6 +2,7 @@ config SOC_QC_IPQ806X
 	select ARCH_BOOTBLOCK_ARMV4
 	select ARCH_ROMSTAGE_ARMV7
 	select ARCH_RAMSTAGE_ARMV7
+	select DYNAMIC_CBMEM
 	bool
 	default n
 
diff --git a/src/soc/qualcomm/ipq806x/cbmem.c b/src/soc/qualcomm/ipq806x/cbmem.c
new file mode 100644
index 0000000..c104e9c
--- /dev/null
+++ b/src/soc/qualcomm/ipq806x/cbmem.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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 warranty 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 <stddef.h>
+#include <cbmem.h>
+
+void *cbmem_top(void)
+{
+        return NULL;
+}



More information about the coreboot-gerrit mailing list