linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>,
	Libre-Soc General Development <libre-soc-dev@lists.libre-soc.org>,
	linuxppc-dev@lists.ozlabs.org,
	Luke Kenneth Casson Leighton <lkcl@lkcl.net>,
	lkcl <luke.leighton@gmail.com>,
	openpower-hdl-cores
	<openpower-hdl-cores@mailinglist.openpowerfoundation.org>
Subject: Re: microwatt booting linux-5.7 under verilator
Date: Tue, 01 Feb 2022 22:53:14 +1100	[thread overview]
Message-ID: <87o83qn6qd.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <1643696448.f3llnvzeyb.astroid@bobo.none>

Nicholas Piggin <npiggin@gmail.com> writes:
> Excerpts from lkcl's message of January 31, 2022 2:19 pm:
>> 
>> On January 31, 2022 3:31:41 AM UTC, Nicholas Piggin <npiggin@gmail.com> wrote:
>>>Hi Luke,
>>>
>>>Interesting to read about the project, thanks for the post.
>> 
>> no problem. it's been i think 18 years since i last did linux kernel work.
>> 
>>>> i also had to fix a couple of things in the linux kernel source
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/joel/microwatt.git
>>>
>>>I think these have mostly (all?) been upstreamed now.
>> 
>> i believe so, although last i checked (6 months?) there was some of dts still to do. instructions online all tend to refer to joel or benh's tree(s)
>> 
>>>> this led me to add support for CONFIG_KERNEL_UNCOMPRESSED
>>>> and cut that time entirely, hence why you can see this in the console
>>>log:
>>>> 
>>>>     0x5b0e10 bytes of uncompressed data copied
>>>
>>>Interesting, it looks like your HAVE_KERNEL_UNCOMPRESSED support
>>>patch is pretty trivial. 
>> 
>> yeah i was really surprised, it was all there
>> 
>>> We should be able to upstream it pretty
>>>easily I think?
>> 
>> don't see why not.
>
> Okay then we should.
>
>> 
>> the next interesting thing which would save another hour when emulating HDL at this astoundingly-slow speed of sub-1000 instructions per second would be in-place execution: no memcpy, just jump.
>> 
>> i seem to recall this (inplace execution) being a standard option back in 2003 when i was doing xda-developers wince smartphone reverse-emgineering, although with it being 19 years ago i could be wrong
>
> Not sure of the details on that. Is it memcpy()ing out of ROM or RAM to 
> RAM? Is this in the arch boot code? (I don't know very well).

If you build with CONFIG_RELOCATABLE=y and CONFIG_RELOCATABLE_TEST=y the
kernel will run wherever you load it (must be 64K aligned), without
copying itself down to zero first. That will save you a few cycles.

cheers

  parent reply	other threads:[~2022-02-01 11:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03  0:45 microwatt booting linux-5.7 under verilator Luke Kenneth Casson Leighton
2022-01-31  3:31 ` Nicholas Piggin
2022-01-31  4:19   ` lkcl
2022-01-31  5:12     ` [OpenPOWER-HDL-Cores] " Herrenschmidt, Benjamin
2022-02-01  6:27     ` Nicholas Piggin
2022-02-01  9:52       ` Luke Kenneth Casson Leighton
2022-02-01 11:53       ` Michael Ellerman [this message]
2022-02-01 11:59         ` Luke Kenneth Casson Leighton
2022-03-12  7:45 ` Christophe Leroy

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=87o83qn6qd.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=libre-soc-dev@lists.libre-soc.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkcl@lkcl.net \
    --cc=luke.leighton@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=openpower-hdl-cores@mailinglist.openpowerfoundation.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).