mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 16:39:35 +00:00
42fde30500
The EFI stub provides information to U-Boot in a table. This includes the memory map which is needed to decide where to relocate U-Boot. Collect this information in the early init code and store it in global_data. Fix up the BIST code at the same time since we don't have it when booting from EFI and can assume it is 0. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
26 lines
675 B
C
26 lines
675 B
C
/*
|
|
* Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
|
|
*
|
|
* This program is used to generate definitions needed by
|
|
* assembly language modules.
|
|
*
|
|
* We use the technique used in the OSF Mach kernel code:
|
|
* generate asm statements containing #defines,
|
|
* compile this file to assembler, and then extract the
|
|
* #defines from the assembly-language output.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <linux/kbuild.h>
|
|
|
|
int main(void)
|
|
{
|
|
DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
|
|
#ifdef CONFIG_HAVE_FSP
|
|
DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
|
|
#endif
|
|
DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
|
|
return 0;
|
|
}
|