All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edgar Hucek <hostmaster@ed-soft.at>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] Fix boot on efi 32 bit Machines
Date: Tue, 20 Jun 2006 15:30:03 +0200	[thread overview]
Message-ID: <4497F85B.7010409@ed-soft.at> (raw)

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

Fix EFI boot on 32 bit machines with pcie port.
Efi machines does not have an e820 memory map.

Signed-off-by: Edgar Hucek <hostmaster@ed-soft.at>

[-- Attachment #2: efi_e820_all_mapped_fix.patch --]
[-- Type: text/x-patch, Size: 1461 bytes --]

--- a/arch/i386/kernel/setup.c	2006-06-19 09:12:09.000000000 +0200
+++ b/arch/i386/kernel/setup.c	2006-06-19 09:12:24.000000000 +0200
@@ -975,24 +975,28 @@
 	u64 start = s;
 	u64 end = e;
 	int i;
-	for (i = 0; i < e820.nr_map; i++) {
-		struct e820entry *ei = &e820.map[i];
-		if (type && ei->type != type)
-			continue;
-		/* is the region (part) in overlap with the current region ?*/
-		if (ei->addr >= end || ei->addr + ei->size <= start)
-			continue;
-		/* if the region is at the beginning of <start,end> we move
-		 * start to the end of the region since it's ok until there
-		 */
-		if (ei->addr <= start)
-			start = ei->addr + ei->size;
-		/* if start is now at or beyond end, we're done, full
-		 * coverage */
-		if (start >= end)
-			return 1; /* we're done */
+	if(!efi_enabled) {
+		for (i = 0; i < e820.nr_map; i++) {
+			struct e820entry *ei = &e820.map[i];
+			if (type && ei->type != type)
+				continue;
+			/* is the region (part) in overlap with the current region ?*/
+			if (ei->addr >= end || ei->addr + ei->size <= start)
+				continue;
+			/* if the region is at the beginning of <start,end> we move
+			 * start to the end of the region since it's ok until there
+			 */
+			if (ei->addr <= start)
+				start = ei->addr + ei->size;
+			/* if start is now at or beyond end, we're done, full
+			 * coverage */
+			if (start >= end)
+				return 1; /* we're done */
+		}
+		return 0;
+	} else {
+		return 1;
 	}
-	return 0;
 }
 
 /*

             reply	other threads:[~2006-06-20 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 13:30 Edgar Hucek [this message]
2006-06-20 17:16 ` [PATCH 1/1] Fix boot on efi 32 bit Machines Randy.Dunlap
2006-06-20 21:58   ` Jan Engelhardt
2006-06-20 22:26     ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4497F85B.7010409@ed-soft.at \
    --to=hostmaster@ed-soft.at \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.