From: ebiederm@xmission.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Early memory patch, revised
Date: 25 Feb 2004 11:26:03 -0700 [thread overview]
Message-ID: <m1r7wjf22s.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <403ADCDD.8080206@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
> Hi all,
>
> This is the latest version of the i386 early memory cleanup patch. It has the
> additional advantage that it removes some of the special casing for VISWS --
> this is still untested; if you have access to a VISWS *please* test this out.
>
> The main difference other than the VISWS code is that it always sets up the GDT.
>
> I agree with Eric this is a lot cleaner.
Thanks. :)
Two little tweaks I can think of.
1) Can we reserve space between __bss_stop and _end for the page
tables and the bitmap of memory?
This should make it obvious that the early boot code is touching
that memory.
2) Can we export _end in setup.S so a bootloader can verify the
kernel + bss will fit in memory?
Roughly the additions needed to vmlinux.lds.S look like:
+++ arch/i386/kernel/vmlinux.lds.S
@@ -105,6 +105,18 @@
__bss_start = .; /* BSS */
.bss : { *(.bss) }
+ . = ALIGN(4);
__bss_stop = .;
+
+ /* Reserve space for the initial page tables.
+ * A 1GB kernel needs 1MB of page tables.
+ * We must cover the first 1M ourselves and the initial memory bitmap.
+ * In the worst (1G kernel + 36G of ram) case this increases our
+ * page table size by 3K.
+ */
+ . += (((__bss_stop - _text + 4095) / 4096) + ((4*1024*1024) / 4096)) * 4 ;
+
+ /* Reserve space for the initial memory bitmap 2^36/4096/8 = 2MB */
+ . += 2*1024*1024;
_end = . ;
Eric
next prev parent reply other threads:[~2004-02-25 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 5:10 H. Peter Anvin
2004-02-25 18:26 ` Eric W. Biederman [this message]
2004-02-25 18:38 ` H. Peter Anvin
2004-02-25 18:49 ` H. Peter Anvin
2004-02-26 14:56 ` [PATCH] Early memory patch, +accounting Eric W. Biederman
2004-02-26 18:02 ` H. Peter Anvin
2004-03-01 7:06 ` Eric W. Biederman
2004-02-26 6:16 ` Early memory patch, revised Eric W. Biederman
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=m1r7wjf22s.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=hpa@zytor.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
all inboxes | Powered by JetHome®