blob: c343fd9a14187beb726194822653e354b1b4b2bc [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
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
25extern u8 _sram[];
26extern u8 _esram[];
27#define _sram_size (_esram - _sram)
28
29extern u8 _dram[];
30
31extern u8 _preram_cbmem_console[];
32extern u8 _epreram_cbmem_console[];
33#define _preram_cbmem_console_size \
34 (_epreram_cbmem_console - _preram_cbmem_console)
35
36extern u8 _stack[];
37extern u8 _estack[];
38#define _stack_size (_estack - _stack)
39
40extern u8 _cbfs_cache[];
41extern u8 _ecbfs_cache[];
42#define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache)
43
44extern u8 _payload[];
45extern u8 _epayload[];
46#define _payload_size (_epayload - _payload)
47
48/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
49extern u8 _bootblock[];
50extern u8 _ebootblock[];
51#define _bootblock_size (_ebootblock - _bootblock)
52
53extern u8 _romstage[];
54extern u8 _eromstage[];
55#define _romstage_size (_eromstage - _romstage)
56
57extern u8 _ramstage[];
58extern u8 _eramstage[];
59#define _ramstage_size (_eramstage - _ramstage)
60
61/* "program" always refers to the current execution unit, except for x86 ROM. */
62extern u8 _program[];
63extern u8 _eprogram[];
64#define _program_size (_eprogram - _program)
65
66/* Arch-specific, move to <arch/symbols.h> if they become too many. */
67
68extern u8 _ttb[];
69extern u8 _ettb[];
70#define _ttb_size (_ettb - _ttb)
71
72extern u8 _dma_coherent[];
73extern u8 _edma_coherent[];
74#define _dma_coherent_size (_edma_coherent - _dma_coherent)
75
76#endif /* __SYMBOLS_H */