1 // 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 <asm/global_data.h> 13 #include <linux/kbuild.h> 14 main(void)15int main(void) 16 { 17 DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart)); 18 DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr)); 19 #ifndef CONFIG_XIP 20 DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts)); 21 #endif 22 23 return 0; 24 } 25