From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 16AAD210C9991 for ; Thu, 9 Aug 2018 09:40:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1404A8197029; Thu, 9 Aug 2018 16:40:46 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-52.rdu2.redhat.com [10.10.121.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6133010FFE6C; Thu, 9 Aug 2018 16:40:45 +0000 (UTC) To: Hristo Mihaylov , "edk2-devel@lists.01.org" References: From: Laszlo Ersek Message-ID: Date: Thu, 9 Aug 2018 18:40:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 09 Aug 2018 16:40:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 09 Aug 2018 16:40:46 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: DxeIpl module cannot find DXE entry point X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 16:40:47 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/09/18 14:14, Hristo Mihaylov wrote: > Hello, > > This is my first time posting to a mailing list. I am building a custom platform that fails when handing off control from PEIM to DXE. > > Here's the error: > > ``` > ASSERT_EFI_ERROR (Status = Not Found) > ASSERT c:\users\hrimih\documents\work\scalable\bios\MdeModulePkg\Core\DxeIplPeim\DxeLoad.c(480): !EFI_ERROR (Status) > ``` > > In the platform only the DXE phase is compressed, using LZMA. I suspect that it's not being decompressed and the module cannot find the DXE entry point. > > This is the relevant .FDF part. > > ``` > [FV.FVMAIN] > BlockSize = 0x10000 > FvAlignment = 16 > ERASE_POLARITY = 1 > MEMORY_MAPPED = TRUE > STICKY_WRITE = TRUE > LOCK_CAP = TRUE > LOCK_STATUS = TRUE > WRITE_DISABLED_CAP = TRUE > WRITE_ENABLED_CAP = TRUE > WRITE_STATUS = TRUE > WRITE_LOCK_CAP = TRUE > WRITE_LOCK_STATUS = TRUE > READ_DISABLED_CAP = TRUE > READ_ENABLED_CAP = TRUE > READ_STATUS = TRUE > READ_LOCK_CAP = TRUE > READ_LOCK_STATUS = TRUE > FvNameGuid = CDBB7B35-6833-4ed6-9AB2-57D2ACDDF6F0 > > .... > INF modules > .... > > [FV.FVMAIN_COMPACT] > FvAlignment = 16 > ERASE_POLARITY = 1 > MEMORY_MAPPED = TRUE > STICKY_WRITE = TRUE > LOCK_CAP = TRUE > LOCK_STATUS = TRUE > WRITE_DISABLED_CAP = TRUE > WRITE_ENABLED_CAP = TRUE > WRITE_STATUS = TRUE > WRITE_LOCK_CAP = TRUE > WRITE_LOCK_STATUS = TRUE > READ_DISABLED_CAP = TRUE > READ_ENABLED_CAP = TRUE > READ_STATUS = TRUE > READ_LOCK_CAP = TRUE > READ_LOCK_STATUS = TRUE > FvNameGuid = 27A72E80-3118-4c0c-8673-AA5B4EFA9613 > > FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { > SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { > SECTION FV_IMAGE = FVMAIN > } > } > ``` > > Then in the .DSC I have: > > ``` > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { > > NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf > } > ``` > > And for the DXE Main: > > ``` > MdeModulePkg/Core/Dxe/DxeMain.inf { > > DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf > NULL| MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf > > gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 > } > ``` > > I expect that this PEIM module will decompress the DXE partition and find the entry point: > > ``` > DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > ``` > > Any advice on how I can debug/fix this? Do you have a BuildFvHob() call in one of your PEIMs that exposes the base address and the size of the FVMAIN_COMPACT firmware volume? That's usually done with PCDs, such as: ------- [FD.FooBar] BaseAddress = ... Size = ... BlockSize = ... NumBlocks = ... ... | PcdFvBaseAddress|PcdFvSize FV = FVMAIN_COMPACT ------- And then in one of your PEIMs (usually the "platform" PEIM): ------- BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize)); ------- Because, your error message seems to come from the DxeIplFindDxeCore() function, after the PeiServicesFfsFindNextVolume() call fails. (I don't know what edk2 release you are using; the line number 480 doesn't match anything for me, but this is what I suspect anyway.) And, PeiServicesFfsFindNextVolume() seems to work off of FV HOBs. In the PI 1.6 spec, see Volume 1, - 9 PEI to DXE Handoff - 9.3 Passing the Hand-Off Block (HOB) List "One or more Firmware Volume HOB(s)" are required; "The DXE Foundation needs this information to begin loading other drivers in the platform." See also "5.7 Firmware Volume HOB" in Volume 3. HTH, Laszlo