]>
Commit | Line | Data |
---|---|---|
2262cfee | 1 | /* |
91a76751 | 2 | * (C) Copyright 2002-2010 |
2262cfee WD |
3 | * Wolfgang Denk, DENX Software Engineering, [email protected]. |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
2262cfee WD |
6 | */ |
7 | ||
8 | #ifndef __ASM_GBL_DATA_H | |
9 | #define __ASM_GBL_DATA_H | |
5cb48582 SG |
10 | |
11 | #ifndef __ASSEMBLY__ | |
12 | ||
13 | /* Architecture-specific global data */ | |
14 | struct arch_global_data { | |
5a35e6c4 | 15 | struct global_data *gd_addr; /* Location of Global Data */ |
bc2df1af SG |
16 | uint64_t tsc_base; /* Initial value returned by rdtsc() */ |
17 | uint32_t tsc_base_kclocks; /* Initial tsc as a kclocks value */ | |
18 | uint32_t tsc_prev; /* For show_boot_progress() */ | |
f697d528 | 19 | void *new_fdt; /* Relocated FDT */ |
f67cd51e | 20 | uint32_t bist; /* Built-in self test value */ |
5cb48582 SG |
21 | }; |
22 | ||
9558b48a | 23 | #endif |
2262cfee | 24 | |
43cff66e SG |
25 | #include <asm-generic/global_data.h> |
26 | ||
27 | #ifndef __ASSEMBLY__ | |
d8819f94 | 28 | static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void) |
9e6c572f GR |
29 | { |
30 | gd_t *gd_ptr; | |
31 | ||
32 | asm volatile("fs movl 0, %0\n" : "=r" (gd_ptr)); | |
33 | ||
34 | return gd_ptr; | |
35 | } | |
36 | ||
37 | #define gd get_fs_gd_ptr() | |
161b3589 GR |
38 | |
39 | #endif | |
40 | ||
91d82a29 GB |
41 | /* |
42 | * Our private Global Data Flags | |
43 | */ | |
44 | #define GD_FLG_COLD_BOOT 0x00100 /* Cold Boot */ | |
45 | #define GD_FLG_WARM_BOOT 0x00200 /* Warm Boot */ | |
46 | ||
3ef96ded | 47 | #define DECLARE_GLOBAL_DATA_PTR |
2262cfee WD |
48 | |
49 | #endif /* __ASM_GBL_DATA_H */ |