From 36c83404a356b5dc379dbd46e25514e487f01ec8 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 1 Mar 2009 10:16:01 +0000 Subject: Some changes required to get yabel working on v2 (and they generally make sense, too). Have one u64 instead of three. In order to use the old bios emulator, you have to do nothing. (Default, if CONFIG_PCI_ROM_RUN is enabled) In order to use yabel in your target, you need to add the following lines to your config: uses CONFIG_PCI_OPTION_ROM_RUN_YABEL default CONFIG_PCI_OPTION_ROM_RUN_YABEL=1 In order to use vm86 in your target, you need to add the following lines to your config: uses CONFIG_PCI_OPTION_ROM_RUN_VM86 default CONFIG_PCI_OPTION_ROM_RUN_VM86=1 Note: vm86 only works on platforms with _RAMBASE in the lower megabyte. Signed-off-by: Stefan Reinauer Acked-by: Joseph Smith git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3965 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/include/cpu/x86/smm.h | 4 +--- src/include/string.h | 12 ++++++++++++ src/include/types.h | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/include/types.h (limited to 'src/include') diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 72a4782084..1eef6382c7 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -1,7 +1,7 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2008 coresystems GmbH + * Copyright (C) 2008-2009 coresystems GmbH * * 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 @@ -18,8 +18,6 @@ */ -typedef uint64_t u64; - /* AMD64 SMM State-Save Area * starts @ 0x7e00 */ diff --git a/src/include/string.h b/src/include/string.h index 25e741e810..d82b3ac1c4 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -81,6 +81,18 @@ static inline int strcmp(const char *s1, const char *s2) return r; } +static inline int strncmp(const char *s1, const char *s2, int maxlen) +{ + int i; + + for (i = 0; i < maxlen; i++) { + if (s1[i] != s2[i]) + return s1[i] - s2[i]; + } + + return 0; +} + static inline int isspace(int c) { switch (c) { diff --git a/src/include/types.h b/src/include/types.h new file mode 100644 index 0000000000..f433194473 --- /dev/null +++ b/src/include/types.h @@ -0,0 +1,25 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2009 coresystems GmbH + * + * 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; version 2 of the License. + * + * 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 __TYPES_H +#define __TYPES_H +#include +#include +#endif + -- cgit v1.2.3