Skip to contentSkip to conversation

2.6.5-rc2{,-mm1} i386 probe_roms() damage

PATCH New Rene Herman 1 participant 1 message Mar 21, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 2.6.5-rc2{,-mm1} i386 probe_roms() damage

Hi Andrew,

as said (see 0/2) this patch doesn't change any code, just moves stuff from the "mach_resources.h" header to a "std_resources.c" subarch specific file, and introduces a "std_resources.h" header for the prototypes.

Hope those names are okay. I first put this in the subarch "setup.c",
noticed it seemed very out of place there, moved it to
"legacy_resources.[ch]", found that name to be a bit long, renamed them to "legacy.[ch]", found that to be too generic a name, and settled on this one...

Rene.

arch/i386/kernel/setup.c +3 -18
diff -urN linux-2.6.5-rc2-mm1.orig/arch/i386/kernel/setup.c linux-2.6.5-rc2-mm1/arch/i386/kernel/setup.c
@@ -47,8 +47,8 @@
 #include <asm/sections.h>
 #include <asm/io_apic.h>
 #include <asm/ist.h>
+#include <asm/std_resources.h>
 #include "setup_arch_pre.h"
-#include "mach_resources.h"
 
 /* This value is set up by the early boot code to point to the value
    immediately after the boot time page tables.  It contains a *physical*
@@ -134,19 +134,6 @@
 static struct resource code_resource = { "Kernel code", 0x100000, 0 };
 static struct resource data_resource = { "Kernel data", 0, 0 };
 
-static void __init probe_roms(void)
-{
-	int roms = 1;
-
-	request_resource(&iomem_resource, rom_resources+0);
-
-	/* Video ROM is standard at C000:0000 - C7FF:0000, check signature */
-	probe_video_rom(roms);
-
-	/* Extension roms */
-	probe_extension_roms(roms);
-}
-
 static void __init limit_regions(unsigned long long size)
 {
 	unsigned long long current_addr = 0;
@@ -938,19 +925,17 @@
 static void __init register_memory(unsigned long max_low_pfn)
 {
 	unsigned long low_mem_size;
-	int i;
 
 	if (efi_enabled)
 		efi_initialize_iomem_resources(&code_resource, &data_resource);
 	else
 		legacy_init_iomem_resources(&code_resource, &data_resource);
 
- 	 /* EFI systems may still have VGA */
+	/* EFI systems may still have VGA */
 	request_graphics_resource();
 
 	/* request I/O space for devices used on all i[345]86 PCs */
-	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
-		request_resource(&ioport_resource, standard_io_resources+i);
+	request_standard_io_resources();
 
 	/* Tell the PCI layer not to allocate too close to the RAM area.. */
 	low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
arch/i386/mach-default/Makefile +1 -1
diff -urN linux-2.6.5-rc2-mm1.orig/arch/i386/mach-default/Makefile linux-2.6.5-rc2-mm1/arch/i386/mach-default/Makefile
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y				:= setup.o topology.o
+obj-y				:= setup.o topology.o std_resources.o
arch/i386/mach-default/std_resources.c +108 -0

108 lines not on this page · raw message

arch/i386/mach-pc9800/Makefile +1 -1
diff -urN linux-2.6.5-rc2-mm1.orig/arch/i386/mach-pc9800/Makefile linux-2.6.5-rc2-mm1/arch/i386/mach-pc9800/Makefile
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y				:= setup.o topology.o
+obj-y				:= setup.o topology.o std_resources.o
arch/i386/mach-pc9800/std_resources.c +195 -0

195 lines not on this page · raw message

include/asm-i386/mach-default/mach_resources.h +0 -106

106 lines not on this page · raw message

include/asm-i386/mach-pc9800/mach_resources.h +0 -191

191 lines not on this page · raw message

include/asm-i386/std_resources.h +14 -0
diff -urN linux-2.6.5-rc2-mm1.orig/include/asm-i386/std_resources.h linux-2.6.5-rc2-mm1/include/asm-i386/std_resources.h
@@ -0,0 +1,14 @@
+/*
+ * include/asm-i386/std_resources.h
+ */
+
+#ifndef __ASM_I386_STD_RESOURCES_H
+#define __ASM_I386_STD_RESOURCES_H
+
+#include <linux/init.h>
+
+void probe_roms(void) __init;
+void request_graphics_resource(void) __init;
+void request_standard_io_resources(void) __init;
+
+#endif