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