switch-coreboot/include/globalvars.h
Ronald G. Minnich 1f7f46b442 With this change, we actually can start compiling. It's quite amazing just how
much of this builds. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@995 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-12 00:51:25 +00:00

68 lines
2.1 KiB
C

/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef GLOBALVARS_H
#define GLOBALVARS_H
/* you need to include all files that might be referenced in the global variables struct */
#include <console.h>
#include <types.h>
/* the sys_info struct is architecture-dependent, with parameters controlled from mainboard.h in some cases */
#ifdef CONFIG_CPU_AMD_K8
#include <mainboard.h>
#include <amd/k8/k8.h>
#include <amd/k8/sysconf.h>
#endif
#ifdef CONFIG_CPU_AMD_GEODELX
#include <amd_geodelx.h>
#endif
#ifdef CONFIG_BOARD_EMULATION_QEMU_X86
#include <qemu.h>
#endif
#ifdef CONFIG_CPU_VIA_C7
#include <via_c7.h>
#endif
#ifdef CONFIG_CPU_INTEL_CORE2
#include <northbridge/intel/i945/raminit.h>
#endif
/*
* struct global_vars is managed entirely from C code. Keep in mind that there
* is NO buffer at the end of the struct, so having zero-sized arrays at the
* end or similar stuff for which the compiler can't determine the final size
* will corrupt memory. If you don't try to be clever, everything will be fine.
*
* BIG FAT WARNING: Never write to global variables without using accessor
* functions. global_vars_init() is the place to call variable-specific
* initialization functions.
*/
struct global_vars {
#ifdef CONFIG_CONSOLE_BUFFER
struct printk_buffer *printk_buffer;
#endif
unsigned int loglevel;
/* these two values are of interest in many stages */
u32 init_detected;
struct sys_info sys_info;
/* has the spd hardware been set up? */
int spd_inited;
};
#endif /* GLOBALVARS_H */