Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: Re: [libre-riscv-dev] Power memory fences and icache handling
Date: Tue, 12 May 2020 04:29:27 +0100
Message-ID: <CAPweEDwFKQ84tscPavL=ZkZ=jRX=VYDQXmdxstG7qFmvEoiVLg@mail.gmail.com> (raw)
In-Reply-To: <CAC2bXD6gWCr9GK7m==YP+riR_8J=aEMGXocMKk7nCzXPSFQifQ@mail.gmail.com>

On Tuesday, May 12, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:

> On Mon, May 11, 2020, 17:54 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> wrote:
>
> > On Tuesday, May 12, 2020, Yehowshua <yimmanuel3@gatech.edu> wrote:
> >
> > > > dcache:
> > > > https://github.com/paulusmack/microwatt/blob/mmu/dcache.vhdl <
> > > https://github.com/paulusmack/microwatt/blob/mmu/dcache.vhdl>
> > > >
> > > > icache:
> > > > https://github.com/paulusmack/microwatt/blob/mmu/icache.vhdl <
> > > https://github.com/paulusmack/microwatt/blob/mmu/icache.vhdl>
> > >
> > >
> > > I was actually talking to Michael about that the other day.
> > >
> > > If you have an instruction that does a store to a location in the
> icache,
> >
> >
> > that is prohibited by design.
> >
>
> If you're trying to run a standard Linux OS, writing to memory that could
> be in the icache is required, that's how the dynamic linker works.


my understabding of this is that writing to memory as a data page, then
flushing it and reloading it into the icache, is a workaround.


> Additionally, loading code from disk (e.g. the exec() call) or JIT
> compilation also requires writing to memory then executing it. In all of
> those cases one or more icache invalidate and then an isync instruction (or
> other context synchronizing instruction) are run before running the
> modified code.


that would... ok if the icache is entirely invalidated following a write
through the dcache, it would load  the modified executable


>
> Note: it turns out that isync doesn't do any icache flushing without
> additional icache invalidate instructions, so it's not quite as expensive
> as I had originally thought for Power atomics, however, it still restarts
> fetching and decoding instructions, so is still more expensive than
> necessary for just using it as an atomic fence.


hmmm




-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 22:19 [libre-riscv-dev] ppc-dev linux patch support for microwatt! Luke Kenneth Casson Leighton
2020-05-11 22:23 ` Luke Kenneth Casson Leighton
2020-05-11 22:27   ` Yehowshua
2020-05-11 22:34     ` Luke Kenneth Casson Leighton
2020-05-11 22:53       ` Luke Kenneth Casson Leighton
2020-05-11 23:02         ` Yehowshua
2020-05-12  0:53           ` Luke Kenneth Casson Leighton
2020-05-12  0:56             ` Yehowshua
2020-05-12  1:25               ` Luke Kenneth Casson Leighton
2020-05-12  1:42             ` [libre-riscv-dev] Power memory fences and icache handling Jacob Lifshay
2020-05-12  3:29               ` Luke Kenneth Casson Leighton [this message]
2020-05-11 22:23 ` [libre-riscv-dev] ppc-dev linux patch support for microwatt! Yehowshua

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='CAPweEDwFKQ84tscPavL=ZkZ=jRX=VYDQXmdxstG7qFmvEoiVLg@mail.gmail.com' \
    --to=lkcl@lkcl.net \
    --cc=libre-riscv-dev@lists.libre-riscv.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

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git