drop COREBOOT_V2 and COREBOOT_V4 define. We're not sharing code with v3
authorStefan Reinauer <stepan@coresystems.de>
Tue, 19 Jan 2010 21:13:44 +0000 (21:13 +0000)
committerStefan Reinauer <stepan@openbios.org>
Tue, 19 Jan 2010 21:13:44 +0000 (21:13 +0000)
anymore so this ugly hack is no longer needed.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5040 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

20 files changed:
Makefile
src/Kconfig
src/config/Options.lb
util/compareboard/compareboard
util/x86emu/biosemu.c
util/x86emu/include/x86emu/x86emu.h
util/x86emu/x86.c
util/x86emu/x86_interrupts.c
util/x86emu/x86emu/sys.c
util/x86emu/yabel/biosemu.c
util/x86emu/yabel/compat/functions.c
util/x86emu/yabel/debug.c
util/x86emu/yabel/debug.h
util/x86emu/yabel/device.c
util/x86emu/yabel/device.h
util/x86emu/yabel/interrupt.c
util/x86emu/yabel/io.c
util/x86emu/yabel/mem.c
util/x86emu/yabel/pmm.c
util/x86emu/yabel/vbe.c

index 302ac9de9cdfc2d62b98675b377ebc46cdc2564d..c7a838146a12651c7fec999207c43c7d71fb4b34 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
 ##
 ## Copyright (C) 2008 Advanced Micro Devices, Inc.
 ## Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2009-2010 coresystems GmbH
 ##
 ## Redistribution and use in source and binary forms, with or without
 ## modification, are permitted provided that the following conditions
@@ -44,7 +45,6 @@ export config_g := $(sconfig)/config.g
 export KERNELVERSION      := 2.3
 export KCONFIG_AUTOHEADER := $(obj)/config.h
 export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
-export COREBOOT_V2     := 1
 
 CONFIG_SHELL := sh
 KBUILD_DEFCONFIG := configs/defconfig
@@ -271,7 +271,6 @@ prepare2:
        @printf "    GEN        build.h\n"
        printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.h
        printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.h
-       printf "#define COREBOOT_V2 \"$(COREBOOT_V2)\"\n" >> $(obj)/build.h
        printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.h
        printf "\n" >> $(obj)/build.h
        printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | head -n1)\"\n" >> $(obj)/build.h
index 20a1a13f6b2c16f3341d1a75fb625c42803a4631..a7d9cfb49a61f915dbbbd79f6f6e6df1b3b422e3 100644 (file)
@@ -115,14 +115,6 @@ config HEAP_SIZE
        hex
        default 0x4000
 
-config COREBOOT_V2
-       bool
-       default y
-
-config COREBOOT_V4
-       bool
-       default y
-
 config DEBUG
        bool
        default n
index 613111a3a272169415e7f017e83ad45cf3b59ff7..9af3daf93de9b7f869afbc2b5fcef15aaa75c537 100644 (file)
@@ -176,12 +176,6 @@ define CONFIG_USE_INIT
        comment "Use stage 1 initialization code"
 end
 
-define CONFIG_COREBOOT_V2
-       default 1
-       export always
-       comment "This is used by code to determine v2 vs v3"
-end
-
 ###############################################
 # ROM image options
 ###############################################
index 8ccbca19d1cf6424ca7582fd29db740506bcc81e..4b92fb8fe600462772dbbb51efa23ae69ecf03bd 100755 (executable)
@@ -89,7 +89,6 @@ sed \
        -e "/^CONFIG_SUPERIO_/ d" \
        -e "/^CONFIG_GX1_VIDEOMODE_/ d" \
        -e "/^CONFIG_CONSOLE_/ d" \
-       -e "/^CONFIG_COREBOOT_V4/ d" \
        -e "/^CONFIG_PAYLOAD_/ d" \
        -e "/^CONFIG_XIP_ROM_/ d" \
        -e "/^CONFIG_MULTIBOOT/ d" \
index c773539c3e7e4523e31791c14215f7e74800e72d..b847bb010926c2702597422190f4a5ed84694859 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 #include <string.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/io.h>
 #include <console/console.h>
-#else
-#include <io.h>
-#include <console.h>
-#endif
 #include <device/device.h>
 #include <device/pci.h>
 #include <device/pci_ids.h>
@@ -243,11 +238,7 @@ static int int1a_handler(void)
                break;
        case FIND_PCI_DEVICE:
                /* FIXME: support SI != 0 */
-#ifdef CONFIG_COREBOOT_V2
                dev = dev_find_device(X86_DX, X86_CX, dev);
