aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-04-19 17:25:59 -0500
committerAaron Durbin <adurbin@chromium.org>2016-04-21 20:46:45 +0200
commitd4afa938c3f8b72e2d3572dc74d60b731f4ddeb0 (patch)
tree1af5e48c6633a8d82a6a673bc55ec15fce0efe8c /src/arch
parent8984af89b85034ad0456bb3a63a78cd63c618934 (diff)
lib/bootmem: allow architecture specific bootmem ranges
A architecture-specific function, named bootmem_arch_add_ranges(), is added so that each architecture can add entries into the bootmem memory map. This allows for a common write_tables() implementation to avoid code duplication. Change-Id: I834c82eae212869cad8bb02c7abcd9254d120735 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14434 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/tables.c5
-rw-r--r--src/arch/arm64/tables.c5
-rw-r--r--src/arch/mips/tables.c5
-rw-r--r--src/arch/power8/tables.c5
-rw-r--r--src/arch/riscv/tables.c5
-rw-r--r--src/arch/x86/tables.c5
6 files changed, 30 insertions, 0 deletions
diff --git a/src/arch/arm/tables.c b/src/arch/arm/tables.c
index eb08e6e842..20891e8d67 100644
--- a/src/arch/arm/tables.c
+++ b/src/arch/arm/tables.c
@@ -17,12 +17,17 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <string.h>
#include <cbmem.h>
#include <lib.h>
+void bootmem_arch_add_ranges(void)
+{
+}
+
#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
void write_tables(void)
diff --git a/src/arch/arm64/tables.c b/src/arch/arm64/tables.c
index eb08e6e842..20891e8d67 100644
--- a/src/arch/arm64/tables.c
+++ b/src/arch/arm64/tables.c
@@ -17,12 +17,17 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <string.h>
#include <cbmem.h>
#include <lib.h>
+void bootmem_arch_add_ranges(void)
+{
+}
+
#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
void write_tables(void)
diff --git a/src/arch/mips/tables.c b/src/arch/mips/tables.c
index a3d9939707..d54b8d6e20 100644
--- a/src/arch/mips/tables.c
+++ b/src/arch/mips/tables.c
@@ -18,12 +18,17 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <string.h>
#include <cbmem.h>
#include <lib.h>
+void bootmem_arch_add_ranges(void)
+{
+}
+
#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
void write_tables(void)
diff --git a/src/arch/power8/tables.c b/src/arch/power8/tables.c
index 02d1c163e1..17e678a999 100644
--- a/src/arch/power8/tables.c
+++ b/src/arch/power8/tables.c
@@ -17,12 +17,17 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <string.h>
#include <cbmem.h>
#include <lib.h>
+void bootmem_arch_add_ranges(void)
+{
+}
+
#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
void write_tables(void)
diff --git a/src/arch/riscv/tables.c b/src/arch/riscv/tables.c
index eb08e6e842..20891e8d67 100644
--- a/src/arch/riscv/tables.c
+++ b/src/arch/riscv/tables.c
@@ -17,12 +17,17 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <string.h>
#include <cbmem.h>
#include <lib.h>
+void bootmem_arch_add_ranges(void)
+{
+}
+
#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
void write_tables(void)
diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c
index b36078d2e1..4fba509a96 100644
--- a/src/arch/x86/tables.c
+++ b/src/arch/x86/tables.c
@@ -17,6 +17,7 @@
#include <console/console.h>
#include <cpu/cpu.h>
+#include <bootmem.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <arch/pirq_routing.h>
@@ -180,6 +181,10 @@ static unsigned long write_smbios_table(unsigned long rom_table_end)
return rom_table_end;
}
+void bootmem_arch_add_ranges(void)
+{
+}
+
void write_tables(void)
{
unsigned long low_table_start, low_table_end;