2 * (C) Copyright 2002-2010
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __ASM_GBL_DATA_H
9 #define __ASM_GBL_DATA_H
13 enum pei_boot_mode_t {
27 uint64_t total_memory;
28 uint64_t total_32bit_memory;
29 struct memory_area area[CONFIG_NR_DRAM_BANKS];
32 /* Architecture-specific global data */
33 struct arch_global_data {
34 struct global_data *gd_addr; /* Location of Global Data */
35 uint8_t x86; /* CPU family */
36 uint8_t x86_vendor; /* CPU vendor */
40 uint64_t tsc_base; /* Initial value returned by rdtsc() */
41 uint32_t tsc_base_kclocks; /* Initial tsc as a kclocks value */
42 uint32_t tsc_prev; /* For show_boot_progress() */
43 uint32_t tsc_mhz; /* TSC frequency in MHz */
44 void *new_fdt; /* Relocated FDT */
45 uint32_t bist; /* Built-in self test value */
46 struct pci_controller *hose; /* PCI hose for early use */
47 enum pei_boot_mode_t pei_boot_mode;
48 const struct pch_gpio_map *gpio_map; /* board GPIO map */
49 struct memory_info meminfo; /* Memory information */
54 #include <asm-generic/global_data.h>
57 static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void)
61 asm volatile("fs movl 0, %0\n" : "=r" (gd_ptr));
66 #define gd get_fs_gd_ptr()
71 * Our private Global Data Flags
73 #define GD_FLG_COLD_BOOT 0x00100 /* Cold Boot */
74 #define GD_FLG_WARM_BOOT 0x00200 /* Warm Boot */
76 #define DECLARE_GLOBAL_DATA_PTR
78 #endif /* __ASM_GBL_DATA_H */