xref: /openbmc/u-boot/arch/x86/lib/asm-offsets.c (revision bceb9f0f)
1254d68b6SMasahiro Yamada /*
2254d68b6SMasahiro Yamada  * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
3254d68b6SMasahiro Yamada  *
4254d68b6SMasahiro Yamada  * This program is used to generate definitions needed by
5254d68b6SMasahiro Yamada  * assembly language modules.
6254d68b6SMasahiro Yamada  *
7254d68b6SMasahiro Yamada  * We use the technique used in the OSF Mach kernel code:
8254d68b6SMasahiro Yamada  * generate asm statements containing #defines,
9254d68b6SMasahiro Yamada  * compile this file to assembler, and then extract the
10254d68b6SMasahiro Yamada  * #defines from the assembly-language output.
11254d68b6SMasahiro Yamada  *
12254d68b6SMasahiro Yamada  * SPDX-License-Identifier:	GPL-2.0+
13254d68b6SMasahiro Yamada  */
14254d68b6SMasahiro Yamada 
15254d68b6SMasahiro Yamada #include <common.h>
16254d68b6SMasahiro Yamada #include <linux/kbuild.h>
17254d68b6SMasahiro Yamada 
18254d68b6SMasahiro Yamada int main(void)
19254d68b6SMasahiro Yamada {
20fe0c33a5SBin Meng 	DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
21*bceb9f0fSBin Meng #ifdef CONFIG_HAVE_FSP
22*bceb9f0fSBin Meng 	DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
23*bceb9f0fSBin Meng #endif
24254d68b6SMasahiro Yamada 	return 0;
25254d68b6SMasahiro Yamada }
26