1 /*
2  * This file is part of the libpayload project.
3  *
4  * Copyright (C) 2008 Advanced Micro Devices, Inc.
5  *
6  * SPDX-License-Identifier:	BSD-3-Clause
7  */
8 
9 #ifndef _COREBOOT_SYSINFO_H
10 #define _COREBOOT_SYSINFO_H
11 
12 #include <common.h>
13 #include <compiler.h>
14 #include <libfdt.h>
15 #include <asm/arch/tables.h>
16 
17 /* Allow a maximum of 16 memory range definitions. */
18 #define SYSINFO_MAX_MEM_RANGES 16
19 /* Allow a maximum of 8 GPIOs */
20 #define SYSINFO_MAX_GPIOS 8
21 
22 struct sysinfo_t {
23 	int n_memranges;
24 	struct memrange {
25 		unsigned long long base;
26 		unsigned long long size;
27 		unsigned int type;
28 	} memrange[SYSINFO_MAX_MEM_RANGES];
29 
30 	u32 cmos_range_start;
31 	u32 cmos_range_end;
32 	u32 cmos_checksum_location;
33 	u32 vbnv_start;
34 	u32 vbnv_size;
35 
36 	char *version;
37 	char *extra_version;
38 	char *build;
39 	char *compile_time;
40 	char *compile_by;
41 	char *compile_host;
42 	char *compile_domain;
43 	char *compiler;
44 	char *linker;
45 	char *assembler;
46 
47 	struct cb_framebuffer *framebuffer;
48 
49 	int num_gpios;
50 	struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
51 
52 	void	*vdat_addr;
53 	u32	vdat_size;
54 	void	*tstamp_table;
55 	void	*cbmem_cons;
56 
57 	struct cb_serial *serial;
58 };
59 
60 extern struct sysinfo_t lib_sysinfo;
61 
62 #endif
63