summaryrefslogtreecommitdiff
path: root/src/arch/riscv
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-04-19 21:38:18 -0500
committerAaron Durbin <adurbin@chromium.org>2016-04-21 20:49:05 +0200
commita4db050318c52ae59c8914c9bc9ae25e1e344238 (patch)
tree6600f7e461cbca197a4ebfd23f35bf584d114f1c /src/arch/riscv
parent5481c961b265ef5128ab67b24d0416df22d1f693 (diff)
lib: add common write_tables() implementation
In order to de-duplicate common patterns implement one write_tables() function. The new write_tables() replaces all the architecture-specific ones that were largely copied. The callbacks are put in place to handle any per-architecture requirements. Change-Id: Id3d7abdce5b30f5557ccfe1dacff3c58c59f5e2b Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14436 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/riscv')
-rw-r--r--src/arch/riscv/tables.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/arch/riscv/tables.c b/src/arch/riscv/tables.c
index 92213c5b9c..eef6bf2ffd 100644
--- a/src/arch/riscv/tables.c
+++ b/src/arch/riscv/tables.c
@@ -15,14 +15,9 @@
* GNU General Public License for more details.
*/
-#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 arch_write_tables(uintptr_t coreboot_table)
{
@@ -32,35 +27,6 @@ void bootmem_arch_add_ranges(void)
{
}
-#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
-
-void write_tables(void)
-{
- unsigned long table_pointer, new_table_pointer;
-
- post_code(0x9d);
-
- table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE,
- MAX_COREBOOT_TABLE_SIZE);
- if (!table_pointer) {
- printk(BIOS_ERR, "Could not add CBMEM for coreboot table.\n");
- return;
- }
-
- new_table_pointer = write_coreboot_table(0UL, 0UL,
- table_pointer, table_pointer);
-
- if (new_table_pointer > (table_pointer + MAX_COREBOOT_TABLE_SIZE)) {
- printk(BIOS_ERR, "coreboot table didn't fit (%lx/%x bytes)\n",
- new_table_pointer - table_pointer, MAX_COREBOOT_TABLE_SIZE);
- }
-
- printk(BIOS_DEBUG, "coreboot table: %ld bytes.\n",
- new_table_pointer - table_pointer);
-
- post_code(0x9e);
-}
-
void lb_arch_add_records(struct lb_header *header)
{
}