blob: 7301c1b98e2363a011e5c06b6268812ed01a6325 [file] [log] [blame]
Bin Meng51ab4572018-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>
12#include <linux/kbuild.h>
13
14int main(void)
15{
16 DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart));
Atish Patrad4ea6492020-04-21 11:15:01 -070017 DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr));
Rick Chenbdce3892019-04-30 13:49:33 +080018#ifndef CONFIG_XIP
Lukas Auer3dea63c2019-03-17 19:28:37 +010019 DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts));
Rick Chenbdce3892019-04-30 13:49:33 +080020#endif
Bin Meng51ab4572018-12-12 06:12:45 -080021
22 return 0;
23}