Skip to content

Commit

Permalink
do it better
Browse files Browse the repository at this point in the history
  • Loading branch information
os-d committed Sep 20, 2024
1 parent 49b44f8 commit a14fe4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
13 changes: 6 additions & 7 deletions Platforms/QemuQ35Pkg/QemuQ35Pkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,13 @@
# Bit 1 - Controls whether the DXE debugger is enabled.
# Bit 2 - Controls whether the MM debugger is enabled.
# Bit 3 - Disables the debuggers periodic polling for a requested break-in.
# if BLD_*_DXE_DBG_BRK=TRUE, the debugger will have an initial break in, but will break in, otherwise it only will
# on exceptions
!if $(DXE_DBG_BRK) == TRUE
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0x3
!else
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0x2
!endif

# Set the debugger timeout to wait forever. This only takes effect if Bit 0 of PcdDebugConfigFlags is set
# to 1, which by default it is not. Using BLD_*_DXE_DBG_BRK=TRUE will set this to 1.
Expand Down Expand Up @@ -1044,13 +1050,6 @@ QemuQ35Pkg/Library/ResetSystemLib/StandaloneMmResetSystemLib.inf
<LibraryClasses>
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
<PcdsFixedAtBuild>
## Forcibly enables the debugger with a 30 second initial breakpoint. This can be set from the cmdline by passing
# BLD_*_DXE_DBG_BRK=TRUE. If this is false, the debugger will not have an initial break in, but will break in
# on exceptions
!if $(DXE_DBG_BRK) == TRUE
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0x3
!endif
}

MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
Expand Down
16 changes: 7 additions & 9 deletions Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,13 @@
# Bit 2 - Controls whether the MM debugger is enabled.
# Bit 3 - Disables the debuggers periodic polling for a requested break-in.
# For SBSA, we have to disable the periodic polling, because there is only one one serial port and the debug agent
# may eat console input if let poll on it
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0x6
# may eat console input if let poll on it. If BLD_*_DXE_DBG_BRK is set to TRUE, then the debugger will break in on
# initialization. Otherwise, the debugger will not break in on initialization.
!if $(DXE_DBG_BRK) == TRUE
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0xB
!else
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0xA
!endif

# Set the debugger timeout to wait forever. This only takes effect if Bit 0 of PcdDebugConfigFlags is set
# to 1, which by default it is not. Using BLD_*_DXE_DBG_BRK=TRUE will set this to 1.
Expand Down Expand Up @@ -992,13 +997,6 @@
<LibraryClasses>
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
<PcdsFixedAtBuild>
## Forcibly enables the debugger with a 30 second initial breakpoint. This can be set from the cmdline by passing
# BLD_*_DXE_DBG_BRK=TRUE. If this is false, the debugger will not have an initial break in, but will break in
# on exceptions
!if $(DXE_DBG_BRK) == TRUE
DebuggerFeaturePkgTokenSpaceGuid.PcdDebugConfigFlags|0x7
!endif
}
MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
<LibraryClasses>
Expand Down

0 comments on commit a14fe4f

Please sign in to comment.