Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #ifndef __SYMBOLS_H |
| 17 | #define __SYMBOLS_H |
| 18 | |
| 19 | #include <types.h> |
| 20 | |
| 21 | extern u8 _sram[]; |
| 22 | extern u8 _esram[]; |
| 23 | #define _sram_size (_esram - _sram) |
| 24 | |
| 25 | extern u8 _dram[]; |
| 26 | |
Aaron Durbin | 1936f6c | 2015-07-03 17:04:21 -0500 | [diff] [blame] | 27 | extern u8 _timestamp[]; |
| 28 | extern u8 _etimestamp[]; |
| 29 | #define _timestamp_size (_etimestamp - _timestamp) |
| 30 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 31 | extern u8 _preram_cbmem_console[]; |
| 32 | extern u8 _epreram_cbmem_console[]; |
| 33 | #define _preram_cbmem_console_size \ |
| 34 | (_epreram_cbmem_console - _preram_cbmem_console) |
| 35 | |
Kyösti Mälkki | 4fbac46 | 2015-01-07 04:48:43 +0200 | [diff] [blame] | 36 | extern u8 _cbmem_init_hooks[]; |
| 37 | extern u8 _ecbmem_init_hooks[]; |
| 38 | #define _cbmem_init_hooks_size (_ecbmem_init_hooks - _cbmem_init_hooks) |
| 39 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 40 | extern u8 _stack[]; |
| 41 | extern u8 _estack[]; |
| 42 | #define _stack_size (_estack - _stack) |
| 43 | |
Mary Ruthven | f82e8ab | 2015-11-13 14:05:27 -0800 | [diff] [blame] | 44 | extern u8 _dram_cbfs_cache[]; |
| 45 | extern u8 _edram_cbfs_cache[]; |
| 46 | #define _dram_cbfs_cache_size (_edram_cbfs_cache - _dram_cbfs_cache) |
| 47 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 48 | extern u8 _cbfs_cache[]; |
| 49 | extern u8 _ecbfs_cache[]; |
| 50 | #define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache) |
| 51 | |
| 52 | extern u8 _payload[]; |
| 53 | extern u8 _epayload[]; |
| 54 | #define _payload_size (_epayload - _payload) |
| 55 | |
Aaron Durbin | 4de29d4 | 2015-09-03 22:49:36 -0500 | [diff] [blame] | 56 | /* "program" always refers to the current execution unit. */ |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 57 | extern u8 _program[]; |
| 58 | extern u8 _eprogram[]; |
| 59 | #define _program_size (_eprogram - _program) |
| 60 | |
| 61 | /* Arch-specific, move to <arch/symbols.h> if they become too many. */ |
| 62 | |
| 63 | extern u8 _ttb[]; |
| 64 | extern u8 _ettb[]; |
| 65 | #define _ttb_size (_ettb - _ttb) |
| 66 | |
Julius Werner | 108548a | 2014-10-09 17:31:45 -0700 | [diff] [blame] | 67 | extern u8 _ttb_subtables[]; |
| 68 | extern u8 _ettb_subtables[]; |
| 69 | #define _ttb_subtables_size (_ettb_subtables - _ttb_subtables) |
| 70 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 71 | extern u8 _dma_coherent[]; |
| 72 | extern u8 _edma_coherent[]; |
| 73 | #define _dma_coherent_size (_edma_coherent - _dma_coherent) |
| 74 | |
Julius Werner | 249f9cc | 2015-01-14 14:53:59 -0800 | [diff] [blame] | 75 | extern u8 _framebuffer[]; |
| 76 | extern u8 _eframebuffer[]; |
| 77 | #define _framebuffer_size (_eframebuffer - _framebuffer) |
| 78 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 79 | #endif /* __SYMBOLS_H */ |