blob: 8df67db65c391d29a7a9a65ce6b3d04599434eca [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Gabe Blackef5a5b02011-11-29 18:05:07 +00002/*
3 * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
4 *
5 * This program is used to generate definitions needed by
6 * assembly language modules.
7 *
8 * We use the technique used in the OSF Mach kernel code:
9 * generate asm statements containing #defines,
10 * compile this file to assembler, and then extract the
11 * #defines from the assembly-language output.
Gabe Blackef5a5b02011-11-29 18:05:07 +000012 */
13
14#include <common.h>
Simon Glass401d1c42020-10-30 21:38:53 -060015#include <asm/global_data.h>
Gabe Blackef5a5b02011-11-29 18:05:07 +000016#include <linux/kbuild.h>
17
18int main(void)
19{
Bin Mengfe0c33a2014-12-12 21:05:22 +080020 DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
Park, Aiden544293f2019-08-03 08:30:12 +000021#ifdef CONFIG_USE_HOB
Bin Mengbceb9f02014-12-12 21:05:31 +080022 DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
23#endif
Simon Glass42fde3052015-08-04 12:33:57 -060024 DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
Gabe Blackef5a5b02011-11-29 18:05:07 +000025 return 0;
26}