From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 58EF9D8119E for ; Mon, 17 Mar 2025 11:01:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4NpaK9ASL8BtnTje1m6xbIPHxl24jvnUW9AtLqsDNIo=; c=relaxed/simple; d=groups.io; h=Subject:To:From:User-Agent:MIME-Version:Date:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1742209296; v=1; x=1742468494; b=IIfT5slWp/D4ONC3yNMbhlAqRjKP39sMybBVMpy+Va6MCE/COsQSUSxC5lln2ECxnyJ/Hkyp 3se3PmgS9IV1aFGcD0e+K0kBp2ZMLxnZNeTXdgEIOSZHwYmJPDKrRGWu8EQLSd7VWPMiEG2yflr DFTD6jfPaIngyX60R1nh7pgf28ftOEDcqyqdOiGiyzwroAOVfVQftQQsuzK44D517Hz5JoPeLBS /tBhiiUNQ8vXnhw4z29nxnELqol9x48GsDgJv1m27XufxaYU3IuD2K0vkrXTg5DGR2uUx8KuBa8 VeHilJ4uxbJ+YkxkAhC8QSdNQ0gpZSQX8cELM1aVk/JoQ== X-Received: by 127.0.0.2 with SMTP id f6JCYY7687511xFtnTOXqHkk; Mon, 17 Mar 2025 04:01:34 -0700 Subject: [edk2-devel] UefiPayloadPkg debugging To: devel@edk2.groups.io From: "Stepan via groups.io" X-Originating-Location: Barnaul, Altai Krai, RU (109.202.9.135) X-Originating-Platform: Linux Chrome 134 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 17 Mar 2025 04:01:33 -0700 Message-ID: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,radio-fan@mail.ru List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Qf6phEmPkqRSb9eucCFGxgVjx7686176AA= Content-Type: multipart/alternative; boundary="ArgLLUTnG6QwaWZldqYJ" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=IIfT5slW; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io --ArgLLUTnG6QwaWZldqYJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello EDK2 community, I have encountered a strange error. I am trying to activate source code deb= ugging with the following changes: Index: UefiPayloadPkg/UefiPayloadPkg.dsc IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc --- a/UefiPayloadPkg/UefiPayloadPkg.dsc (revision f19361fd31354003185eef2db= a6374805bc6ca9f) +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc (revision 111c1f14db9b0876f66640101= fcb2d498d65e8dd) @@ -26,7 +26,7 @@ FLASH_DEFINITION =3D UefiPayloadPkg/UefiPayloadPkg.fdf PCD_DYNAMIC_AS_DYNAMICEX =3D TRUE - DEFINE SOURCE_DEBUG_ENABLE =3D FALSE + DEFINE SOURCE_DEBUG_ENABLE =3D TRUE DEFINE PS2_KEYBOARD_ENABLE =3D TRUE DEFINE RAM_DISK_ENABLE =3D FALSE DEFINE SIO_BUS_ENABLE =3D TRUE @@ -59,7 +59,7 @@ # DEFINE UNIVERSAL_PAYLOAD =3D TRUE #DEFINE UNIVERSAL_PAYLOAD =3D FALSE - DEFINE UNIVERSAL_PAYLOAD_FORMAT =3D ELF + DEFINE UNIVERSAL_PAYLOAD_FORMAT =3D FIT # # NULL: NullMemoryTestDxe @@ -293,6 +293,7 @@ !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebu= g/PeCoffExtraActionLibDebug.inf DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSe= rialPort/DebugCommunicationLibSerialPort.inf + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf !else PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCo= ffExtraActionLibNull.inf DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.in= f @@ -435,6 +436,10 @@ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiS= mmCoreSmmServicesTableLib.inf + !if $(SOURCE_DEBUG_ENABLE) + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.= inf + !endif + MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiS= mmCoreMemoryAllocationLib.inf SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/Sm= mCorePlatformHookLibNull.inf SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf @@ -449,6 +454,10 @@ !if $(SMM_SUPPORT) =3D=3D TRUE PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + !if $(SOURCE_DEBUG_ENABLE) + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.= inf + !endif + MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAlloca= tionLib.inf SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLi= b.inf SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf I drew information from the following sources: https://raw.githubuserconten= t.com/wiki/tianocore/tianocore.github.io/OSFC/Debugging_UEFI_Firmware_Linux= _Workshop_OSFC_19.pdf , https://cdrdv2-public.intel.com/671474/udk-debugger= -tool-user-manual-v1-11.pdf. Building and running on the target platform causes execution to stop at the= following message: Updated SBL Performance Table: S1 =3D 692000000ns, S2 =3D 2179000000ns, OSL= =3D 37000000ns Payload entry: 0x008085BB Switch to x64 mode Jump to payload Entering Universal Payload... sizeof(UINTN) =3D 0x8 BootloaderParameter =3D 0x47810000 Start init Hobs... ... HOB[63]: Type =3D EFI_HOB_TYPE_FV, Offset =3D 0x1AF0, Length =3D 0x18 BaseAddress =3D 0xB71000 Length =3D 0x59000 There are totally 64 Hobs, the End Hob address is 42DB9B08 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D PDB =3D /edk/Build/UefiPayloadPkg/DEBUG_GCC5/X64/MdeModulePkg/Core/Dxe/D= xeMain/DEBUG/DxeCore.dll Then the download is interrupted. I don't understand why this is happening.= Just a few days ago it was working and the log was as follows: ... Updated SBL Performance Table: S1 =3D 694000000ns, S2 =3D 2136000000ns, OSL= =3D 38000000ns Payload entry: 0x008015A8 Jump to payload Send INIT break packet and try to connect the HOST (Intel(R) UDK Debugger T= ool v1.5) ... \xFE \x3F \x06 \x59 \xBA HOST connection is successful! ... -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121203): https://edk2.groups.io/g/devel/message/121203 Mute This Topic: https://groups.io/mt/111746873/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --ArgLLUTnG6QwaWZldqYJ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hello EDK2 community,
 
