blob: 7b2905dda56c4df16224946f11c19657c282d481 [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
Simon Glass401d1c42020-10-30 21:38:53 -060014#include <asm/global_data.h>
Gabe Blackef5a5b02011-11-29 18:05:07 +000015#include <linux/kbuild.h>
16
17int main(void)
18{
Bin Mengfe0c33a2014-12-12 21:05:22 +080019 DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
Park, Aiden544293f2019-08-03 08:30:12 +000020#ifdef CONFIG_USE_HOB
Bin Mengbceb9f02014-12-12 21:05:31 +080021 DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
22#endif
Simon Glass42fde3052015-08-04 12:33:57 -060023 DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
Gabe Blackef5a5b02011-11-29 18:05:07 +000024 return 0;
25}