On Thursday, March 21, 2024 8:25 PM Gerd Hoffmann wrote:
> Well, just try to read them.  If present they can just be measured.
> If not present we can either skip them, or measure with an empty data 
> field to indicate it is not present.
My understanding :
If the fw_cfg is present,  it must be measured and consumed later.
Is this correct?

> > > > We propose below solution :
> > > >
> > > > Add a new API in QemuFwCfgLib,
> > > > RETURN_STATUS QemuFwCfgGetData(fw_cfg_name, *size, *value,
> > > FW_CFG_GET_DATA_FLAG flag).
> > >
> > > I'd suggest to *not* touch the existing interfaces for reading entries.
> > > Instead change the existing functions to first check the cache, in 
> > > case there is no cache entry go read from fw_cfg.
> > Actually we don't touch the existing interface for reading entries.
> > The API is newly added.
> 
> But then you have to find and update all callsites (or at least the 
> ones where we care about measurement).
In your solution,  if we cache all items that need to be measured,
we would have to add a new API (example: QemuFwCfgGetDataFromCache ())  to get 
the data from cache.

Then we also have to find and update all callsites.

Thanks
Ceping



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117028): https://edk2.groups.io/g/devel/message/117028
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