I have encountered a strange error. I am trying to activate source cod= e debugging with the following changes:
 
Index: UefiPayloadPkg/UefiPayloadPkg.dsc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc	(revision f19361fd31354003185eef2db=
a6374805bc6ca9f)
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc	(revision 111c1f14db9b0876f66640101=
fcb2d498d65e8dd)
@@ -26,7 +26,7 @@
   FLASH_DEFINITION                    =3D UefiPayloadPkg/UefiPayloadPkg.fd=
f
   PCD_DYNAMIC_AS_DYNAMICEX            =3D TRUE
=20
-  DEFINE SOURCE_DEBUG_ENABLE          =3D FALSE
+  DEFINE SOURCE_DEBUG_ENABLE          =3D TRUE
   DEFINE PS2_KEYBOARD_ENABLE          =3D TRUE
   DEFINE RAM_DISK_ENABLE              =3D FALSE
   DEFINE SIO_BUS_ENABLE               =3D TRUE
@@ -59,7 +59,7 @@
   #
   DEFINE UNIVERSAL_PAYLOAD            =3D TRUE
   #DEFINE UNIVERSAL_PAYLOAD            =3D FALSE
-  DEFINE UNIVERSAL_PAYLOAD_FORMAT     =3D ELF
+  DEFINE UNIVERSAL_PAYLOAD_FORMAT     =3D FIT
=20
   #
   # NULL:    NullMemoryTestDxe
@@ -293,6 +293,7 @@
 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE
   PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDeb=
ug/PeCoffExtraActionLibDebug.inf
   DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibS=
erialPort/DebugCommunicationLibSerialPort.inf
+  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib=
.inf
 !else
   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC=
offExtraActionLibNull.inf
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.i=
nf
@@ -435,6 +436,10 @@
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/Pi=
SmmCoreSmmServicesTableLib.inf
=20
+  !if $(SOURCE_DEBUG_ENABLE)
+    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.=
inf
+  !endif
+
   MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/Pi=
SmmCoreMemoryAllocationLib.inf
   SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/S=
mmCorePlatformHookLibNull.inf
   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
@@ -449,6 +454,10 @@
 !if $(SMM_SUPPORT) =3D=3D TRUE
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
=20
+  !if $(SOURCE_DEBUG_ENABLE)
+    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.=
inf
+  !endif
+
   MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAlloc=
ationLib.inf
   SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableL=
ib.inf
   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
 
Building and running on the target platform causes execution to stop a= t the following message:
 
Updated SBL Performance Table: S1 =3D 692000000ns, S2 =3D 2179000000ns=
, OSL =3D 37000000ns
Payload entry: 0x008085BB
Switch to x64 mode
Jump to payload

Entering Universal Payload...
sizeof(UINTN) =3D 0x8
BootloaderParameter =3D 0x47810000
Start init Hobs...

...

HOB[63]: Type =3D EFI_HOB_TYPE_FV, Offset =3D 0x1AF0, Length =3D 0x18
   BaseAddress =3D 0xB71000
   Length      =3D 0x59000
There are totally 64 Hobs, the End Hob address is 42DB9B08
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
    PDB =3D /edk/Build/UefiPayloadPkg/DEBUG_GCC5/X64/MdeModulePkg/Core/Dxe/=
DxeMain/DEBUG/DxeCore.dll
 
Then the download is interrupted. I don't understand why this is happe= ning. Just a few days ago it was working and the log was as follows:
 
...
Updated SBL Performance Table: S1 =3D 694000000ns, S2 =3D 2136000000ns, OSL=
 =3D 38000000ns
Payload entry: 0x008015A8
Jump to payload

Send INIT break packet and try to connect the HOST (Intel(R) UDK Debugger T=
ool v1.5) ...
\xFE\x3F\x06\x59\=
xBAHOST connection is successful! ...
 
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#121203) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--ArgLLUTnG6QwaWZldqYJ--