From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string
Date: Tue, 07 Oct 2014 12:44:32 +0000 [thread overview]
Message-ID: <5433E030.8090101@oracle.com> (raw)
In-Reply-To: <5432BE03.10405@oracle.com>
uOn 10/06/2014 11:23 PM, David Miller wrote:
> From: Dave Kleikamp <dave.kleikamp@oracle.com>
> Date: Mon, 06 Oct 2014 11:06:27 -0500
>
>> sparc64 defines COMMAND_LINE_SIZE to be 2048, but the boot string is
>> hard-coded to be 256 bytes long.
>>
>> based on a patch by Bob Picco
>>
>> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>
> I think we might be limited by the size of barg_out[] in the SILO
> bootloader, which is 1024 bytes.
>
> SILO massages the command line into barg_out[] then does:
>
> if (architecture = sun4u)
> kernel_params = (char *)((hdrs->bootstr_info_ptr_low - 0x400000) +
> (image_base - 0x4000));
> ...
> if (kernel_params) {
> extern char barg_out[];
> int len = *(unsigned int *)kernel_params;
>
> strncpy (kernel_params + 8, barg_out, len);
> kernel_params [8 + len - 1] = 0;
> *(unsigned int *)(kernel_params + 4) = 1;
> }
>
> So it blindly copies however many bytes you tell it to in that
> bootstr_info area :-/
>
> So I'm happy to apply a patch that increases the size to 1024,
> whilst adding a comment explaining the SILO limitation.
That makes sense. 1024 is much better than 256. I'll send a new patch.
Thanks,
Dave
next prev parent reply other threads:[~2014-10-07 12:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 16:06 [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string Dave Kleikamp
2014-10-07 4:23 ` David Miller
2014-10-07 12:44 ` Dave Kleikamp [this message]
2014-10-07 13:23 ` Dave Kleikamp
2014-10-07 18:38 ` Kjetil Oftedal
2014-10-07 18:49 ` Dave Kleikamp
2014-10-07 18:54 ` David Miller
2014-10-07 19:03 ` David Miller
2014-10-07 19:19 ` Dave Kleikamp
2014-10-07 19:23 ` 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=5433E030.8090101@oracle.com \
--to=dave.kleikamp@oracle.com \
--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.