blob: b47c88623c77604819ae72b0341498d5ddc39a5c [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[];
Vadim Bendebury6bfabce2014-12-25 15:07:22 -080030extern u32 _cbfs_header_offset[];
Julius Wernerec5e5e02014-08-20 15:29:56 -070031
32extern u8 _preram_cbmem_console[];
33extern u8 _epreram_cbmem_console[];
34#define _preram_cbmem_console_size \
35 (_epreram_cbmem_console - _preram_cbmem_console)
36
37extern u8 _stack[];
38extern u8 _estack[];
39#define _stack_size (_estack - _stack)
40
41extern u8 _cbfs_cache[];
42extern u8 _ecbfs_cache[];
43#define _cbfs_cache_size (_ecbfs_cache - _cbfs_cache)
44
45extern u8 _payload[];
46extern u8 _epayload[];
47#define _payload_size (_epayload - _payload)
48
49/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
50extern u8 _bootblock[];
51extern u8 _ebootblock[];
52#define _bootblock_size (_ebootblock - _bootblock)
53
54extern u8 _romstage[];
55extern u8 _eromstage[];
56#define _romstage_size (_eromstage - _romstage)
57
58extern u8 _ramstage[];
59extern u8 _eramstage[];
60#define _ramstage_size (_eramstage - _ramstage)
61
62/* "program" always refers to the current execution unit, except for x86 ROM. */
63extern u8 _program[];
64extern u8 _eprogram[];
65#define _program_size (_eprogram - _program)
66
67/* Arch-specific, move to <arch/symbols.h> if they become too many. */
68
69extern u8 _ttb[];
70extern u8 _ettb[];
71#define _ttb_size (_ettb - _ttb)
72
Julius Werner108548a2014-10-09 17:31:45 -070073extern u8 _ttb_subtables[];
74extern u8 _ettb_subtables[];
75#define _ttb_subtables_size (_ettb_subtables - _ttb_subtables)
76
Julius Wernerec5e5e02014-08-20 15:29:56 -070077extern u8 _dma_coherent[];
78extern u8 _edma_coherent[];
79#define _dma_coherent_size (_edma_coherent - _dma_coherent)
80
Julius Werner249f9cc2015-01-14 14:53:59 -080081extern u8 _framebuffer[];
82extern u8 _eframebuffer[];
83#define _framebuffer_size (_eframebuffer - _framebuffer)
84
Julius Wernerec5e5e02014-08-20 15:29:56 -070085#endif /* __SYMBOLS_H */