blob: 3fbf8199026cb974258866018cb22793d9fbe3dc [file] [log] [blame]
Julius Wernerec5e5e02014-08-20 15:29:56 -07001/*
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
Patrick Georgib890a122015-03-26 15:17:45 +010017 * Foundation, Inc.
Julius Wernerec5e5e02014-08-20 15:29:56 -070018 */
19
20#ifndef __SYMBOLS_H
21#define __SYMBOLS_H
22
23#include <types.h>
24
25extern u8 _sram[];
26extern u8 _esram[];
27#define _sram_size (_esram - _sram)
28
29extern u8 _dram[];
30
Aaron Durbin1936f6c2015-07-03 17:04:21 -050031extern u8 _timestamp[];
32extern u8 _etimestamp[];
33#define _timestamp_size (_etimestamp - _timestamp)
34
Julius Wernerec5e5e02014-08-20 15:29:56 -070035extern u8 _preram_cbmem_console[];
36extern u8 _epreram_cbmem_console[];
37#define _preram_cbmem_console_size \
38 (_epreram_cbmem_console - _preram_cbmem_console)
39
Kyösti Mälkki4fbac462015-01-07 04:48:43 +020040extern u8 _cbmem_init_hooks[];
41extern u8 _ecbmem_init_hooks[];
42#define _cbmem_init_hooks_size (_ecbmem_init_hooks - _cbmem_init_hooks)
43
Julius Wernerec5e5e02014-08-20 15:29:56 -070044extern u8 _stack[];
45extern u8 _estack[];
46#define _stack_size (_estack - _stack)
47
48extern u8 _cbfs_cache[];
49extern u8 _ecbfs_cache[];
50#define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache)
51
52extern u8 _payload[];
53extern u8 _epayload[];
54#define _payload_size (_epayload - _payload)
55
56/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
57extern u8 _bootblock[];
58extern u8 _ebootblock[];
59#define _bootblock_size (_ebootblock - _bootblock)
60
61extern u8 _romstage[];
62extern u8 _eromstage[];
63#define _romstage_size (_eromstage - _romstage)
64
65extern u8 _ramstage[];
66extern u8 _eramstage[];
67#define _ramstage_size (_eramstage - _ramstage)
68
69/* "program" always refers to the current execution unit, except for x86 ROM. */
70extern u8 _program[];
71extern u8 _eprogram[];
72#define _program_size (_eprogram - _program)
73
74/* Arch-specific, move to <arch/symbols.h> if they become too many. */
75
76extern u8 _ttb[];
77extern u8 _ettb[];
78#define _ttb_size (_ettb - _ttb)
79
Julius Werner108548a2014-10-09 17:31:45 -070080extern u8 _ttb_subtables[];
81extern u8 _ettb_subtables[];
82#define _ttb_subtables_size (_ettb_subtables - _ttb_subtables)
83
Julius Wernerec5e5e02014-08-20 15:29:56 -070084extern u8 _dma_coherent[];
85extern u8 _edma_coherent[];
86#define _dma_coherent_size (_edma_coherent - _dma_coherent)
87
Julius Werner249f9cc2015-01-14 14:53:59 -080088extern u8 _framebuffer[];
89extern u8 _eframebuffer[];
90#define _framebuffer_size (_eframebuffer - _framebuffer)
91
Julius Wernerec5e5e02014-08-20 15:29:56 -070092#endif /* __SYMBOLS_H */