Author: stepan Date: 2009-03-01 11:16:01 +0100 (Sun, 01 Mar 2009) New Revision: 3965
Added: trunk/coreboot-v2/src/include/types.h Removed: trunk/coreboot-v2/src/devices/emulator/ Modified: trunk/coreboot-v2/src/arch/i386/boot/multiboot.c trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h trunk/coreboot-v2/src/arch/i386/include/stdint.h trunk/coreboot-v2/src/config/Options.lb trunk/coreboot-v2/src/devices/Config.lb trunk/coreboot-v2/src/include/cpu/x86/smm.h trunk/coreboot-v2/src/include/string.h trunk/coreboot-v2/util/ Log: 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 stepan@coresystems.de Acked-by: Joseph Smith joe@settoplinux.org
Modified: trunk/coreboot-v2/src/arch/i386/boot/multiboot.c =================================================================== --- trunk/coreboot-v2/src/arch/i386/boot/multiboot.c 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/arch/i386/boot/multiboot.c 2009-03-01 10:16:01 UTC (rev 3965) @@ -23,8 +23,6 @@ #include <device/resource.h> #include <console/console.h>
-typedef unsigned long long u64; - static struct multiboot_mmap_entry *mb_mem; struct multiboot_info *mbi;
Modified: trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h =================================================================== --- trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-03-01 10:16:01 UTC (rev 3965) @@ -18,7 +18,6 @@ #if HAVE_ACPI_TABLES==1
#include <stdint.h> -typedef unsigned long long u64;
#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ #define RSDP_NAME "RSDP"
Modified: trunk/coreboot-v2/src/arch/i386/include/stdint.h =================================================================== --- trunk/coreboot-v2/src/arch/i386/include/stdint.h 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/arch/i386/include/stdint.h 2009-03-01 10:16:01 UTC (rev 3965) @@ -65,11 +65,13 @@ typedef unsigned long int uintmax_t; #endif
-#undef __HAVE_LONG_LONG__ - typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; +#if __HAVE_LONG_LONG__ +typedef uint64_t u64; +#endif
+#undef __HAVE_LONG_LONG__
#endif /* I386_STDINT_H */
Modified: trunk/coreboot-v2/src/config/Options.lb =================================================================== --- trunk/coreboot-v2/src/config/Options.lb 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/config/Options.lb 2009-03-01 10:16:01 UTC (rev 3965) @@ -168,6 +168,12 @@ comment "Use stage 1 initialization code" end
+define COREBOOT_V2 + default 1 + export always + comment "This is used by code to determine v2 vs v3" +end + ############################################### # ROM image options ############################################### @@ -1068,6 +1074,18 @@ comment "Init x86 ROMs on all PCI devices" end
+define CONFIG_PCI_OPTION_ROM_RUN_YABEL + default 0 + export used + comment "Use Yabel instead of old bios emulator" +end + +define CONFIG_PCI_OPTION_ROM_RUN_VM86 + default 0 + export used + comment "Use Yabel instead of old bios emulator" +end + define CONFIG_PCI_64BIT_PREF_MEM default 0 export always
Modified: trunk/coreboot-v2/src/devices/Config.lb =================================================================== --- trunk/coreboot-v2/src/devices/Config.lb 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/devices/Config.lb 2009-03-01 10:16:01 UTC (rev 3965) @@ -1,5 +1,6 @@ uses CONFIG_PCI_ROM_RUN uses CONFIG_VGA_ROM_RUN + object device.o object root_device.o object device_util.o @@ -15,10 +16,10 @@
if CONFIG_PCI_ROM_RUN object pci_rom.o - dir emulator + dir ../../util/x86emu else if CONFIG_VGA_ROM_RUN object pci_rom.o - dir emulator + dir ../../util/x86emu end end
Modified: trunk/coreboot-v2/src/include/cpu/x86/smm.h =================================================================== --- trunk/coreboot-v2/src/include/cpu/x86/smm.h 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/include/cpu/x86/smm.h 2009-03-01 10:16:01 UTC (rev 3965) @@ -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 */
Modified: trunk/coreboot-v2/src/include/string.h =================================================================== --- trunk/coreboot-v2/src/include/string.h 2009-02-28 20:10:20 UTC (rev 3964) +++ trunk/coreboot-v2/src/include/string.h 2009-03-01 10:16:01 UTC (rev 3965) @@ -81,6 +81,18 @@ 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) {
Added: trunk/coreboot-v2/src/include/types.h =================================================================== --- trunk/coreboot-v2/src/include/types.h (rev 0) +++ trunk/coreboot-v2/src/include/types.h 2009-03-01 10:16:01 UTC (rev 3965) @@ -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 <stdint.h> +#include <stddef.h> +#endif +
Property changes on: trunk/coreboot-v2/util ___________________________________________________________________ Modified: svn:externals - flashrom svn://coreboot.org/repos/trunk/util/flashrom nvramtool svn://coreboot.org/repos/trunk/util/nvramtool superiotool svn://coreboot.org/repos/trunk/util/superiotool getpir svn://coreboot.org/repos/trunk/util/getpir mptable svn://coreboot.org/repos/trunk/util/mptable inteltool svn://coreboot.org/repos/trunk/util/inteltool
+ x86emu svn://coreboot.org/repository/coreboot-v3/util/x86emu