* DxeIpl module cannot find DXE entry point
@ 2018-08-09 12:14 Hristo Mihaylov
2018-08-09 16:40 ` Laszlo Ersek
0 siblings, 1 reply; 4+ messages in thread
From: Hristo Mihaylov @ 2018-08-09 12:14 UTC (permalink / raw)
To: edk2-devel@lists.01.org
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 {
<LibraryClasses>
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
}
```
And for the DXE Main:
```
MdeModulePkg/Core/Dxe/DxeMain.inf {
<LibraryClasses>
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
NULL| MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
<PcdsFixedAtBuild>
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?
Regards,
Hristo Mihaylov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DxeIpl module cannot find DXE entry point
2018-08-09 12:14 DxeIpl module cannot find DXE entry point Hristo Mihaylov
@ 2018-08-09 16:40 ` Laszlo Ersek
[not found] ` <c98dc9df50b045a19439a255319a8d63@prodrive-technologies.com>
0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2018-08-09 16:40 UTC (permalink / raw)
To: Hristo Mihaylov, edk2-devel@lists.01.org
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 {
> <LibraryClasses>
> NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
> }
> ```
>
> And for the DXE Main:
>
> ```
> MdeModulePkg/Core/Dxe/DxeMain.inf {
> <LibraryClasses>
> DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
> NULL| MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
> <PcdsFixedAtBuild>
> 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 = ...
...
<offset>|<size>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-15 10:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-09 12:14 DxeIpl module cannot find DXE entry point Hristo Mihaylov
2018-08-09 16:40 ` Laszlo Ersek
[not found] ` <c98dc9df50b045a19439a255319a8d63@prodrive-technologies.com>
2018-08-14 13:17 ` Laszlo Ersek
[not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103BBAD3DE@shsmsx102.ccr.corp.intel.com>
2018-08-15 10:26 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox