Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; version 2 of the License. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 12 | */ |
| 13 | |
Aaron Durbin | d4afa93 | 2016-04-19 17:25:59 -0500 | [diff] [blame] | 14 | #include <bootmem.h> |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 15 | #include <boot/tables.h> |
| 16 | #include <boot/coreboot_tables.h> |
Patrick Rudolph | 23d62dd | 2018-04-12 10:36:57 +0200 | [diff] [blame] | 17 | #include <symbols.h> |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 18 | |
Ting Shen | dff29e0 | 2019-01-28 18:15:00 +0800 | [diff] [blame] | 19 | DECLARE_OPTIONAL_REGION(bl31); |
| 20 | |
Aaron Durbin | 5481c96 | 2016-04-19 20:37:51 -0500 | [diff] [blame] | 21 | void arch_write_tables(uintptr_t coreboot_table) |
| 22 | { |
| 23 | } |
| 24 | |
Aaron Durbin | d4afa93 | 2016-04-19 17:25:59 -0500 | [diff] [blame] | 25 | void bootmem_arch_add_ranges(void) |
| 26 | { |
Julius Werner | 7e0dea6 | 2019-02-20 18:39:22 -0800 | [diff] [blame] | 27 | bootmem_add_range((uintptr_t)_ttb, REGION_SIZE(ttb), BM_MEM_RAMSTAGE); |
Patrick Rudolph | 23d62dd | 2018-04-12 10:36:57 +0200 | [diff] [blame] | 28 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 29 | if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE) && |
Julius Werner | 7e0dea6 | 2019-02-20 18:39:22 -0800 | [diff] [blame] | 30 | REGION_SIZE(bl31) > 0) |
| 31 | bootmem_add_range((uintptr_t)_bl31, REGION_SIZE(bl31), |
| 32 | BM_MEM_BL31); |
Ting Shen | dff29e0 | 2019-01-28 18:15:00 +0800 | [diff] [blame] | 33 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 34 | if (!CONFIG(COMMON_CBFS_SPI_WRAPPER)) |
Patrick Rudolph | 23d62dd | 2018-04-12 10:36:57 +0200 | [diff] [blame] | 35 | return; |
| 36 | bootmem_add_range((uintptr_t)_postram_cbfs_cache, |
Julius Werner | 7e0dea6 | 2019-02-20 18:39:22 -0800 | [diff] [blame] | 37 | REGION_SIZE(postram_cbfs_cache), BM_MEM_RAMSTAGE); |
Aaron Durbin | d4afa93 | 2016-04-19 17:25:59 -0500 | [diff] [blame] | 38 | } |
| 39 | |
Aaron Durbin | f6ada1c | 2016-02-10 10:52:47 -0600 | [diff] [blame] | 40 | void lb_arch_add_records(struct lb_header *header) |
| 41 | { |
| 42 | } |