From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8ABDE211B7F6B for ; Mon, 21 Jan 2019 20:30:43 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2019 20:30:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,504,1539673200"; d="scan'208";a="118400472" Received: from shzintpr03.sh.intel.com (HELO [10.253.24.58]) ([10.239.4.100]) by fmsmga008.fm.intel.com with ESMTP; 21 Jan 2019 20:30:42 -0800 To: Ard Biesheuvel , Julien Grall Cc: "edk2-devel@lists.01.org" , Laszlo Ersek , star.zeng@intel.com References: <1547479196-40248-1-git-send-email-star.zeng@intel.com> <1547479196-40248-11-git-send-email-star.zeng@intel.com> <7da72765-785c-2499-eefd-d887a946c946@redhat.com> <6263ebd0-4c6a-97bd-7e04-c4f26ec21aa2@linaro.org> <01237fea-c440-a810-eb51-45646f26238e@intel.com> <1a2a4290-c22c-e42d-cb66-a4ec3e3cf90a@linaro.org> From: "Zeng, Star" Message-ID: <806a1c89-90cd-84f0-5bd8-26b351f59556@intel.com> Date: Tue, 22 Jan 2019 12:30:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH V2 10/15] ArmVirtXen: Use merged variable driver for emulated NV mode X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 04:30:43 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 2019/1/22 3:40, Ard Biesheuvel wrote: > On Mon, 21 Jan 2019 at 14:36, Julien Grall wrote: >> >> Hi, >> >> On 21/01/2019 10:46, Zeng, Star wrote: >>> On 2019/1/18 2:59, Julien Grall wrote: >>> I saw the discussion at >>> https://lists.01.org/pipermail/edk2-devel/2019-January/035405.html. Fortunately, >>> it has been fixed. >>> So I did rebase for the code. >>> Repo: git@github.com:lzeng14/edk2.git >>> Branch: MergedVariableDriver_EmuNvMode_V3_rebased >> >> I was about to ask a branch as there were conflicts in the rebase. >> Thank you for providing the branch! >> >>> >>> If you can help have a quick test, that will be very helpful. :) >> >> With your series applied, EDK2 is crashing while the Linux EFI stub >> is running. See the log below. >> >> My knowledge of EDK2 is quite limited, so I am not entirely where to >> look at. I am happy to help debugging if you provide guidance. Thanks for the test. Fortunately, we could catch this before the patch is pushed. :) >> > > Hi Julien, > > Could you try the patch below please? > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c > index a8bb9cf25ebd..adaf6ccb48b0 100644 > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c > @@ -236,14 +236,16 @@ VariableClassAddressChangeEvent ( > { > UINTN Index; > > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetBlockSize); > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetPhysicalAddress); > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetAttributes); > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->SetAttributes); > - EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->FvbInstance->Read); > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->Write); > - EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->EraseBlocks); > - EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->FvbInstance); > + if (mVariableModuleGlobal->FvbInstance != NULL) { > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetBlockSize); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetPhysicalAddress); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->GetAttributes); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->SetAttributes); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->Read); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->Write); > + EfiConvertPointer (0x0, (VOID **) > &mVariableModuleGlobal->FvbInstance->EraseBlocks); > + EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->FvbInstance); > + } > EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->PlatformLangCodes); > EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->LangCodes); > EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal->PlatformLang); Thanks Ard. I integrated it into the patch 10 of V4. Repo: git@github.com:lzeng14/edk2.git Branch: MergedVariableDriver_EmuNvMode_V4 Julien, could you help take a try? Thanks, Star > > > > > >> Press any key to continue... >> >> [Security] 3rd party image[0] can be loaded after EndOfDxe: MemoryMapped(0x2,0x67789000,0x68DF1200). >> >> InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7AB2B040 >> >> Loading driver at 0x00065783000 EntryPoint=0x00066878664 >> >> Loading driver at 0x00065783000 EntryPoint=0x00066878664 >> >> InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7AA54B18 >> >> ProtectUefiImageCommon - 0x7AB2B040 >> >> - 0x0000000065783000 - 0x0000000002006000 >> >> SetUefiImageMemoryAttributes - 0x0000000065783000 - 0x0000000000001000 (0x0000000000004008) >> >> SetUefiImageMemoryAttributes - 0x0000000065784000 - 0x00000000011CD000 (0x0000000000020008) >> >> SetUefiImageMemoryAttributes - 0x0000000066951000 - 0x0000000000E38000 (0x0000000000004008) >> >> EFI stub: Booting Linux Kernel... >> >> EFI stub: Using DTB from configuration table >> >> EFI stub: Exiting boot services and installing virtual address map... >> >> XenBus: Set state to 5 >> >> XenBus: Set state to 5, done >> >> XenPvBlk: waiting backend state 5, current: 4 >> >> XenStore: Watch event 7B036698 >> >> XenBus: Set state to 6 >> >> XenBus: Set state to 6, done >> >> XenPvBlk: waiting backend state 6, current: 5 >> >> XenStore: Watch event 7B036698 >> >> XenBus: Set state to 1 >> >> XenBus: Set state to 1, done >> >> Xen GrantTable, removing 38003 >> >> Xen GrantTable, removing 38002 >> >> Xen GrantTable, removing 38001 >> >> Xen GrantTable, removing 38000 >> >> SetUefiImageMemoryAttributes - 0x000000007BE60000 - 0x0000000000040000 (0x0000000000000008) >> >> SetUefiImageMemoryAttributes - 0x0000000078AE0000 - 0x0000000000050000 (0x0000000000000008) >> >> SetUefiImageMemoryAttributes - 0x0000000078A90000 - 0x0000000000040000 (0x0000000000000008) >> >> SetUefiImageMemoryAttributes - 0x00000000789F0000 - 0x0000000000040000 (0x0000000000000008) >> >> SetUefiImageMemoryAttributes - 0x0000000078950000 - 0x0000000000040000 (0x0000000000000008) >> >> SetUefiImageMemoryAttributes - 0x00000000788B0000 - 0x0000000000040000 (0x0000000000000008) >> >> >> >> >> >> Synchronous Exception at 0x000000007BE70698 >> >> PC 0x00007BE70698 (0x00007BE60000+0x00010698) [ 0] RuntimeDxe.dll >> >> PC 0x000078AFECB0 (0x000078AE0000+0x0001ECB0) [ 1] VariableRuntimeDxe.dll >> >> PC 0x000078AF0AC8 (0x000078AE0000+0x00010AC8) [ 1] VariableRuntimeDxe.dll >> >> PC 0x00007BE7094C (0x00007BE60000+0x0001094C) [ 2] RuntimeDxe.dll >> >> PC 0x00006687E014 >> >> PC 0x00006687C348 >> >> PC 0x000066878680 >> >> PC 0x00007F492BF4 (0x00007F48C000+0x00006BF4) [ 3] DxeCore.dll >> >> PC 0x0000783E6724 >> >> PC 0x0000783E6A38 >> >> PC 0x0000784BF888 >> >> PC 0x0000784605F8 >> >> PC 0x0000784602A4 >> >> PC 0x00007845C608 >> >> PC 0x00007845C838 >> >> PC 0x00007845C914 >> >> PC 0x00007845C974 >> >> PC 0x0000784DFB48 >> >> PC 0x0000786922D0 >> >> PC 0x00007F492BF4 (0x00007F48C000+0x00006BF4) [ 3] DxeCore.dll >> >> PC 0x00007875B27C >> >> PC 0x00007877A2D0 >> >> PC 0x00007F492BF4 (0x00007F48C000+0x00006BF4) [ 3] DxeCore.dll >> >> PC 0x00007BD1912C (0x00007BD0A000+0x0000F12C) [ 4] BdsDxe.dll >> >> PC 0x00007BD0BFBC (0x00007BD0A000+0x00001FBC) [ 4] BdsDxe.dll >> >> PC 0x00007BD0D5C8 (0x00007BD0A000+0x000035C8) [ 4] BdsDxe.dll >> >> PC 0x00007F48E564 (0x00007F48C000+0x00002564) [ 5] DxeCore.dll >> >> PC 0x00007F48D598 (0x00007F48C000+0x00001598) [ 5] DxeCore.dll >> >> PC 0x00007F48D024 (0x00007F48C000+0x00001024) [ 5] DxeCore.dll >> >> PC 0x0000400895C8 >> >> PC 0x0000400897AC >> >> PC 0x000040082B4C >> >> PC 0x000040082C24 >> >> >> >> [ 0] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/DEBUG/RuntimeDxe.dll >> >> [ 1] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe/DEBUG/VariableRuntimeDxe.dll >> >> [ 2] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/DEBUG/RuntimeDxe.dll >> >> [ 3] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll >> >> [ 4] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll >> >> [ 5] /home/julien/works/edk2/Build/ArmVirtXen-AARCH64/DEBUG_GCC49/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll >> >> >> >> X0 0x0000000000000018 X1 0x0000000000000018 X2 0x000000007BE7066C X3 0x000000007BFDD998 >> >> X4 0x000000007BE707D8 X5 0x0000000000000004 X6 0x0000000000000000 X7 0x000000007B036E18 >> >> X8 0x000000007BFFF608 X9 0x0000000400000000 X10 0x000000007B036000 X11 0x000000007BA37FFF >> >> X12 0x0000000000000000 X13 0x0000000000000008 X14 0x000000007FFFEF5C X15 0x0000000000000000 >> >> X16 0x00000000DEADBEEF X17 0x0000000000000000 X18 0x00000000FFFFFFFE X19 0x000000007BFD0018 >> >> X20 0x000000007FFFF170 X21 0x000000007FFFF250 X22 0x0000000000000000 X23 0x000000007F200000 >> >> X24 0x000000007AA54918 X25 0x0000000000000078 X26 0xFFFFFFFFFFFFFFFF X27 0x000000007FFFF150 >> >> X28 0x0000000000000000 FP 0x000000007FFFEFB0 LR 0x0000000078AFECB0 >> >> >> >> V0 0x0000000000000000 0000000000000000 V1 0x0000000000000000 0000000000000000 >> >> V2 0x0000000000000000 0000000000000000 V3 0x0000000000000000 0000000000000000 >> >> V4 0x0000000000000000 0000000000000000 V5 0x0000000000000000 0000000000000000 >> >> V6 0x0000000000000000 0000000000000000 V7 0x0000000000000000 0000000000000000 >> >> V8 0x0000000000000000 0000000000000000 V9 0x0000000000000000 0000000000000000 >> >> V10 0x0000000000000000 0000000000000000 V11 0x0000000000000000 0000000000000000 >> >> V12 0x0000000000000000 0000000000000000 V13 0x0000000000000000 0000000000000000 >> >> V14 0x0000000000000000 0000000000000000 V15 0x0000000000000000 0000000000000000 >> >> V16 0x0000000000000000 0000000000000000 V17 0x0000000000000000 0000000000000000 >> >> V18 0x0000000000000000 0000000000000000 V19 0x0000000000000000 0000000000000000 >> >> V20 0x0000000000000000 0000000000000000 V21 0x0000000000000000 0000000000000000 >> >> V22 0x0000000000000000 0000000000000000 V23 0x0000000000000000 0000000000000000 >> >> V24 0x0000000000000000 0000000000000000 V25 0x0000000000000000 0000000000000000 >> >> V26 0x0000000000000000 0000000000000000 V27 0x0000000000000000 0000000000000000 >> >> V28 0x0000000000000000 0000000000000000 V29 0x0000000000000000 0000000000000000 >> >> V30 0x0000000000000000 0000000000000000 V31 0x0000000000000000 0000000000000000 >> >> >> >> SP 0x000000007FFFEFB0 ELR 0x000000007BE70698 SPSR 0x200000C5 FPSR 0x00000000 >> >> ESR 0x96000000 FAR 0x0000000000000018 >> >> >> >> ESR : EC 0x25 IL 0x1 ISS 0x00000000 >> >> >> >> Data abort: Address size fault, zeroth level of translation or translation table base register >> >> >> >> Stack dump: >> >> 000007FFFEEB0: 000000007FFFEEE0 0000000000000003 0000000000001000 000000007B04EFF8 >> >> 000007FFFEED0: 000000007B04E780 000000030000030C 000000007FFFEF30 000000007BCEA25C >> >> 000007FFFEEF0: 000000007FFFEF70 0000000000000008 0000000000040000 00000000788B0000 >> >> 000007FFFEF10: 0000000000000000 000000007FFFB000 0000000000000000 000000000000070C >> >> 000007FFFEF30: 000000007FFFEF90 000000007F4974E4 0000000000000008 0000000000040000 >> >> 000007FFFEF50: 00000000788B0000 000000007BCF7008 00000000788B0000 006000000000070C >> >> 000007FFFEF70: 0000000000010000 00000000788B0000 0000000000000000 000000000000070C >> >> 000007FFFEF90: 000000007FFFEFD0 000000007BE70E1C 0000000000000078 000000007BFD0018 >> >>> 000007FFFEFB0: 000000007FFFEFF0 0000000078AFECB0 0000000000000018 0000000000000000 >> >> 000007FFFEFD0: 0000000078B109A8 0000000000000000 000000007BFE0000 000000007BFDFF18 >> >> 000007FFFEFF0: 000000007FFFF010 0000000078AF0AC8 0000000000000018 0000000000000000 >> >> 000007FFFF010: 000000007FFFF040 000000007BE7094C 0000000000000000 000000007BFDD998 >> >> 000007FFFF030: 0000000000000000 000000007BFDEA18 000000007FFFF0A0 000000006687E014 >> >> 000007FFFF050: 00000000784D4018 0000000100000000 0000000000000030 00000000000001E0 >> >> 000007FFFF070: 000000007BFD0018 000000007FFFF170 000000007FFFF250 0000000000000000 >> >> 000007FFFF090: 000000007BFDD9F8 000000007BFDDA20 000000007FFFF1B0 000000006687C348 >> >> ASSERT [ArmCpuDxe] /home/julien/works/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(279): ((BOOLEAN)(0==1)) >> >> Cheers, >> >> -- >> Julien Grall >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel