Index: arch/ia32/src/bios/bios.c
===================================================================
--- arch/ia32/src/bios/bios.c	(revision dba84ff88ce25a6cd17ab4cbe353008cbd2da6cc)
+++ arch/ia32/src/bios/bios.c	(revision dba84ff88ce25a6cd17ab4cbe353008cbd2da6cc)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <arch/bios/bios.h>
+#include <arch/types.h>
+
+__address ebda = 0;
+
+void bios_init(void)
+{
+	/* Copy the EBDA out from BIOS Data Area */
+	ebda = *((__u16 *) BIOS_EBDA_PTR) * 0x10;
+}
Index: arch/ia32/src/ia32.c
===================================================================
--- arch/ia32/src/ia32.c	(revision 85bfdcc853e0c782ab7cd7e3b16fc2885a1ac860)
+++ arch/ia32/src/ia32.c	(revision dba84ff88ce25a6cd17ab4cbe353008cbd2da6cc)
@@ -68,4 +68,5 @@
 
 	if (config.cpu_active == 1) {
+		bios_init();
 		i8042_init();	/* a20 bit */
 	    	i8259_init();	/* PIC */
Index: arch/ia32/src/smp/mp.c
===================================================================
--- arch/ia32/src/smp/mp.c	(revision 85bfdcc853e0c782ab7cd7e3b16fc2885a1ac860)
+++ arch/ia32/src/smp/mp.c	(revision dba84ff88ce25a6cd17ab4cbe353008cbd2da6cc)
@@ -47,4 +47,5 @@
 #include <arch/i8259.h>
 #include <arch/asm.h>
+#include <arch/bios/bios.h>
 #include <arch/acpi/madt.h>
 
@@ -133,19 +134,8 @@
 
 	/*
-	 * First place to search the MP Floating Pointer Structure is the Extended
-	 * BIOS Data Area. We have to read EBDA segment address from the BIOS Data
-	 * Area. Unfortunatelly, this memory is in page 0, which has intentionally no
-	 * mapping.
-	 */
-	frame = frame_alloc(FRAME_KA);
-	map_page_to_frame(frame,0,PAGE_CACHEABLE,0);
-	addr = *((__u16 *) (frame + 0x40e)) * 16;
-	map_page_to_frame(frame,frame,PAGE_CACHEABLE,0);
-	frame_free(frame);	
-
-	/*
 	 * EBDA can be undefined. In that case addr would be 0. 
 	 */
-	if (addr >= 0x1000) {
+	addr = ebda;
+	if (addr) {
 		cnt = 1024;
 		while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
@@ -156,16 +146,17 @@
 		}
 	}
-	
-	/*
-	 * Second place where the MP Floating Pointer Structure may live is the last
-	 * kilobyte of base memory.
-	 */
-	addr = 639*1024;
-	cnt = 1024;
-	while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
-		if (mp_fs_check((__u8 *) addr))
-			goto fs_found;
-		addr++;
-		cnt--;
+	else {
+		/*
+		 * Second place where the MP Floating Pointer Structure may live is the last
+		 * kilobyte of base memory.
+		 */
+		addr = 639*1024;
+		cnt = 1024;
+		while (addr = __u32_search(addr,cnt,FS_SIGNATURE)) {
+			if (mp_fs_check((__u8 *) addr))
+				goto fs_found;
+			addr++;
+			cnt--;
+		}
 	}
 
