mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
smbus. Set up a global var variable called spd_inited. It is set when spd is inited. For simple cases, nothing is visible to initram main. For complex cases, initram main can do the work and set this variable. This compiles and runs on dbe62, which is actually meaningless since dbe62 has not smbus, but hey ... Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@863 f3766cd6-281f-0410-b1cd-43a5c92072e9
60 lines
2 KiB
C
60 lines
2 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
|
|
|
|
/*
|
|
* 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 */
|