From: "Andrew Fish" <afish@apple.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
Rebecca Cran <quic_rcran@quicinc.com>
Cc: 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>
Subject: Re: [edk2-devel] [edk2] [PATCH v1 1/1] OvmfPkg/TdxDxe: Remove AsmRelocateApMailBoxLoopStart prefix at call
Date: Wed, 25 May 2022 20:26:59 -0700 [thread overview]
Message-ID: <B85146C7-E1A9-4C0E-86ED-33C6461EB510@apple.com> (raw)
In-Reply-To: <b6837b15-d7b2-8e18-8e4a-56d82eb3c03f@quicinc.com>
[-- 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 --]
next prev parent reply other threads:[~2022-05-26 3:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B85146C7-E1A9-4C0E-86ED-33C6461EB510@apple.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox