Hi,

> > Runtime service call are restricted so that you don't have concurrent 
> > threads
> > executing (see section 8.1 of the specification). Without that you would 
> > have
> > problems with runtime services today.
> >
> One of the situation of CcProbe used is in BaseIoLib.
> https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseIoLibIntrinsic/IoLibInternalTdx.c#L35-L40
> 
> BaseIoLib is a basic library and it may be called by APs. While dynamic PCD 
> access is not allowed in APs. Of course we can cache the PCD in a variable 
> but I think it is still not safe.
> 
> Reserving the OVMF work area as RT_DATA breaks the original intention of the 
> design.
> 
> Then how about this solution?
> https://edk2.groups.io/g/devel/message/91132
> We can design 2 instances of CcProbe. One is to read the OvmfWorkArea. The 
> other is to call Cc guest specific way to determine the type.

When using RT_DATA is out of question there is no way around two
instances I think.

I don't see the point in reinventing the wheel though.  We know what the
guest type is, why determine it *again*?  We only need to copy the guest
type from the work area to another place before it is gone.  I think
the dxe library instance could copy it to a variable in the init function.

take care,
  Gerd



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


Reply via email to