From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E1715AC0C89 for ; Thu, 7 Dec 2023 08:41:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2U73Gd802EBRsPoxyWR1TKJ/vAMUY1rejhVA2G5GVzQ=; c=relaxed/simple; d=groups.io; h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1701938469; v=1; b=dydporLkITh3MtY5gm2L5dGbNbP5MLs5oER1Deq3lsh0YdV15VfaXIRI4AmSsafbE4VyeZc8 le2sBM5WevXseGhwC6gM4N8oYsKK86vmME9UXF1yROSTI/9+lNz2PLpTBWgGd3jYYqLl82/R6+I 8V4wjsrD3G6Iv78pDgK+PB5g= X-Received: by 127.0.0.2 with SMTP id J4lkYY7687511xHYRUXfLklF; Thu, 07 Dec 2023 00:41:09 -0800 X-Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web10.79649.1701938468799202614 for ; Thu, 07 Dec 2023 00:41:09 -0800 X-Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-332c0c32d19so774614f8f.3 for ; Thu, 07 Dec 2023 00:41:08 -0800 (PST) X-Gm-Message-State: 0tZbrMBg31pZCLikI4Bxo8p5x7686176AA= X-Google-Smtp-Source: AGHT+IEGd/iuzpTwlx95oLniGCyLJwZZyS7b0yd1x5zCQxgapJfF6VrjPT2H0CL47MrVx2U0cZxpkRN8iXhuC7ABmu8= X-Received: by 2002:a5d:6808:0:b0:332:f495:4fbf with SMTP id w8-20020a5d6808000000b00332f4954fbfmr1356220wru.71.1701938466673; Thu, 07 Dec 2023 00:41:06 -0800 (PST) MIME-Version: 1.0 From: "Mike Beaton" Date: Thu, 7 Dec 2023 08:40:55 +0000 Message-ID: Subject: [edk2-devel] CLANGDWARF OVMF hangs on start To: devel@edk2.groups.io Cc: Gerd Hoffmann , Ard Biesheuvel , Liming Gao , Rebecca Cran , Michael D Kinney Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mjsbeaton@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dydporLk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io >From commit https://github.com/tianocore/edk2/commit/140e4422b16482f0bcafdc20d42141434d450450 (and see also the preceding commit, which I believe is related) up to the current tip of master, CLANGDWARF OVMF is broken. It builds and starts but hangs early (more info below). I do not currently have a patch to offer though of course it would be useful if this could be resolved. Note: I've cc'd those folks who have more or less recently (this year) authored or reviewed commits which have modified CLANGDWARF OVMF build behaviour in various interesting ways, including the above, as described below. ### More detail: Using the following commands ``` cd OvmfPkg ./build.sh -a X64 -b NOOPT -t CLANGDWARF -D DEBUG_ON_SERIAL_PORT=1 ./build.sh -a X64 -b NOOPT -t CLANGDWARF qemu -serial stdio ``` from the mentioned commit up to the current tip of master CLANGDWARF OVMF builds, but when started it hangs, repeatedly outputting the line `SecCoreStartupWithStack(0xFFFCC000, 0x820000)`. Prior to that commit, CLANGDWARF OVMF builds and starts normally (though see the following). As additional possibly helpful information, it may be worth noting that if we go back further we reach https://github.com/tianocore/edk2/commit/c6f47e678f994ac86d36955d24baae465330d356 which is the earliest commit with correct behaviour. In the commit before that CLANGDWARF OVMF builds but when run stops with an ASSERT, and in the commit before that again, CLANGDWARF OVMF does not build, giving: ``` In file included from /home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/a_sign.c:22: ... In file included from /usr/include/stdint.h:34: /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: error: typedef redefinition with different types ('__int64_t' (aka 'long') vs 'INT64' (aka 'long long')) typedef __int64_t int64_t; ^ /home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/include/openssl/e_os2.h:238:15: note: previous definition is here typedef INT64 int64_t; ^ ... /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:27:20: error: typedef redefinition with different types ('__uint64_t' (aka 'unsigned long') vs 'UINT64' (aka 'unsigned long long')) typedef __uint64_t uint64_t; ^ /home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/include/openssl/e_os2.h:239:16: note: previous definition is here typedef UINT64 uint64_t; ^ ... 2 errors generated. ``` That failure to build persists back in the commit history for some time. I didn't find a commit further back than that where CLANGDWARF OVMF builds and runs correctly with current tools, though the exact build failure changes at different points in the commit history, and I haven't bisected everything which happens. (Note: when doing the above bisects, it seems helpful/necessary to rebuild base tools, plus of course `git submodule update --init`, at each step to get reliable results.) Mike -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112168): https://edk2.groups.io/g/devel/message/112168 Mute This Topic: https://groups.io/mt/103030855/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-