UEFI edk2/FmpDevicePkg在tiancore中执行后崩溃



我在tiancore/edk2中构建了FmpDevicePkg。然后,我在EmulatorX64和Minnow板中加载eif驱动程序。两次都没有任何消息就崩溃了。我可以在Visual Studio中为其他驱动程序/应用程序包设置断点。然而,对于FmpDevicePkg,它不能设置断点,在我加载驱动程序后直接崩溃。有人知道怎么调试吗?或者我如何测试FmpDevicePkg驱动程序?(或相关胶囊)任何建议都是非常感谢的。

谢谢!我

我跟踪了代码,发现它挂在下面:

  1. PcdGetBool (PcdTestKeyUsed);
  2. PcdSetBoolS (PcdTestKeyUsed, TRUE);

详细如下: edk2 FmpDevicePkg FmpDxe DetectTestKey.c

DetectTestKey (
VOID
)
{
….
// If PcdTestKeyUsed is already TRUE, then skip test key detection
//
TestKeyUsed = PcdGetBool (PcdTestKeyUsed); -> system hang
..
// If test key detected or an error occurred checking for the test key, then
// set PcdTestKeyUsed to TRUE.
//
if (TestKeyUsed) {
DEBUG ((DEBUG_INFO, "FmpDxe(%s): Test key detected in PcdFmpDevicePkcs7CertBufferXdr.n", mImageIdName));
PcdSetBoolS (PcdTestKeyUsed, TRUE);   -> system hang

我从

修改了MdeModulePkgMdeModulePkg.dec
PcdsDynamic, PcdsDynamicEx]
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003

:

[PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003

It work fine.

最新更新