From: Robert Reif <reif@earthlink.net>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] silo: move second to make room for larger kernel
Date: Sun, 14 Jun 2009 12:59:50 +0000 [thread overview]
Message-ID: <4A34F446.6090503@earthlink.net> (raw)
In-Reply-To: <4A325654.3050201@earthlink.net>
Robert Reif wrote:
> This patch changes the location that second is loaded to make room for
> larger kernels.
>
> On sparc32 a kernel is loaded at 0x4000 and second is loaded
> at 0x280000. That means that the largest kernel that can be loaded
> is 0x27c000 (2605056) bytes. Sparc32 kernels have been larger
> than that for years and it has recently been almost impossible
> to strip down a kernel small enough to actually load.
>
> OBP initializes 3 megs of memory and second is loaded at 2.5
> meg. second is only 40k bytes so most of the last 1/2 meg is
> wasted. This patch moves second to 0x2e0000 which leaves
> room for a 128k byte second.
>
> This doesn't fix the sparc32 boot problems because you still
> need to compile everything as modules and strip the executable
> but it is a short term fix.
>
> The long term fix is to make the sparc32 kernel relocatable
> like sparc64. The first step is to make silo load a large sparc32
> kernel. A patch has been submitted 2 years ago
> http://marc.info/?l=linux-sparc&m\x117952409730426&w=2
> that fixes the silo side. I have tested that patch and it does
> fix the problem of decompressing a large kernel. However
> sparc32 kernel is not relocatable so silo tries to move the
> kernel down to low memory (0x4000) but refuses because there
> is no room for a large kernel. I think that patch should go
> into silo so the silo will be ready for relocatable sparc32
> kernels.
>
> Linux head_32.S has some issues with large kernels. It
> is capable of relocating itself from 0x4000 up to higher
> memory but has a hard coded size limit of 0x300000. I
> tried relocating a smaller image by changing the header
> version to 0x300 which should support relocation and
> silo was OK with that but the kernel boot failed with an
> illegal instruction so the kernel is not OK with being
> loaded at an arbitrary location yet.
> I'm looking into changing linux to be relocatable from
> an arbitrary address but that requires that the 2 year
> old large kernel patch be applied first.
>
> Signed-off-by: Robert Reif <reif@earthlink.net>
>
>
I have been looking at head_32.S and things don't look
good. The kernel expects to either be loaded at 0x4000
or already be loaded at KERNBASE by the boot loader.
If it needs to relocate itself, it just moves the first 3 meg
to high memory or modifies the page table so the currently
mapped memory shows up at KERNBASE. This won't
help the large kernel problem.
Would it be possible to use silo to load the kernel at its
final destination like the sun bootloader aparently does?
This seems so simple that I can't believe it hasn't been
done before so there must be issues with this approach.
Can anyone please give me some feedback?
next prev parent reply other threads:[~2009-06-14 12:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 13:21 [PATCH] silo: move second to make room for larger kernel Robert Reif
2009-06-12 13:24 ` Robert Reif
2009-06-14 12:59 ` Robert Reif [this message]
2009-06-15 1:38 ` Chris Newport
2009-06-15 8:48 ` David Miller
2009-06-15 9:12 ` David Miller
2009-08-03 2:12 ` David Miller
2009-08-15 0:11 ` David Miller
2009-09-03 9:57 ` David Miller
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=4A34F446.6090503@earthlink.net \
--to=reif@earthlink.net \
--cc=sparclinux@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.