blob: 8df67db65c391d29a7a9a65ce6b3d04599434eca [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Gabe Black27a4d072011-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 Black27a4d072011-11-29 18:05:07 +000012 */
13
14#include <common.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060015#include <asm/global_data.h>
Gabe Black27a4d072011-11-29 18:05:07 +000016#include <linux/kbuild.h>
17
18int main(void)
19{
Bin Meng8c5acf42014-12-12 21:05:22 +080020 DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
Park, Aiden6e3cc362019-08-03 08:30:12 +000021#ifdef CONFIG_USE_HOB
Bin Meng005f0af2014-12-12 21:05:31 +080022 DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
23#endif
Simon Glassf95ad8c2015-08-04 12:33:57 -060024 DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
Gabe Black27a4d072011-11-29 18:05:07 +000025 return 0;
26}