6b5bc77c9b
Stefan thinks they don't add value. Command used: sed -i -e '/file is part of /d' $(git grep "file is part of " |egrep ":( */\*.*\*/\$|#|;#|-- | *\* )" | cut -d: -f1 |grep -v crossgcc |grep -v gcov | grep -v /elf.h |grep -v nvramtool) The exceptions are for: - crossgcc (patch file) - gcov (imported from gcc) - elf.h (imported from GNU's libc) - nvramtool (more complicated header) The removed lines are: - fmt.Fprintln(f, "/* This file is part of the coreboot project. */") -# This file is part of a set of unofficial pre-commit hooks available -/* This file is part of coreboot */ -# This file is part of msrtool. -/* This file is part of msrtool. */ - * This file is part of ncurses, designed to be appended after curses.h.in -/* This file is part of pgtblgen. */ - * This file is part of the coreboot project. - /* This file is part of the coreboot project. */ -# This file is part of the coreboot project. -# This file is part of the coreboot project. -## This file is part of the coreboot project. --- This file is part of the coreboot project. -/* This file is part of the coreboot project */ -/* This file is part of the coreboot project. */ -;## This file is part of the coreboot project. -# This file is part of the coreboot project. It originated in the - * This file is part of the coreinfo project. -## This file is part of the coreinfo project. - * This file is part of the depthcharge project. -/* This file is part of the depthcharge project. */ -/* This file is part of the ectool project. */ - * This file is part of the GNU C Library. - * This file is part of the libpayload project. -## This file is part of the libpayload project. -/* This file is part of the Linux kernel. */ -## This file is part of the superiotool project. -/* This file is part of the superiotool project */ -/* This file is part of uio_usbdebug */ Change-Id: I82d872b3b337388c93d5f5bf704e9ee9e53ab3a9 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41194 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
69 lines
2 KiB
C
69 lines
2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#ifndef __SYMBOLS_H
|
|
#define __SYMBOLS_H
|
|
|
|
#include <types.h>
|
|
|
|
extern u8 _dram[];
|
|
|
|
#define REGION_SIZE(name) (_e##name - _##name)
|
|
|
|
#define DECLARE_REGION(name) \
|
|
extern u8 _##name[]; \
|
|
extern u8 _e##name[];
|
|
|
|
DECLARE_REGION(sram)
|
|
DECLARE_REGION(timestamp)
|
|
DECLARE_REGION(preram_cbmem_console)
|
|
DECLARE_REGION(cbmem_init_hooks)
|
|
DECLARE_REGION(stack)
|
|
DECLARE_REGION(preram_cbfs_cache)
|
|
DECLARE_REGION(postram_cbfs_cache)
|
|
DECLARE_REGION(cbfs_cache)
|
|
DECLARE_REGION(fmap_cache)
|
|
DECLARE_REGION(tpm_tcpa_log)
|
|
|
|
/* Regions for execution units. */
|
|
|
|
DECLARE_REGION(payload)
|
|
/* "program" always refers to the current execution unit. */
|
|
DECLARE_REGION(program)
|
|
/* _<stage>_size is always the maximum amount allocated in memlayout, whereas
|
|
_program_size gives the actual memory footprint *used* by current stage. */
|
|
DECLARE_REGION(decompressor)
|
|
DECLARE_REGION(bootblock)
|
|
DECLARE_REGION(verstage)
|
|
DECLARE_REGION(romstage)
|
|
DECLARE_REGION(postcar)
|
|
DECLARE_REGION(ramstage)
|
|
|
|
/* Arch-specific, move to <arch/symbols.h> if they become too many. */
|
|
|
|
DECLARE_REGION(pagetables)
|
|
DECLARE_REGION(ttb)
|
|
DECLARE_REGION(ttb_subtables)
|
|
DECLARE_REGION(dma_coherent)
|
|
DECLARE_REGION(soc_registers)
|
|
DECLARE_REGION(framebuffer)
|
|
DECLARE_REGION(pdpt)
|
|
DECLARE_REGION(opensbi)
|
|
DECLARE_REGION(bl31)
|
|
|
|
/*
|
|
* Put this into a .c file accessing a linker script region to mark that region
|
|
* as "optional". If it is defined in memlayout.ld (or anywhere else), the
|
|
* values from that definition will be used. If not, start, end and size will
|
|
* all evaluate to 0. (We can't explicitly assign the symbols to 0 in the
|
|
* assembly due to https://sourceware.org/bugzilla/show_bug.cgi?id=1038.)
|
|
*/
|
|
#define DECLARE_OPTIONAL_REGION(name) asm (".weak _" #name ", _e" #name)
|
|
|
|
/* Returns true when pre-RAM symbols are known to the linker.
|
|
* (Does not necessarily mean that the memory is accessible.) */
|
|
static inline int preram_symbols_available(void)
|
|
{
|
|
return !CONFIG(ARCH_X86) || ENV_ROMSTAGE_OR_BEFORE;
|
|
}
|
|
|
|
#endif /* __SYMBOLS_H */
|