blob: 90dce22b25486ae06fab54c12410df884bdbe34a [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>
15#include <linux/kbuild.h>
16
17int main(void)
18{
Bin Meng8c5acf42014-12-12 21:05:22 +080019 DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
Bin Meng005f0af2014-12-12 21:05:31 +080020#ifdef CONFIG_HAVE_FSP
21 DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
22#endif
Simon Glassf95ad8c2015-08-04 12:33:57 -060023 DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
Gabe Black27a4d072011-11-29 18:05:07 +000024 return 0;
25}