-#else
-               dev = dev_find_pci_device(X86_DX, X86_CX, dev);
-#endif
                if (dev != 0) {
                        X86_BH = dev->bus->secondary;
                        X86_BL = dev->path.pci.devfn;
index 04381627c75432679d23ff4e326ca84f52bbcf10..60acfe763c569c17a529732ecf830c3814d90d3d 100644 (file)
@@ -43,7 +43,6 @@
 #define __X86EMU_X86EMU_H
 
 /* FIXME: redefine printk for the moment */
-#ifdef CONFIG_COREBOOT_V2
 #include <stddef.h>
 #include <console/console.h>
 #undef printk
@@ -51,9 +50,6 @@
 #if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0)
 #undef CONFIG_DEBUG
 #endif
-#else
-#define printk printf
-#endif 
 
 #ifdef SCITECH
 #include "scitech.h"
index 342bb6ef779bda50a040954b797a7802f1afd069..5644648b84ff56c369cb4872879ae41d258ffbef 100644 (file)
 #include <device/pci.h>
 #include <string.h>
 
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/io.h>
 #include <arch/registers.h>
 #include <console/console.h>
 #define printk(x...) do_printk(x)
-#else
-#include <console.h>
-#endif
 
 #include <arch/interrupt.h>
 
index a792fdff1beca1ad7b03d7cf3746b4decf9520c0..a21a0ab9882a689c5b547c72b2aadbc13476438c 100644 (file)
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include <string.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <console/console.h>
 #include <arch/io.h>
 #include <arch/registers.h>
 #define printk(x...) do_printk(x)
-#else
-#include <console.h>
-#include <io.h>
-#endif
 
 enum {
        PCIBIOS_CHECK = 0xb101,
@@ -88,11 +83,7 @@ int int1a_handler(struct eregs *regs)
                vendorid = regs->edx;
                devindex = regs->esi;
                dev = 0;
-#ifdef CONFIG_COREBOOT_V2
                while ((dev = dev_find_device(vendorid, devid, dev))) {
-#else
-               while ((dev = dev_find_pci_device(vendorid, devid, dev))) {
-#endif
                        if (devindex <= 0)
                                break;
                        devindex--;
index ffdfe90da9d17a31ca29005a2c052b7f02873e89..b4bed43ba45cfb71e970988d47a931ece5192608 100644 (file)
 #include "debug.h"
 #include "prim_ops.h"
 #if 1 /* Coreboot needs to map prinkf to printk. */
-#ifdef CONFIG_COREBOOT_V2
 #include "arch/io.h"
 #else
-#include "io.h"
-#endif
-#else
 #include <sys/io.h>
 #endif
 
index 04c440d0a67ea60213ce77131feeab0aa62b91f0..096af166884b14d661ca468757d85aebdaf9e590 100644 (file)
 #include <string.h>
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 
 #include "debug.h"
 
 #include <x86emu/x86emu.h>
 #include <x86emu/regs.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>   // for push_word
-#endif
 
 #include "biosemu.h"
 #include "io.h"
 #include "device.h"
 #include "pmm.h"
 
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include <rtas.h>
-#endif
 
 #include <device/device.h>
 
index 904f786bf6a3ad31103b2a70df61f1070899dc3e..600b0ba38a7a254eed36fe60fc3a822d208c8354 100644 (file)
@@ -14,9 +14,6 @@
  */
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <config.h>
-#endif
 #include <string.h>
 #include <device/device.h>
 
index fdac469d7ff35e6b0291d4a02a5ac271875319fb..7cda8af0b1d7a80c7000bdc1224bf3b0db7fdcf9 100644 (file)
  *     IBM Corporation - initial implementation
  *****************************************************************************/
 
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
-
 #include "debug.h"
 
 u32 debug_flags = 0;
index 8126262ed9ab3cd69fb79a338f6bb4e50341f25a..484a0f7ade809e4518e1d9078b2232bc276305c3 100644 (file)
@@ -20,11 +20,7 @@ extern u32 debug_flags;
 extern void x86emu_dump_xregs(void);
 
 /* printf is not available in coreboot... use printk */
-#ifdef CONFIG_COREBOOT_V2
 #include <console/console.h>
-#else
-#include <console.h>
-#endif
 /* uurgs... yuck... x86emu/x86emu.h is redefining printk... we include it here
  * and use its redefinition of printk
  * TODO: FIX!!!! */
index d5c114ccb698a1477df54824dea94a51f14f12a5..6804c6675598a6dd6fff7a527dad1bcc8e21ca5a 100644 (file)
 
 
 #include "device.h"
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include "rtas.h"
-#endif
 #include <string.h>
 #include "debug.h"
 
@@ -397,11 +393,7 @@ biosemu_dev_init(struct device * device)
 {
        u8 rval = 0;
        //init bios_device struct
-#ifdef CONFIG_COREBOOT_V2
        DEBUG_PRINTF("%s\n", __func__);
-#else
-       DEBUG_PRINTF("%s(%s)\n", __func__, device->dtsname);
-#endif
        memset(&bios_device, 0, sizeof(bios_device));
 
 #ifndef CONFIG_PCI_OPTION_ROM_RUN_YABEL
index b3503419470619335da567b07a60413044b566ab..dbbd28d5e89981cd1b61eea5272c9822c0638002 100644 (file)
 #define DEVICE_LIB_H
 
 #include <types.h>
-#ifdef CONFIG_COREBOOT_V2
 #include <arch/byteorder.h>
 #include "compat/of.h"
-#else
-#include <cpu.h>
-#include <byteorder.h>
-#include "of.h"
-#endif
 #include "debug.h"
 
 
index 5542588571a9b16e4cae0d24d4eb21487b482ff6..79b0899a08a2f1d99af2a5ca8077cfa5cb034d1c 100644 (file)
  *     IBM Corporation - initial implementation
  *****************************************************************************/
 
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
-#else
-#include <rtas.h>
-#endif
 
 #include "biosemu.h"
 #include "mem.h"
 #include "pmm.h"
 
 #include <x86emu/x86emu.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>
-#endif
 
 #ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL
 #include <device/pci.h>
@@ -350,11 +342,7 @@ handleInt1a(void)
                                  __func__, M.x86.R_AX);
                /* FixME: support SI != 0 */
 #if defined(CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES) && CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES==1
-#ifdef CONFIG_COREBOOT_V2
                dev = dev_find_device(M.x86.R_DX, M.x86.R_CX, 0);
-#else
-               dev = dev_find_pci_device(M.x86.R_DX, M.x86.R_CX, 0);
-#endif
                if (dev != 0) {
                        DEBUG_PRINTF_INTR
                            ("%s(): function %x: PCI Find Device --> 0x%04x\n",
index c2e6da818daa4050a2c47c9f16b4262cad3fc9c7..fd205e4dd6d24b7ad42bd924f0a43b6af7b6015d 100644 (file)
  *****************************************************************************/
 
 #include <types.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/rtas.h"
 #include "compat/time.h"
-#else
-#include <cpu.h>
-#include "rtas.h"
-#include <time.h>
-#endif
 #include "device.h"
 #include "debug.h"
 #include <x86emu/x86emu.h>
@@ -36,7 +30,7 @@ extern int write_io(void *, unsigned int, size_t);
 //defined in net-snk/kernel/timer.c
 extern u64 get_time(void);
 
-#ifdef COREBOOT_V2
+#ifdef CONFIG_ARCH_X86
 #include <arch/io.h>
 #else
 // these are not used, only needed for linking,  must be overridden using X86emu_setupPioFuncs
index 91dc3da3f9b50a8780cba0c0d971bc166f8ce947..339e59f61e95d91ec5bc3bf29364b4736d80c83c 100644 (file)
  *****************************************************************************/
 
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 #include "debug.h"
 #include "device.h"
 #include "x86emu/x86emu.h"
 #include "biosemu.h"
-#ifdef CONFIG_COREBOOT_V2
 #include "compat/time.h"
-#else
-#include <time.h>
-#endif
 
 // define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
 #ifdef CONFIG_DEBUG
index 0b78ca53301868eed504ee308701d3ff878bbb8b..ad4dc6834c4c403a4bb3df0c036464bea76c096d 100644 (file)
  ****************************************************************************/
 
 #include <x86emu/x86emu.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>
-#endif
 #include <string.h>
 
 #include "biosemu.h"
index a2c9f8265584e4c8f00fb3c8028cfadbfe37f6eb..db60630771f9cf6d52cc4bd91b469c5b0c762679 100644 (file)
 
 #include <string.h>
 #include <types.h>
-#ifndef CONFIG_COREBOOT_V2
-#include <cpu.h>
-#endif
 
 #include "debug.h"
 
 #include <x86emu/x86emu.h>
 #include <x86emu/regs.h>
-#ifdef CONFIG_COREBOOT_V2
 #include "../x86emu/prim_ops.h"
-#else
-#include <x86emu/prim_ops.h>   // for push_word
-#endif
 
 #include "biosemu.h"
 #include "io.h"