blob: 9102e829523040fda6dae7ee463220076b4d3f0e [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
31extern u8 _preram_cbmem_console[];
32extern u8 _epreram_cbmem_console[];
33#define _preram_cbmem_console_size \
34 (_epreram_cbmem_console - _preram_cbmem_console)
35
Kyösti Mälkki4fbac462015-01-07 04:48:43 +020036extern u8 _cbmem_init_hooks[];
37extern u8 _ecbmem_init_hooks[];
38#define _cbmem_init_hooks_size (_ecbmem_init_hooks - _cbmem_init_hooks)
39
Julius Wernerec5e5e02014-08-20 15:29:56 -070040extern u8 _stack[];
41extern u8 _estack[];
42#define _stack_size (_estack - _stack)
43
44extern u8 _cbfs_cache[];
45extern u8 _ecbfs_cache[];
46#define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache)
47
48extern u8 _payload[];
49extern u8 _epayload[];
50#define _payload_size (_epayload - _payload)
51
52/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
53extern u8 _bootblock[];
54extern u8 _ebootblock[];
55#define _bootblock_size (_ebootblock - _bootblock)
56
57extern u8 _romstage[];
58extern u8 _eromstage[];
59#define _romstage_size (_eromstage - _romstage)
60
61extern u8 _ramstage[];
62extern u8 _eramstage[];
63#define _ramstage_size (_eramstage - _ramstage)
64
65/* "program" always refers to the current execution unit, except for x86 ROM. */
66extern u8 _program[];
67extern u8 _eprogram[];
68#define _program_size (_eprogram - _program)
69
70/* Arch-specific, move to <arch/symbols.h> if they become too many. */
71
72extern u8 _ttb[];
73extern u8 _ettb[];
74#define _ttb_size (_ettb - _ttb)
75
Julius Werner108548a2014-10-09 17:31:45 -070076extern u8 _ttb_subtables[];
77extern u8 _ettb_subtables[];
78#define _ttb_subtables_size (_ettb_subtables - _ttb_subtables)
79
Julius Wernerec5e5e02014-08-20 15:29:56 -070080extern u8 _dma_coherent[];
81extern u8 _edma_coherent[];
82#define _dma_coherent_size (_edma_coherent - _dma_coherent)
83
Julius Werner249f9cc2015-01-14 14:53:59 -080084extern u8 _framebuffer[];
85extern u8 _eframebuffer[];
86#define _framebuffer_size (_eframebuffer - _framebuffer)
87
Julius Wernerec5e5e02014-08-20 15:29:56 -070088#endif /* __SYMBOLS_H */