summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Config9
-rw-r--r--src/core/config.c54
-rw-r--r--src/drivers/bus/isa.c20
-rw-r--r--src/include/isa.h7
4 files changed, 33 insertions, 57 deletions
diff --git a/src/Config b/src/Config
index c92efa73d..2fc9683cc 100644
--- a/src/Config
+++ b/src/Config
@@ -304,10 +304,6 @@ CFLAGS+= -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC
# CFLAGS+= -DDHCP_USER_CLASS="5,'A','L','P','H','A',4,'B','E','T','A'" \
# -DDHCP_USER_CLASS_LEN=11
-# for btext console support
-# CFLAGS+= -DCONSOLE_BTEXT
-# for direct PC kbd support
-# CFLAGS+= -DCONSOLE_PC_KBD
# Set to enable FILO support
# for FILO support it will make main call pci_init
# INCLUDE_FILO=y
@@ -374,11 +370,6 @@ CFLAGS+= -DPXE_IMAGE -DPXE_EXPORT
# CFLAGS+= -DBUILD_SERIAL
# CFLAGS+= -DBUILD_SERIAL -DBUILD_ID=\"testing\"
-# Do not relocate
-# core/relocate.c should really be moved to an arch specific directory
-# but this is here for archs that don't support relocation
-# CFLAGS+= -DNORELOCATE
-
diff --git a/src/core/config.c b/src/core/config.c
index 54158396a..ebf9d256e 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -8,6 +8,9 @@
#include "etherboot.h"
#include "dev.h"
#include "console.h"
+
+#include "config/general.h"
+
#ifdef BUILD_SERIAL
#include ".buildserial.h"
#define xstr(s) str(s)
@@ -107,44 +110,35 @@ void print_config ( void ) {
/*
* Drag in all requested console types
*
- * At least one of the CONSOLE_xxx has to be set. CONSOLE_DUAL sets
- * both CONSOLE_FIRMWARE and CONSOLE_SERIAL for legacy compatibility.
- * If no CONSOLE_xxx is set, CONSOLE_FIRMWARE is assumed.
+ * CONSOLE_DUAL sets both CONSOLE_FIRMWARE and CONSOLE_SERIAL for
+ * legacy compatibility.
*
*/
-#ifdef CONSOLE_CRT
-#define CONSOLE_FIRMWARE
-#endif
-
-#ifdef CONSOLE_DUAL
-#undef CONSOLE_FIRMWARE
-#define CONSOLE_FIRMWARE
-#undef CONSOLE_SERIAL
-#define CONSOLE_SERIAL
+#if CONSOLE_DUAL
+#undef CONSOLE_FIRMWARE
+#define CONSOLE_FIRMWARE 1
+#undef CONSOLE_SERIAL
+#define CONSOLE_SERIAL 1
#endif
-#if !defined(CONSOLE_FIRMWARE) && !defined(CONSOLE_SERIAL)
-#define CONSOLE_FIRMWARE
-#endif
-
-#ifdef CONSOLE_FIRMWARE
+#if CONSOLE_FIRMWARE
REQUIRE_OBJECT ( bios_console );
#endif
-#ifdef CONSOLE_SERIAL
+#if CONSOLE_SERIAL
REQUIRE_OBJECT ( serial );
#endif
-#ifdef CONSOLE_DIRECT_VGA
+#if CONSOLE_DIRECT_VGA
REQUIRE_OBJECT ( video_subr );
#endif
-#ifdef CONSOLE_BTEXT
+#if CONSOLE_BTEXT
REQUIRE_OBJECT ( btext );
#endif
-#ifdef CONSOLE_PC_KBD
+#if CONSOLE_PC_KBD
REQUIRE_OBJECT ( pc_kbd );
#endif
@@ -153,22 +147,6 @@ REQUIRE_OBJECT ( pc_kbd );
*
*/
-#ifndef NORELOCATE
+#if RELOCATE
REQUIRE_OBJECT ( relocate );
#endif
-
-/*
- * Allow ISA probe address list to be overridden
- *
- */
-#include "isa.h"
-#ifndef ISA_PROBE_ADDRS
-#define ISA_PROBE_ADDRS
-#endif
-
-isa_probe_addr_t isa_extra_probe_addrs[] = {
- ISA_PROBE_ADDRS
-};
-
-unsigned int isa_extra_probe_addr_count
- = sizeof ( isa_extra_probe_addrs ) / sizeof ( isa_extra_probe_addrs[0] );
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c
index 4fb06be9e..99784cc0f 100644
--- a/src/drivers/bus/isa.c
+++ b/src/drivers/bus/isa.c
@@ -1,4 +1,5 @@
#include "string.h"
+#include "config/isa.h"
#include "isa.h"
/*
@@ -28,6 +29,19 @@ DEV_BUS( struct isa_device, isa_dev );
static char isa_magic[0]; /* guaranteed unique symbol */
/*
+ * User-supplied probe address list
+ *
+ */
+static isa_probe_addr_t isa_extra_probe_addrs[] = {
+ ISA_PROBE_ADDRS
+#if ISA_PROBE_ONLY
+ , 0
+#endif
+};
+#define isa_extra_probe_addr_count \
+ ( sizeof ( isa_extra_probe_addrs ) / sizeof ( isa_extra_probe_addrs[0] ) )
+
+/*
* Find an ISA device matching the specified driver
*
*/
@@ -41,8 +55,8 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
isa->magic = isa_magic;
}
- /* Iterate through any ISA probe addresses specified by
- * config.c, starting where we left off.
+ /* Iterate through any ISA probe addresses specified by the
+ * user, starting where we left off.
*/
DBG ( "ISA searching for device matching driver %s\n", driver->name );
for ( i = isa->probe_idx ; i < isa_extra_probe_addr_count ; i++ ) {
@@ -51,7 +65,7 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
isa->already_tried = 0;
continue;
}
-
+
/* Set I/O address */
ioaddr = isa_extra_probe_addrs[i];
diff --git a/src/include/isa.h b/src/include/isa.h
index a76e526b7..7d67502fe 100644
--- a/src/include/isa.h
+++ b/src/include/isa.h
@@ -66,12 +66,5 @@ extern int find_isa_device ( struct isa_device *eisa,
extern int find_isa_boot_device ( struct dev *dev,
struct isa_driver *driver );
-/*
- * config.c defines isa_extra_probe_addrs and isa_extra_probe_addr_count.
- *
- */
-extern isa_probe_addr_t isa_extra_probe_addrs[];
-extern unsigned int isa_extra_probe_addr_count;
-
#endif /* ISA_H */