blob: ff07c31066fa9e9cf2a0ba61f32b71b5c5f321d2 [file] [log] [blame]
Ronald G. Minnich98312442016-02-12 22:37:48 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2003 Eric Biederman
5 * Copyright (C) 2005 Steve Magnani
6 * Copyright (C) 2008-2009 coresystems GmbH
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <console/console.h>
19#include <cpu/cpu.h>
Aaron Durbind4afa932016-04-19 17:25:59 -050020#include <bootmem.h>
Ronald G. Minnich98312442016-02-12 22:37:48 +000021#include <boot/tables.h>
22#include <boot/coreboot_tables.h>
23#include <string.h>
24#include <cbmem.h>
25#include <lib.h>
26
Aaron Durbin5481c962016-04-19 20:37:51 -050027void arch_write_tables(uintptr_t coreboot_table)
28{
29}
30
Aaron Durbind4afa932016-04-19 17:25:59 -050031void bootmem_arch_add_ranges(void)
32{
33}
34
Aaron Durbina0546da2016-04-19 15:17:08 -050035#define MAX_COREBOOT_TABLE_SIZE CONFIG_COREBOOT_TABLE_SIZE
Ronald G. Minnich98312442016-02-12 22:37:48 +000036
Aaron Durbinf7dca0a2016-04-19 13:41:16 -050037void write_tables(void)
Ronald G. Minnich98312442016-02-12 22:37:48 +000038{
39 unsigned long table_pointer, new_table_pointer;
40
41 post_code(0x9d);
42
43 table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE,
44 MAX_COREBOOT_TABLE_SIZE);
45 if (!table_pointer) {
46 printk(BIOS_ERR, "Could not add CBMEM for coreboot table.\n");
Aaron Durbinf7dca0a2016-04-19 13:41:16 -050047 return;
Ronald G. Minnich98312442016-02-12 22:37:48 +000048 }
49
50 new_table_pointer = write_coreboot_table(0UL, 0UL,
51 table_pointer, table_pointer);
52
53 if (new_table_pointer > (table_pointer + MAX_COREBOOT_TABLE_SIZE)) {
54 printk(BIOS_ERR, "coreboot table didn't fit (%lx/%x bytes)\n",
55 new_table_pointer - table_pointer,
56 MAX_COREBOOT_TABLE_SIZE);
57 }
58
59 printk(BIOS_DEBUG, "coreboot table: %ld bytes.\n",
60 new_table_pointer - table_pointer);
61
62 post_code(0x9e);
Ronald G. Minnich98312442016-02-12 22:37:48 +000063}
64
65void lb_arch_add_records(struct lb_header *header)
66{
67}