On Tue, Mar 26, 2024 at 09:08:59AM +0000, Sun, CepingX wrote:
> On Friday, March 22, 2024 5:06 PM Gerd Hoffmann wrote:
> > 
> > No, we only need to update QemuFwCfgSelectItem + QemuFwCfgReadBytes to
> > support reading from the cache.
> Do you mean the existing API (QemuFwCfgSelectItem + QemuFwCfgReadBytes) need 
> to be changed to support reading from the cache?
> 
> If that is the case,  there are some concerns as below:
> 1:  One or more new parameters (of QemuFwCfgReadBytes())  need to be added to 
> search 
> the item in cache, which is equivalent to adding a new API.

No.

Yes, you need to maintain some extra state, so you know which item was
selected most recently and how many bytes have been read already.

It's not needed to task the caller with that though.  Alternatively you
can add fields to EFI_HOB_PLATFORM_INFO, or create a new HOB for that,
and store the state there.  That way QemuFwCfgReadBytes works properly
with the cache without the caller passing in the state.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117129): https://edk2.groups.io/g/devel/message/117129
Mute This Topic: https://groups.io/mt/104880546/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to