public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Empty function at BaseCacheMaintenanceLib
@ 2018-05-08 13:46 Rafael Machado
  2018-05-08 15:55 ` Andrew Fish
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael Machado @ 2018-05-08 13:46 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Empty function at BaseCacheMaintenanceLib
  2018-05-08 13:46 Empty function at BaseCacheMaintenanceLib Rafael Machado
@ 2018-05-08 15:55 ` Andrew Fish
  2018-05-08 16:06   ` Rafael Machado
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Fish @ 2018-05-08 15:55 UTC (permalink / raw)
  To: Rafael Machado; +Cc: edk2-devel@lists.01.org

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Empty function at BaseCacheMaintenanceLib
  2018-05-08 15:55 ` Andrew Fish
@ 2018-05-08 16:06   ` Rafael Machado
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael Machado @ 2018-05-08 16:06 UTC (permalink / raw)
  To: Andrew Fish; +Cc: edk2-devel@lists.01.org

Got it!

Thanks for the answer Andrew.

Rafael Machado

Em ter, 8 de mai de 2018 às 12:55, Andrew Fish <afish@apple.com> escreveu:

> 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
>
> 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
>
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-08 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-08 13:46 Empty function at BaseCacheMaintenanceLib Rafael Machado
2018-05-08 15:55 ` Andrew Fish
2018-05-08 16:06   ` Rafael Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox