[edk2-devel] [PATCH V3 14/29] UefiCpuPkg: Enable Tdx support in MpInitLib

Min Xu min.m.xu at intel.com
Wed Nov 3 12:57:37 UTC 2021


On November 3, 2021 2:09 PM, Gerd Hoffmann wrote:
> > +++ b/UefiCpuPkg/Library/MpInitLib/X64/IntelTdcall.nasm
> > @@ -0,0 +1,120 @@
> > +;--------------------------------------------------------------------
> > +----------
> > +;*
> > +;* Copyright (c) 2020 - 2021, Intel Corporation. All rights
> > +reserved.<BR>
> > +;* SPDX-License-Identifier: BSD-2-Clause-Patent
> > +;*
> > +;*
> > +;--------------------------------------------------------------------
> > +----------
> > +
> > +DEFAULT REL
> > +SECTION .text
> > +
> > +%macro tdcall 0
> > +    db 0x66,0x0f,0x01,0xcc
> > +%endmacro
> 
> Hmm, could you just use TdxLib instead of bringing your own copy of the
> assembler code?
> 
My initial thought was to include TdxLib in the .dsc as little as possible. For example, DxeMpInitLib is included in OvmfPkg/Microvm/MicrovmX64.dsc. If TdxLib is used by DxeMpInitLib, then it has to be included in MicrovmX64.dsc as well.
So I copy the assemble code in MpInitLib.
But now VmgExitLib is extended to handle #VE exception ( TdxLib must be used ), so TdxLib has to be included in the .dsc where VmgExitLib is included.
I will update the MpInitLib to use TdxLib in the next version.

Thanks
Min



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83251): https://edk2.groups.io/g/devel/message/83251
Mute This Topic: https://groups.io/mt/86739862/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list