blob: 452dfcea97f76aed3536944fd4dc48d6d13d9e5d [file] [log] [blame]
Bin Meng89681a72018-12-12 06:12:45 -08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
4 *
5 * From arch/x86/lib/asm-offsets.c
6 *
7 * This program is used to generate definitions needed by
8 * assembly language modules.
9 */
10
11#include <common.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060012#include <asm/global_data.h>
Bin Meng89681a72018-12-12 06:12:45 -080013#include <linux/kbuild.h>
14
15int main(void)
16{
17 DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart));
Atish Patra111b8042020-04-21 11:15:01 -070018 DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr));
Nikita Shubin7e5e0292022-09-02 11:47:39 +030019#if !CONFIG_IS_ENABLED(XIP)
Rick Chen9c4d5c12022-09-21 14:34:54 +080020#ifdef CONFIG_AVAILABLE_HARTS
Lukas Auera3596652019-03-17 19:28:37 +010021 DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts));
Rick Chene5e6c362019-04-30 13:49:33 +080022#endif
Rick Chen9c4d5c12022-09-21 14:34:54 +080023#endif
Bin Meng89681a72018-12-12 06:12:45 -080024
25 return 0;
26}