From: "Marc Joosen" <mjoosen@us.ibm.com>
To: alan@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] Re: e820 memory detection fix for ThinkPad
Date: Thu, 21 Dec 2000 20:04:02 -0500 [thread overview]
Message-ID: <OF4FB68CB1.98A5E1AA-ON852569BD.000420DA@pok.ibm.com> (raw)
David Weinhall wrote:
> On Tue, Dec 19, 2000 at 07:16:40PM -0500, Marc Joosen wrote:
> >
> > This is a tiny patch to make the int15/e820 memory mapping work on
IBM
> > ThinkPads. Until now, I have had to give lilo a mem= option with one
meg
>
> If this simple patch solves your problem, great! But in that case,
> PLEASE add a note telling WHY the assignment is done for every
> iteration; else some smarthead will probably submit a patch someday
> in the future along the lines of "assigning this only once makes the
> loop faster"...
>
> Anyhow, good spotting!
Thanks for the tip, David. I hope that whoever wants to move that line
out of the loop is aware that it is only executed ~10 times :) So I
hereby submit a second version of the patch, that includes a link to
the documentation and #defines the word SMAP (thanks to David Parsons
for that):
--- linux/arch/i386/boot/setup.S.orig Mon Oct 30 17:44:29 2000
+++ linux/arch/i386/boot/setup.S Thu Dec 21 19:37:12 2000
@@ -289,10 +289,11 @@
# a whole bunch of different types, and allows memory holes and
# everything. We scan through this memory map and build a list
# of the first 32 memory areas, which we return at [E820MAP].
-#
+# This is documented at http://www.teleport.com/~acpi/acpihtml/topic245.htm
+
+#define SMAP 0x534d4150
meme820:
- movl $0x534d4150, %edx # ascii `SMAP'
xorl %ebx, %ebx # continuation counter
movw $E820MAP, %di # point into the whitelist
# so we can have the bios
@@ -300,13 +301,15 @@
jmpe820:
movl $0x0000e820, %eax # e820, upper word zeroed
+ movl $SMAP, %edx # do this every time, some
+ # bioses are forgetful
movl $20, %ecx # size of the e820rec
pushw %ds # data record.
popw %es
int $0x15 # make the call
jc bail820 # fall to e801 if it fails
- cmpl $0x534d4150, %eax # check the return is `SMAP'
+ cmpl $SMAP, %eax # check the return is `SMAP'
jne bail820 # fall to e801 if it fails
# cmpl $1, 16(%di) # is this usable memory?
Again, please copy any comments to me (mjoosen@us.ibm.com), since
I'm not subscribed to linux-kernel.
--
Marc Joosen
Communication Link Design
IBM T.J. Watson Research Center
Yorktown Heights, NY
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2000-12-22 1:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=OF4FB68CB1.98A5E1AA-ON852569BD.000420DA@pok.ibm.com \
--to=mjoosen@us.ibm.com \
--cc=alan@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).