Bin Meng | 89681a7 | 2018-12-12 06:12:45 -0800 | [diff] [blame] | 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> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 12 | #include <asm/global_data.h> |
Bin Meng | 89681a7 | 2018-12-12 06:12:45 -0800 | [diff] [blame] | 13 | #include <linux/kbuild.h> |
| 14 | |
| 15 | int main(void) |
| 16 | { |
| 17 | DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart)); |
Atish Patra | 111b804 | 2020-04-21 11:15:01 -0700 | [diff] [blame] | 18 | DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr)); |
Nikita Shubin | 7e5e029 | 2022-09-02 11:47:39 +0300 | [diff] [blame] | 19 | #if !CONFIG_IS_ENABLED(XIP) |
Rick Chen | 9c4d5c1 | 2022-09-21 14:34:54 +0800 | [diff] [blame] | 20 | #ifdef CONFIG_AVAILABLE_HARTS |
Lukas Auer | a359665 | 2019-03-17 19:28:37 +0100 | [diff] [blame] | 21 | DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts)); |
Rick Chen | e5e6c36 | 2019-04-30 13:49:33 +0800 | [diff] [blame] | 22 | #endif |
Rick Chen | 9c4d5c1 | 2022-09-21 14:34:54 +0800 | [diff] [blame] | 23 | #endif |
Bin Meng | 89681a7 | 2018-12-12 06:12:45 -0800 | [diff] [blame] | 24 | |
| 25 | return 0; |
| 26 | } |