public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: Rafael Machado <rafaelrodrigues.machado@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Empty function at BaseCacheMaintenanceLib
Date: Tue, 08 May 2018 08:55:34 -0700	[thread overview]
Message-ID: <220B682A-EFD1-4989-A9BD-6D3DEB2E3EB4@apple.com> (raw)
In-Reply-To: <CACgnt7-x=0jeiYsXp6y1_4A+vB+zOAJgtJqCn9JH7oOYn28ZOg@mail.gmail.com>

Rafael,

I seem to remember those functions are used to manage the cache on a Harvard architecture caches  [1].

If you look at InvalidateInstructionCacheRange() you will notice it is used when code gets loaded into memory to keep the data and instruction caches coherent. If the instruction cache maintains coherency in hardware then there is no need for this functions to do anything. 

If you notice the IPF version actually does something, and that is why these functions exists. 

[1]  https://en.wikipedia.org/wiki/Harvard_architecture <https://en.wikipedia.org/wiki/Harvard_architecture>

Thanks,

Andrew Fish

> On May 8, 2018, at 6:46 AM, Rafael Machado <rafaelrodrigues.machado@gmail.com> wrote:
> 
> Hi everyone
> 
> I have a question. During a research I got to the BaseCacheMaintenanceLib,
> and noticed that there is a function that is not implemented.
> 
> The function InvalidateInstructionCache does not have a body, but as far as
> I
> could check it's used in some places.
> 
> Is it ok to have this function empty?
> 
> Thanks and Regards
> Rafael R. Machado
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



  reply	other threads:[~2018-05-08 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 13:46 Empty function at BaseCacheMaintenanceLib Rafael Machado
2018-05-08 15:55 ` Andrew Fish [this message]
2018-05-08 16:06   ` Rafael Machado

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-list 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=220B682A-EFD1-4989-A9BD-6D3DEB2E3EB4@apple.com \
    --to=devel@edk2.groups.io \
    /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