From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3D4E68213F for ; Thu, 23 Feb 2017 09:55:20 -0800 (PST) Received: by mail-it0-x22e.google.com with SMTP id y135so11374421itc.1 for ; Thu, 23 Feb 2017 09:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IXz3GKekM/aOUV+SGm4aMWvL1jkjBWn2LJI/u3ii1os=; b=H4ZebUMJ6fSBuvnGFq94ByQMYu2ew6kKys/qd5r9+Ghu8K4Pes7uk+96yatxAMDz4j GOyqT4krLIeCduZBOxLA7kqrxGRdQlgrJR9iyq1PwIQZra1l9xl1z2y4hBP80ah6hF/o Ko6OPWdrIz65TniEMsDUpf7siGyLzdq2H+ZVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IXz3GKekM/aOUV+SGm4aMWvL1jkjBWn2LJI/u3ii1os=; b=OUdoyZkXdsE3kfqyrr1aQbf7oaIuSvhkBLkproRsz/sY56BQ1iWxn8wSPdTZttkXUE OgOvchI/h/fgYa6BHzJjdDZloBeBfhEyToxqicVh5bayyVsvrgARDRPaPrfc97Y4Z94N dryfHShXsxMSQ1jOxwI9i+fRcatbhWW19rZV0uRdXsLKyRdFOHH1RYwOIfwF9ZLKMMGB 6idnZ4Qgc8DiF8pJPk50Pqf9wFxi+DZiyRAy7UJs8ENSQi8fH3l6vFn41cW3p8wdLGaU PdkOdXXQERIwwPcJjSDWKGEpCZPw5AoVstqzL72Ua5Kewxy2AsgPCOscNQGahS2S9r9I JeLA== X-Gm-Message-State: AMke39kt5IcB4H6tpsX681S4WS5IzA8eVWFiv/MBGVfCNgjQT/bb4ytujWC4v2cbFlJWtzbbqwBjOsRDdRqs1c8P X-Received: by 10.36.74.67 with SMTP id k64mr3526383itb.37.1487872519517; Thu, 23 Feb 2017 09:55:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.198.134 with HTTP; Thu, 23 Feb 2017 09:55:18 -0800 (PST) In-Reply-To: <748aaede-bff0-5716-8626-5599a94c3530@redhat.com> References: <8b3256bc-8157-58c6-2fe1-0e4a6816a46d@redhat.com> <748aaede-bff0-5716-8626-5599a94c3530@redhat.com> From: Ard Biesheuvel Date: Thu, 23 Feb 2017 17:55:18 +0000 Message-ID: To: Laszlo Ersek Cc: "Tian, Feng" , edk2-devel-01 , Leif Lindholm , "Gao, Liming" , "Kinney, Michael D" Subject: Re: DxeCore assert during initialization X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 17:55:20 -0000 Content-Type: text/plain; charset=UTF-8 On 23 February 2017 at 17:51, Laszlo Ersek wrote: > On 02/23/17 18:38, Ard Biesheuvel wrote: >> On 23 February 2017 at 17:33, Laszlo Ersek wrote: >>> On 02/23/17 18:29, Laszlo Ersek wrote: >>> >>>> This is with ArmVirtQemu @ c5c9e7e298ed, running on QEMU v2.8.0-1290-gc3618551719b, using TCG. >>> >>> Hm, I have some patches in QEMU, so that hash will likely not resolve on >>> your side. The first upstream ancestor is e295a154c2a9. >>> >> >> Could you please double check? >> >> $ git show e295a154c2a9 >> fatal: ambiguous argument 'e295a154c2a9': unknown revision or path not >> in the working tree. > > That's the QEMU git hash: > > e295a154c2a9 ("Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170221' into staging", 2017-02-21) > > http://git.qemu-project.org/?p=qemu.git;a=commit;h=e295a154c2a9 > >> >> In any case, it faults on address 0x1383C6E94 with a data abort due to >> permissions, which can only be caused by a store to read-only region. >> >> This is at the end of the .text segment of UiApp.dll >> >> Could you open the .dll in GDB (you may need to do 'set architecture >> aarch64'), and paste the output of >> >> disas *0x3070 > > I don't have an aarch64 GDB on my laptop, but I have addr2line: > > $ aarch64-linux-gnu-addr2line \ > -e Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG/UiApp.debug \ > 0x3070 > .../MdeModulePkg/Application/UiApp/FrontPage.c:834 > > This looks reasonable, because the crash hit after I pressed ESC on the splash screen, and was about to get in the menu. > > 826 // > 827 // Set PCD to Inform GraphicsConsole to change video resolution. > 828 // Set PCD to Inform Consplitter to change text mode. > 829 // > 830 Status = PcdSet32S (PcdVideoHorizontalResolution, NewHorizontalResolution); > 831 ASSERT_EFI_ERROR (Status); > 832 Status = PcdSet32S (PcdVideoVerticalResolution, NewVerticalResolution); > 833 ASSERT_EFI_ERROR (Status); > 834 Status = PcdSet32S (PcdConOutColumn, NewColumns); <---------- here > 835 ASSERT_EFI_ERROR (Status); > 836 Status = PcdSet32S (PcdConOutRow, NewRows); > 837 ASSERT_EFI_ERROR (Status); > > Disassembly with objdump: > > Status = PcdSet32S (PcdConOutColumn, NewColumns); > 3064: f00001a0 adrp x0, 3a000 > 3068: 913a5000 add x0, x0, #0xe94 > 306c: b9407ba1 ldr w1, [x29,#120] > 3070: b9000001 str w1, [x0] <--------- here > 3074: f90033bf str xzr, [x29,#96] > > Does this help? > Yes, it does. This bit, from BaseTools/Scripts/GccBase.lds /* * The contents of AutoGen.c files are constant from the POV of the program, * but most of its contents end up in .data or .bss by default since few of * the variable definitions that get emitted are declared as CONST. */ *:AutoGen.obj(.data .data.* .bss .bss.*) turns out to be inaccurate: AutoGen.c also contains (in this case), .data._gPcd_BinaryPatch_PcdSetupConOutColumn which is set by the PcdSet32S() call above. Let me try if I can find a nice fix for this, but simply removing the line should solve the issue for you.