summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-09-04 13:05:01 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-09-11 07:12:15 +0200
commit1ae305efe1a0823c270767ddf6cc02c41ce146f8 (patch)
tree14d8f7bc15cb886186eb1e81bcd238ca2fac05ec /src/arch
parent42f4651434877085f2a44939375bffeeecdb2c37 (diff)
downloadcoreboot-1ae305efe1a0823c270767ddf6cc02c41ce146f8.tar.xz
CBMEM: Add cbmem_late_set_table() and drop references to high_tables_base
This helper function is for compatibility only for chipsets that do not implement get_top_of_ram() to support early CBMEM. Also remove references to globals high_tables_base and _size under arch/ and from two ARMv7 boards. Change-Id: I17eee30635a0368b2ada06e0698425c5ef0ecc53 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3902 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/armv7/tables.c7
-rw-r--r--src/arch/x86/boot/cbmem.c5
-rw-r--r--src/arch/x86/boot/tables.c13
3 files changed, 11 insertions, 14 deletions
diff --git a/src/arch/armv7/tables.c b/src/arch/armv7/tables.c
index 0fc7399c13..0f174d30ff 100644
--- a/src/arch/armv7/tables.c
+++ b/src/arch/armv7/tables.c
@@ -29,13 +29,6 @@
#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
-/*
- * 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;
-
void cbmem_arch_init(void)
{
}
diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c
index 3f738be07b..6ec005d183 100644
--- a/src/arch/x86/boot/cbmem.c
+++ b/src/arch/x86/boot/cbmem.c
@@ -25,9 +25,6 @@
*/
void set_top_of_ram(uint64_t ramtop)
{
- high_tables_base = ramtop - HIGH_MEMORY_SIZE;
- high_tables_size = HIGH_MEMORY_SIZE;
- printk(BIOS_DEBUG, "high_tables_base: %08llx, size %lld\n",
- high_tables_base, high_tables_size);
+ cbmem_late_set_table(ramtop - HIGH_MEMORY_SIZE, HIGH_MEMORY_SIZE);
}
#endif
diff --git a/src/arch/x86/boot/tables.c b/src/arch/x86/boot/tables.c
index 67d7911fe2..31d0fc7a4a 100644
--- a/src/arch/x86/boot/tables.c
+++ b/src/arch/x86/boot/tables.c
@@ -32,8 +32,6 @@
#include <lib.h>
#include <smbios.h>
-uint64_t high_tables_base = 0;
-uint64_t high_tables_size;
void cbmem_arch_init(void)
{
@@ -227,9 +225,18 @@ struct lb_memory *write_tables(void)
if (high_table_pointer) {
unsigned long new_high_table_pointer;
+ /* FIXME: The high_table_base parameter is not reference when tables are high,
+ * or high_table_pointer >1 MB.
+ */
+#if CONFIG_DYNAMIC_CBMEM
+ u64 fixme_high_tables_base = 0;
+#else
+ u64 fixme_high_tables_base = high_tables_base;
+#endif
+
/* Also put a forwarder entry into 0-4K */
new_high_table_pointer = write_coreboot_table(low_table_start, low_table_end,
- high_tables_base, high_table_pointer);
+ fixme_high_tables_base, high_table_pointer);
if (new_high_table_pointer > (high_table_pointer +
MAX_COREBOOT_TABLE_SIZE))