* [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
@ 2022-05-25 23:54 Théo Jehl
2022-05-26 1:26 ` [edk2-devel] " Rebecca Cran
0 siblings, 1 reply; 9+ messages in thread
From: Théo Jehl @ 2022-05-25 23:54 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Jiewen Yao, Jordan Justen, Gerd Hoffmann
From: Theo Jehl <theojehl76@gmail.com>
Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
This fixes a compilation issue.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jehl Theo <theojehl76@gmail.com>
---
OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
index a859375fb819..52fb3b4944bf 100644
--- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
+++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
@@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
;-------------------------------------------------------------------------------------
global ASM_PFX(AsmGetRelocationMap)
ASM_PFX(AsmGetRelocationMap):
- lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
+ lea rax, [AsmRelocateApMailBoxLoopStart]
mov qword [rcx], rax
mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd - AsmRelocateApMailBoxLoopStart
ret
--
2.32.1 (Apple Git-133)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-25 23:54 [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call Théo Jehl
@ 2022-05-26 1:26 ` Rebecca Cran
2022-05-26 2:22 ` Andrew Fish
2022-05-26 8:34 ` 回复: " gaoliming
0 siblings, 2 replies; 9+ messages in thread
From: Rebecca Cran @ 2022-05-26 1:26 UTC (permalink / raw)
To: devel, theojehl76
Cc: Ard Biesheuvel, Jiewen Yao, Jordan Justen, Gerd Hoffmann
Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
This lets the build get further, before it runs into Availability.h not
being found.
If I download
http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h
and
http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h
into MdePkg/Include
(which is very much a hack) then the DEBUG and RELEASE builds succeed.
However, NOOPT fails with code generating a call to _memcpy:
Undefined symbols for architecture x86_64:
"_memcpy", referenced from:
_ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
ld: symbol(s) not found for architecture x86_64
"libtool" -static -o
/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleRuntimeDxe.lib
-filelist
/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_files.lst
make: ***
[/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain/DEBUG/SecMain.dll]
Error 1
build.py...
: error 7000: Failed to execute command
make tbuild
[/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain]
build.py...
: error F002: Failed to build module
/Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5, NOOPT]
On 5/25/22 17:54, Théo Jehl wrote:
> From: Theo Jehl <theojehl76@gmail.com>
>
> Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
> This fixes a compilation issue.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Jehl Theo <theojehl76@gmail.com>
> ---
> OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> index a859375fb819..52fb3b4944bf 100644
> --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
> ;-------------------------------------------------------------------------------------
> global ASM_PFX(AsmGetRelocationMap)
> ASM_PFX(AsmGetRelocationMap):
> - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
> + lea rax, [AsmRelocateApMailBoxLoopStart]
> mov qword [rcx], rax
> mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd - AsmRelocateApMailBoxLoopStart
> ret
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 1:26 ` [edk2-devel] " Rebecca Cran
@ 2022-05-26 2:22 ` Andrew Fish
2022-05-26 2:39 ` Rebecca Cran
2022-05-26 8:34 ` 回复: " gaoliming
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Fish @ 2022-05-26 2:22 UTC (permalink / raw)
To: devel, quic_rcran
Cc: theojehl76, Ard Biesheuvel, Jiewen Yao, Jordan Justen,
Gerd Hoffmann
What is pulling in Availability.h? That sound more like and #ifdef issue in some 3rd party header?
I think I might have seen that in SSL headers?
> On May 25, 2022, at 6:26 PM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>
> Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
> Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
>
> This lets the build get further, before it runs into Availability.h not being found.
>
> If I download http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h and
> http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h into MdePkg/Include
> (which is very much a hack) then the DEBUG and RELEASE builds succeed.
>
> However, NOOPT fails with code generating a call to _memcpy:
>
> Undefined symbols for architecture x86_64:
> "_memcpy", referenced from:
> _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
> ld: symbol(s) not found for architecture x86_64
> "libtool" -static -o /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleRuntimeDxe.lib -filelist /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_files.lst
> make: *** [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain/DEBUG/SecMain.dll] Error 1
>
>
> build.py...
> : error 7000: Failed to execute command
> make tbuild [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain]
>
>
> build.py...
> : error F002: Failed to build module
> /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5, NOOPT]
>
>
>
>> On 5/25/22 17:54, Théo Jehl wrote:
>> From: Theo Jehl <theojehl76@gmail.com>
>>
>> Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
>> This fixes a compilation issue.
>>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Signed-off-by: Jehl Theo <theojehl76@gmail.com>
>> ---
>> OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>> index a859375fb819..52fb3b4944bf 100644
>> --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>> +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>> @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
>> ;-------------------------------------------------------------------------------------
>> global ASM_PFX(AsmGetRelocationMap)
>> ASM_PFX(AsmGetRelocationMap):
>> - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
>> + lea rax, [AsmRelocateApMailBoxLoopStart]
>> mov qword [rcx], rax
>> mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd - AsmRelocateApMailBoxLoopStart
>> ret
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 2:22 ` Andrew Fish
@ 2022-05-26 2:39 ` Rebecca Cran
2022-05-26 3:26 ` Andrew Fish
0 siblings, 1 reply; 9+ messages in thread
From: Rebecca Cran @ 2022-05-26 2:39 UTC (permalink / raw)
To: Andrew (EFI) Fish, devel
Cc: theojehl76, Ard Biesheuvel, Jiewen Yao, Jordan Justen,
Gerd Hoffmann
It's Library/OpensslLib/openssl/include/crypto/rand.h
# include <openssl/rand.h>
# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
# include <Availability.h>
# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) &&
__MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || \
(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) &&
__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
# define OPENSSL_APPLE_CRYPTO_RANDOM 1
# include <CommonCrypto/CommonCryptoError.h>
# include <CommonCrypto/CommonRandom.h>
# endif
# endif
--
Rebecca Cran
On 5/25/22 20:22, Andrew (EFI) Fish wrote:
> What is pulling in Availability.h? That sound more like and #ifdef issue in some 3rd party header?
>
> I think I might have seen that in SSL headers?
>
> Sent from my iPhone
>
>> On May 25, 2022, at 6:26 PM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>
>> Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
>> Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
>>
>> This lets the build get further, before it runs into Availability.h not being found.
>>
>> If I download http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h and
>> http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h into MdePkg/Include
>> (which is very much a hack) then the DEBUG and RELEASE builds succeed.
>>
>> However, NOOPT fails with code generating a call to _memcpy:
>>
>> Undefined symbols for architecture x86_64:
>> "_memcpy", referenced from:
>> _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
>> ld: symbol(s) not found for architecture x86_64
>> "libtool" -static -o /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleRuntimeDxe.lib -filelist /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_files.lst
>> make: *** [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain/DEBUG/SecMain.dll] Error 1
>>
>>
>> build.py...
>> : error 7000: Failed to execute command
>> make tbuild [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain]
>>
>>
>> build.py...
>> : error F002: Failed to build module
>> /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5, NOOPT]
>>
>>
>>
>>> On 5/25/22 17:54, Théo Jehl wrote:
>>> From: Theo Jehl <theojehl76@gmail.com>
>>>
>>> Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
>>> This fixes a compilation issue.
>>>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>> Signed-off-by: Jehl Theo <theojehl76@gmail.com>
>>> ---
>>> OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>> index a859375fb819..52fb3b4944bf 100644
>>> --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>> +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>> @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
>>> ;-------------------------------------------------------------------------------------
>>> global ASM_PFX(AsmGetRelocationMap)
>>> ASM_PFX(AsmGetRelocationMap):
>>> - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
>>> + lea rax, [AsmRelocateApMailBoxLoopStart]
>>> mov qword [rcx], rax
>>> mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd - AsmRelocateApMailBoxLoopStart
>>> ret
>>
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 2:39 ` Rebecca Cran
@ 2022-05-26 3:26 ` Andrew Fish
2022-05-26 6:41 ` Théo Jehl
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Fish @ 2022-05-26 3:26 UTC (permalink / raw)
To: edk2-devel-groups-io, Rebecca Cran
Cc: theojehl76, Ard Biesheuvel, Jiewen Yao, Jordan Justen,
Gerd Hoffmann
[-- Attachment #1: Type: text/plain, Size: 4030 bytes --]
I think we need to -D OPENSSL_NO_APPLE_CRYPTO_RANDOM in the INF.
Thanks,
Andrew Fish
> On May 25, 2022, at 7:39 PM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>
> It's Library/OpensslLib/openssl/include/crypto/rand.h
>
> # include <openssl/rand.h>
>
> # if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
> # include <Availability.h>
> # if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || \
> (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
> # define OPENSSL_APPLE_CRYPTO_RANDOM 1
> # include <CommonCrypto/CommonCryptoError.h>
> # include <CommonCrypto/CommonRandom.h>
> # endif
> # endif
>
>
> --
> Rebecca Cran
>
> On 5/25/22 20:22, Andrew (EFI) Fish wrote:
>> What is pulling in Availability.h? That sound more like and #ifdef issue in some 3rd party header?
>>
>> I think I might have seen that in SSL headers?
>>
>> Sent from my iPhone
>>
>>> On May 25, 2022, at 6:26 PM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>>
>>> Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
>>> Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
>>>
>>> This lets the build get further, before it runs into Availability.h not being found.
>>>
>>> If I download http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h and
>>> http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h into MdePkg/Include
>>> (which is very much a hack) then the DEBUG and RELEASE builds succeed.
>>>
>>> However, NOOPT fails with code generating a call to _memcpy:
>>>
>>> Undefined symbols for architecture x86_64:
>>> "_memcpy", referenced from:
>>> _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
>>> ld: symbol(s) not found for architecture x86_64
>>> "libtool" -static -o /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleRuntimeDxe.lib -filelist /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_files.lst
>>> make: *** [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain/DEBUG/SecMain.dll] Error 1
>>>
>>>
>>> build.py...
>>> : error 7000: Failed to execute command
>>> make tbuild [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg/Sec/SecMain]
>>>
>>>
>>> build.py...
>>> : error F002: Failed to build module
>>> /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5, NOOPT]
>>>
>>>
>>>
>>>> On 5/25/22 17:54, Théo Jehl wrote:
>>>> From: Theo Jehl <theojehl76@gmail.com>
>>>>
>>>> Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
>>>> This fixes a compilation issue.
>>>>
>>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>>> Signed-off-by: Jehl Theo <theojehl76@gmail.com>
>>>> ---
>>>> OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>>> index a859375fb819..52fb3b4944bf 100644
>>>> --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>>> +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
>>>> @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
>>>> ;-------------------------------------------------------------------------------------
>>>> global ASM_PFX(AsmGetRelocationMap)
>>>> ASM_PFX(AsmGetRelocationMap):
>>>> - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
>>>> + lea rax, [AsmRelocateApMailBoxLoopStart]
>>>> mov qword [rcx], rax
>>>> mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd - AsmRelocateApMailBoxLoopStart
>>>> ret
>>>
>>>
>>>
>>>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 19857 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 3:26 ` Andrew Fish
@ 2022-05-26 6:41 ` Théo Jehl
0 siblings, 0 replies; 9+ messages in thread
From: Théo Jehl @ 2022-05-26 6:41 UTC (permalink / raw)
To: Andrew Fish, devel
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
Hello Andrew and Rebecca,
This issue happens on macOS when the CPATH variable is not set, headers are stored within the Xcode tools and are not included by default in the path.
export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
Usually fixes it, if you want to know where the header is:
sudo find /Library -name Availability.h
Best regards,
Theo Jehl
[-- Attachment #2: Type: text/html, Size: 433 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* 回复: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 1:26 ` [edk2-devel] " Rebecca Cran
2022-05-26 2:22 ` Andrew Fish
@ 2022-05-26 8:34 ` gaoliming
2022-05-26 9:36 ` Yao, Jiewen
[not found] ` <16F29E124EEA86CB.7812@groups.io>
1 sibling, 2 replies; 9+ messages in thread
From: gaoliming @ 2022-05-26 8:34 UTC (permalink / raw)
To: devel, quic_rcran, theojehl76, min.m.xu, jiewen.yao
Cc: 'Ard Biesheuvel', 'Jiewen Yao',
'Jordan Justen', 'Gerd Hoffmann'
Min:
This failure is introduced by the commit b22ac35b754d1a071e0b40adc47f7c53c3d77893 OvmfPkg: Update PlatformInitLib to process Tdx hoblist from you. Can you provide the hot fix for this stable tag 202205? This stable tag will be released on tomorrow.
lld-link: error: undefined symbol: memcpy
>>> referenced by e:\code\edk2github\OvmfPkg\Library\PlatformInitLib\IntelTdx.c:191
>>> PlatformInitLib.lib(IntelTdx.obj):(ValidateHobList)
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran
> 发送时间: 2022年5月26日 9:27
> 收件人: devel@edk2.groups.io; theojehl76@gmail.com
> 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>
> 主题: Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> AsmRelocateApMailBoxLoopStart prefix at call
>
> Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
> Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
>
> This lets the build get further, before it runs into Availability.h not
> being found.
>
> If I download
> http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/A
> vailability.h
> and
> http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/A
> vailabilityInternal.h
> into MdePkg/Include
> (which is very much a hack) then the DEBUG and RELEASE builds succeed.
>
> However, NOOPT fails with code generating a call to _memcpy:
>
> Undefined symbols for architecture x86_64:
> "_memcpy", referenced from:
> _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
> ld: symbol(s) not found for architecture x86_64
> "libtool" -static -o
> /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleR
> untimeDxe.lib
> -filelist
> /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_fil
> es.lst
> make: ***
> [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> /Sec/SecMain/DEBUG/SecMain.dll]
> Error 1
>
>
> build.py...
> : error 7000: Failed to execute command
> make tbuild
> [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> /Sec/SecMain]
>
>
> build.py...
> : error F002: Failed to build module
> /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5,
> NOOPT]
>
>
>
> On 5/25/22 17:54, Théo Jehl wrote:
> > From: Theo Jehl <theojehl76@gmail.com>
> >
> > Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
> > This fixes a compilation issue.
> >
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Jehl Theo <theojehl76@gmail.com>
> > ---
> > OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > index a859375fb819..52fb3b4944bf 100644
> > --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
> > ;-------------------------------------------------------------------------------------
> > global ASM_PFX(AsmGetRelocationMap)
> > ASM_PFX(AsmGetRelocationMap):
> > - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
> > + lea rax, [AsmRelocateApMailBoxLoopStart]
> > mov qword [rcx], rax
> > mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd -
> AsmRelocateApMailBoxLoopStart
> > ret
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
2022-05-26 8:34 ` 回复: " gaoliming
@ 2022-05-26 9:36 ` Yao, Jiewen
[not found] ` <16F29E124EEA86CB.7812@groups.io>
1 sibling, 0 replies; 9+ messages in thread
From: Yao, Jiewen @ 2022-05-26 9:36 UTC (permalink / raw)
To: Gao, Liming, devel@edk2.groups.io, quic_rcran@quicinc.com,
theojehl76@gmail.com, Xu, Min M
Cc: 'Ard Biesheuvel', Justen, Jordan L,
'Gerd Hoffmann'
Thank you Liming.
Theo's Patch is reviewed-by: Jiewen Yao <Jiewen.yao@intle.com>
I am creating PR to merge it.
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Thursday, May 26, 2022 4:34 PM
> To: devel@edk2.groups.io; quic_rcran@quicinc.com; theojehl76@gmail.com;
> Xu, Min M <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; Yao, Jiewen
> <jiewen.yao@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; 'Gerd
> Hoffmann' <kraxel@redhat.com>
> Subject: 回复: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> AsmRelocateApMailBoxLoopStart prefix at call
>
> Min:
> This failure is introduced by the commit
> b22ac35b754d1a071e0b40adc47f7c53c3d77893 OvmfPkg: Update
> PlatformInitLib to process Tdx hoblist from you. Can you provide the hot fix for
> this stable tag 202205? This stable tag will be released on tomorrow.
>
> lld-link: error: undefined symbol: memcpy
> >>> referenced by
> e:\code\edk2github\OvmfPkg\Library\PlatformInitLib\IntelTdx.c:191
> >>> PlatformInitLib.lib(IntelTdx.obj):(ValidateHobList)
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran
> > 发送时间: 2022年5月26日 9:27
> > 收件人: devel@edk2.groups.io; theojehl76@gmail.com
> > 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> > <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd
> > Hoffmann <kraxel@redhat.com>
> > 主题: Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> > AsmRelocateApMailBoxLoopStart prefix at call
> >
> > Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
> > Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
> >
> > This lets the build get further, before it runs into Availability.h not
> > being found.
> >
> > If I download
> > http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/A
> > vailability.h
> > and
> > http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/A
> > vailabilityInternal.h
> > into MdePkg/Include
> > (which is very much a hack) then the DEBUG and RELEASE builds succeed.
> >
> > However, NOOPT fails with code generating a call to _memcpy:
> >
> > Undefined symbols for architecture x86_64:
> > "_memcpy", referenced from:
> > _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
> > ld: symbol(s) not found for architecture x86_64
> > "libtool" -static -o
> > /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> > lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleR
> > untimeDxe.lib
> > -filelist
> > /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> > lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_fil
> > es.lst
> > make: ***
> > [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> > /Sec/SecMain/DEBUG/SecMain.dll]
> > Error 1
> >
> >
> > build.py...
> > : error 7000: Failed to execute command
> > make tbuild
> > [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> > /Sec/SecMain]
> >
> >
> > build.py...
> > : error F002: Failed to build module
> > /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5,
> > NOOPT]
> >
> >
> >
> > On 5/25/22 17:54, Théo Jehl wrote:
> > > From: Theo Jehl <theojehl76@gmail.com>
> > >
> > > Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
> > > This fixes a compilation issue.
> > >
> > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > Signed-off-by: Jehl Theo <theojehl76@gmail.com>
> > > ---
> > > OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > index a859375fb819..52fb3b4944bf 100644
> > > --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
> > > ;-------------------------------------------------------------------------------------
> > > global ASM_PFX(AsmGetRelocationMap)
> > > ASM_PFX(AsmGetRelocationMap):
> > > - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
> > > + lea rax, [AsmRelocateApMailBoxLoopStart]
> > > mov qword [rcx], rax
> > > mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd -
> > AsmRelocateApMailBoxLoopStart
> > > ret
> >
> >
> >
> >
> >
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
[not found] ` <16F29E124EEA86CB.7812@groups.io>
@ 2022-05-26 10:51 ` Yao, Jiewen
0 siblings, 0 replies; 9+ messages in thread
From: Yao, Jiewen @ 2022-05-26 10:51 UTC (permalink / raw)
To: devel@edk2.groups.io, Yao, Jiewen, Gao, Liming,
quic_rcran@quicinc.com, theojehl76@gmail.com, Xu, Min M
Cc: 'Ard Biesheuvel', Justen, Jordan L,
'Gerd Hoffmann'
Merged https://github.com/tianocore/edk2/pull/2919
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
> Sent: Thursday, May 26, 2022 5:37 PM
> To: Gao, Liming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io;
> quic_rcran@quicinc.com; theojehl76@gmail.com; Xu, Min M
> <min.m.xu@intel.com>
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; Justen, Jordan L
> <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>
> Subject: Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> AsmRelocateApMailBoxLoopStart prefix at call
>
> Thank you Liming.
>
> Theo's Patch is reviewed-by: Jiewen Yao <Jiewen.yao@intle.com>
>
> I am creating PR to merge it.
>
> > -----Original Message-----
> > From: gaoliming <gaoliming@byosoft.com.cn>
> > Sent: Thursday, May 26, 2022 4:34 PM
> > To: devel@edk2.groups.io; quic_rcran@quicinc.com; theojehl76@gmail.com;
> > Xu, Min M <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> > Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; 'Gerd
> > Hoffmann' <kraxel@redhat.com>
> > Subject: 回复: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> > AsmRelocateApMailBoxLoopStart prefix at call
> >
> > Min:
> > This failure is introduced by the commit
> > b22ac35b754d1a071e0b40adc47f7c53c3d77893 OvmfPkg: Update
> > PlatformInitLib to process Tdx hoblist from you. Can you provide the hot fix for
> > this stable tag 202205? This stable tag will be released on tomorrow.
> >
> > lld-link: error: undefined symbol: memcpy
> > >>> referenced by
> > e:\code\edk2github\OvmfPkg\Library\PlatformInitLib\IntelTdx.c:191
> > >>> PlatformInitLib.lib(IntelTdx.obj):(ValidateHobList)
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran
> > > 发送时间: 2022年5月26日 9:27
> > > 收件人: devel@edk2.groups.io; theojehl76@gmail.com
> > > 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao
> > > <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd
> > > Hoffmann <kraxel@redhat.com>
> > > 主题: Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove
> > > AsmRelocateApMailBoxLoopStart prefix at call
> > >
> > > Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
> > > Tested-by: Rebecca Cran <quic_rcran@quicinc.com>
> > >
> > > This lets the build get further, before it runs into Availability.h not
> > > being found.
> > >
> > > If I download
> > > http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-
> 18.1/A
> > > vailability.h
> > > and
> > > http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-
> 18.1/A
> > > vailabilityInternal.h
> > > into MdePkg/Include
> > > (which is very much a hack) then the DEBUG and RELEASE builds succeed.
> > >
> > > However, NOOPT fails with code generating a call to _memcpy:
> > >
> > > Undefined symbols for architecture x86_64:
> > > "_memcpy", referenced from:
> > > _ValidateHobList in PlatformInitLib.lib(IntelTdx.obj)
> > > ld: symbol(s) not found for architecture x86_64
> > > "libtool" -static -o
> > >
> /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> > >
> lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/CapsuleR
> > > untimeDxe.lib
> > > -filelist
> > >
> /Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/MdeModu
> > >
> lePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/OUTPUT/object_fil
> > > es.lst
> > > make: ***
> > > [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> > > /Sec/SecMain/DEBUG/SecMain.dll]
> > > Error 1
> > >
> > >
> > > build.py...
> > > : error 7000: Failed to execute command
> > > make tbuild
> > > [/Users/bcran/src/uefi/edk2/Build/OvmfX64/NOOPT_XCODE5/X64/OvmfPkg
> > > /Sec/SecMain]
> > >
> > >
> > > build.py...
> > > : error F002: Failed to build module
> > > /Users/bcran/src/uefi/edk2/OvmfPkg/Sec/SecMain.inf [X64, XCODE5,
> > > NOOPT]
> > >
> > >
> > >
> > > On 5/25/22 17:54, Théo Jehl wrote:
> > > > From: Theo Jehl <theojehl76@gmail.com>
> > > >
> > > > Removed prefix to match AsmRelocateApMailBoxLoopStart declaration.
> > > > This fixes a compilation issue.
> > > >
> > > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > > Signed-off-by: Jehl Theo <theojehl76@gmail.com>
> > > > ---
> > > > OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > > index a859375fb819..52fb3b4944bf 100644
> > > > --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > > +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> > > > @@ -83,7 +83,7 @@ AsmRelocateApMailBoxLoopEnd:
> > > > ;-------------------------------------------------------------------------------------
> > > > global ASM_PFX(AsmGetRelocationMap)
> > > > ASM_PFX(AsmGetRelocationMap):
> > > > - lea rax, [ASM_PFX(AsmRelocateApMailBoxLoopStart)]
> > > > + lea rax, [AsmRelocateApMailBoxLoopStart]
> > > > mov qword [rcx], rax
> > > > mov qword [rcx + 8h], AsmRelocateApMailBoxLoopEnd -
> > > AsmRelocateApMailBoxLoopStart
> > > > ret
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-26 10:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25 23:54 [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call Théo Jehl
2022-05-26 1:26 ` [edk2-devel] " Rebecca Cran
2022-05-26 2:22 ` Andrew Fish
2022-05-26 2:39 ` Rebecca Cran
2022-05-26 3:26 ` Andrew Fish
2022-05-26 6:41 ` Théo Jehl
2022-05-26 8:34 ` 回复: " gaoliming
2022-05-26 9:36 ` Yao, Jiewen
[not found] ` <16F29E124EEA86CB.7812@groups.io>
2022-05-26 10:51 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox