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. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef __SYMBOLS_H |
| 21 | #define __SYMBOLS_H |
| 22 | |
| 23 | #include <types.h> |
| 24 | |
| 25 | extern u8 _sram[]; |
| 26 | extern u8 _esram[]; |
| 27 | #define _sram_size (_esram - _sram) |
| 28 | |
| 29 | extern u8 _dram[]; |
| 30 | |
| 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 | |
| 36 | extern u8 _stack[]; |
| 37 | extern u8 _estack[]; |
| 38 | #define _stack_size (_estack - _stack) |
| 39 | |
| 40 | extern u8 _cbfs_cache[]; |
| 41 | extern u8 _ecbfs_cache[]; |
| 42 | #define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache) |
| 43 | |
| 44 | extern u8 _payload[]; |
| 45 | extern u8 _epayload[]; |
| 46 | #define _payload_size (_epayload - _payload) |
| 47 | |
| 48 | /* Careful: _e<stage> and _<stage>_size only defined for the current stage! */ |
| 49 | extern u8 _bootblock[]; |
| 50 | extern u8 _ebootblock[]; |
| 51 | #define _bootblock_size (_ebootblock - _bootblock) |
| 52 | |
| 53 | extern u8 _romstage[]; |
| 54 | extern u8 _eromstage[]; |
| 55 | #define _romstage_size (_eromstage - _romstage) |
| 56 | |
| 57 | extern u8 _ramstage[]; |
| 58 | extern u8 _eramstage[]; |
| 59 | #define _ramstage_size (_eramstage - _ramstage) |
| 60 | |
| 61 | /* "program" always refers to the current execution unit, except for x86 ROM. */ |
| 62 | extern u8 _program[]; |
| 63 | extern u8 _eprogram[]; |
| 64 | #define _program_size (_eprogram - _program) |
| 65 | |
| 66 | /* Arch-specific, move to <arch/symbols.h> if they become too many. */ |
| 67 | |
| 68 | extern u8 _ttb[]; |
| 69 | extern u8 _ettb[]; |
| 70 | #define _ttb_size (_ettb - _ttb) |
| 71 | |
| 72 | extern u8 _dma_coherent[]; |
| 73 | extern u8 _edma_coherent[]; |
| 74 | #define _dma_coherent_size (_edma_coherent - _dma_coherent) |
| 75 | |
| 76 | #endif /* __SYMBOLS_H */ |