From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) by mx.groups.io with SMTP id smtpd.web10.16912.1602780114180516481 for ; Thu, 15 Oct 2020 09:41:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=p39b/5De; spf=pass (domain: apple.com, ip: 17.171.2.60, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 09FGccWR057951; Thu, 15 Oct 2020 09:41:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=nN8fnuNh8ZnBZcXnATmjXrcqCiQEG4TBWVGfH4YLkFs=; b=p39b/5Dek+0DwN6vN3ECFlJ+QhTSPx/T1ETutYwSRDZYJvrwGLLzMfuz8mu9Tfj58Q/B fu/H72df90YFxJI/sF241dGQPVlkspPoQ3qrHX+WQLuBj9DlrU1WIX3agIaR8IYTzpi0 +SWJsbvU8597UMCMchZ37Ik+gJhrJyJOTJ+8HhGCyjTDpQJmVedHUGvNdceB0G/41Ice gGhsDMngBQGoYGjE9bZ/vVIHVPitn/KN9YFmbhwU2QtKxYrHb0KQtg3tYCWfImeRqe1I +OQOQA36kHKwBm/kb3YBVPIFAIgscztusqcY3gcmL6h51j7x6exQeOXJbnYMRuWWnzr3 RA== Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 343bm3thfx-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 15 Oct 2020 09:41:35 -0700 Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QI900KK7517DTP0@rn-mailsvcp-mta-lapp01.rno.apple.com>; Thu, 15 Oct 2020 09:41:32 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) id <0QI90090050BDD00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Thu, 15 Oct 2020 09:41:31 -0700 (PDT) X-Va-A: X-Va-T-CD: 13715775cfe6ed78bc954dbcb503dbb2 X-Va-E-CD: 0dd20217439c8f7e4435269c02e4ae69 X-Va-R-CD: 9f82b2c1b3ef7cbab6e74857bfdfb5f2 X-Va-CD: 0 X-Va-ID: 319f54e7-b7e9-4ea4-93cd-b6e57792a63b X-V-A: X-V-T-CD: 13715775cfe6ed78bc954dbcb503dbb2 X-V-E-CD: 0dd20217439c8f7e4435269c02e4ae69 X-V-R-CD: 9f82b2c1b3ef7cbab6e74857bfdfb5f2 X-V-CD: 0 X-V-ID: ed76c814-03bc-46ce-aff8-f7461ac26a43 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-15_10:2020-10-14,2020-10-15 signatures=0 Received: from [17.235.52.196] (unknown [17.235.52.196]) by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPSA id <0QI900EQD5152000@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Thu, 15 Oct 2020 09:41:31 -0700 (PDT) From: "Andrew Fish" Message-id: <2DABFFC5-4D99-42D6-8D06-9D53A337E8A4@apple.com> MIME-version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: OSX / XCODE5-specific issue with OVMF?... Date: Thu, 15 Oct 2020 09:41:29 -0700 In-reply-to: <82777afd-d08c-87ae-37dc-2562d2b9506c@redhat.com> Cc: "Liming Gao (Byosoft address)" , edk2-devel-groups-io , Daniele Crudo To: Laszlo Ersek References: <82777afd-d08c-87ae-37dc-2562d2b9506c@redhat.com> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-15_10:2020-10-14,2020-10-15 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_BD770275-32A7-4831-915D-CDE0741DDFC6" --Apple-Mail=_BD770275-32A7-4831-915D-CDE0741DDFC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Laszlo, The Logo issue is likely related to lack of support of HII Sections in = PE/COFF for the XCODE toolchain. It is the same reason these commands[1] = are not included in the OVMF build. I submitted some patches a while = back to fix this, I need to follow as I=E2=80=99m not sure they got = integrated. So the logo issue is not related.=20 Is the system hung or just not working? If it is hung you can try and = attach via lldb to see your location. If it is just not working then I = think you will need to do the DEBUG prints that Laszlo mentioned.=20 In general if you have XCODE specific issues it is often time related to = clang being so aggressive about optimizing out undefined behavior.=20 If you pass ` -gdb tcp::9000` to QEMU you can attach with lldb via: lldb -o "settings set plugin.process.gdb-remote.target-definition-file = x86_64_target_definition.py" -o "gdb-remote 9000" You only need the plugin.process.gdb-remote.target-definition-file if = you have an older lldb and older QEMU. Long story but lldb did not = support the XML description of the target. If this works you will get = registers and an unsymbolicated backtrace.=20 [1] = https://github.com/tianocore/edk2/blob/master/OvmfPkg/OvmfPkgX64.dsc#L898 !if $(TOOL_CHAIN_TAG) !=3D "XCODE5" ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE } ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE } = OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf = { gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE } !endif [2] You can find x86_64_target_definition.py here: = https://opensource.apple.com/source/lldb/lldb-310.2.36/examples/python/x86= _64_target_definition.py.auto.html Thanks, Andrew Fish > On Oct 15, 2020, at 9:06 AM, Laszlo Ersek wrote: >=20 > Hi Andrew, Liming, >=20 > can you please take a look at > ? Daniele has a > quite specific VM setup with OVMF, and it only causes an issue if the > OVMF binary was built on OSX with XCODE5. I'm out of ideas. >=20 > Thanks, > Laszlo >=20 --Apple-Mail=_BD770275-32A7-4831-915D-CDE0741DDFC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Laszlo,

The= Logo issue is likely related to lack of support of HII Sections in = PE/COFF for the XCODE toolchain. It is the same reason these commands[1] = are not included in the OVMF build. I submitted some patches a while = back to fix this, I need to follow as I=E2=80=99m not sure they got = integrated. So the logo issue is not related. 

Is the system hung or = just not working? If it is hung you can try and attach via lldb to see = your location. If it is just not working then I think you will need to = do the DEBUG prints that Laszlo mentioned. 

In general if you have XCODE specific = issues it is often time related to clang being so aggressive about = optimizing out undefined behavior. 

If you pass ` -gdb tcp::9000` to = QEMU you can attach with lldb via:
lldb -o = "settings set plugin.process.gdb-remote.target-definition-file = x86_64_target_definition.py" -o "gdb-remote 9000"
You only need = the plugin.process.gdb-remote.target-definition-file if you have an = older lldb and older QEMU. Long story but lldb did not support the XML = description of the target. If this works you will get registers and an = unsymbolicated backtrace. 



!if = $(TOOL_CHAIN_TAG) !=3D "XCODE5"
= ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
= ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
= OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf = {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
!endif

Thanks,

Andrew Fish

On Oct = 15, 2020, at 9:06 AM, Laszlo Ersek <lersek@redhat.com> = wrote:

Hi Andrew, Liming,

can you = please take a look at
<https://bugzilla.tianocore.org/show_bug.cgi?id=3D3006>? = Daniele has a
quite specific VM setup with OVMF, and it = only causes an issue if the
OVMF binary was built on OSX = with XCODE5. I'm out of ideas.

Thanks,
Laszlo


= --Apple-Mail=_BD770275-32A7-4831-915D-CDE0741DDFC6--