blob: b0010c4b9e4c1c90b5936e68e24bdd7ff0eee818 [file] [log] [blame]
Furquan Shaikh2af76f42014-04-28 16:39:40 -07001/*
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.
Furquan Shaikh2af76f42014-04-28 16:39:40 -070016 */
17
Aaron Durbind4afa932016-04-19 17:25:59 -050018#include <bootmem.h>
Furquan Shaikh2af76f42014-04-28 16:39:40 -070019#include <boot/tables.h>
20#include <boot/coreboot_tables.h>
Patrick Rudolph23d62dd2018-04-12 10:36:57 +020021#include <symbols.h>
Furquan Shaikh2af76f42014-04-28 16:39:40 -070022
Ting Shendff29e02019-01-28 18:15:00 +080023DECLARE_OPTIONAL_REGION(bl31);
24
Aaron Durbin5481c962016-04-19 20:37:51 -050025void arch_write_tables(uintptr_t coreboot_table)
26{
27}
28
Aaron Durbind4afa932016-04-19 17:25:59 -050029void bootmem_arch_add_ranges(void)
30{
Julius Werner7e0dea62019-02-20 18:39:22 -080031 bootmem_add_range((uintptr_t)_ttb, REGION_SIZE(ttb), BM_MEM_RAMSTAGE);
Patrick Rudolph23d62dd2018-04-12 10:36:57 +020032
Julius Werner7e0dea62019-02-20 18:39:22 -080033 if (IS_ENABLED(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) &&
34 REGION_SIZE(bl31) > 0)
35 bootmem_add_range((uintptr_t)_bl31, REGION_SIZE(bl31),
36 BM_MEM_BL31);
Ting Shendff29e02019-01-28 18:15:00 +080037
Patrick Rudolph23d62dd2018-04-12 10:36:57 +020038 if (!IS_ENABLED(CONFIG_COMMON_CBFS_SPI_WRAPPER))
39 return;
40 bootmem_add_range((uintptr_t)_postram_cbfs_cache,
Julius Werner7e0dea62019-02-20 18:39:22 -080041 REGION_SIZE(postram_cbfs_cache), BM_MEM_RAMSTAGE);
Aaron Durbind4afa932016-04-19 17:25:59 -050042}
43
Aaron Durbinf6ada1c2016-02-10 10:52:47 -060044void lb_arch_add_records(struct lb_header *header)
45{
46}