mirror of
https://github.com/UniXNU/uefi-sheng.git
synced 2026-11-07 18:56:05 +03:00
shengPkg: Mu-only bring-up by default, frame buffer log PCDs, GIC spurious guard
SHENG_VENDOR_HW (default 0) gates every stock vendor hardware driver and RamManagerDxe; SimpleFbDxe provides the GOP on the frame buffer the previous stage left scanning out. Observed on the device: with the vendor stack the panel goes black while the backlight stays on, without it CrabApple's menu is shown. The stock DisplayDxe chain stays selectable with USE_CUSTOM_DISPLAY_DRIVER=1 and SHENG_VENDOR_HW=1. sheng.dsc sets the frame buffer geometry from the stock N81A panel XML (3048x2032, 32 bpp, scale 3, 30 ms per log line). Gic-Spurious.patch makes ArmGicV3Dxe mask an interrupt that has no handler instead of re-taking it forever (the leftover IPCC interrupt, INTID 0x105). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Sharky Wang
Unverified
parent
415fd7de39
commit
391df5c9c2
@@ -2,7 +2,9 @@ APRIORI DXE {
|
||||
INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
||||
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/EnvDxe/EnvDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
|
||||
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
|
||||
@@ -12,6 +14,7 @@ APRIORI DXE {
|
||||
INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
|
||||
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SmemDxe/SmemDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/DALSYSDxe/DALSYSDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/HWIODxe/HWIODxe.inf
|
||||
@@ -34,31 +37,47 @@ APRIORI DXE {
|
||||
INF Binaries/sheng/QcomPkg/Drivers/TLMMDxe/TLMMDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/I2CDxe/I2CDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPMIDxe/SPMIDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PmicDxe/PmicDxeLa.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
||||
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
||||
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SdccDxe/SdccDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UFSDxe/UFSDxe.inf
|
||||
!endif
|
||||
|
||||
INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/TzDxe/TzDxeLA.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/DDRInfoDxe/DDRInfoDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/FeatureEnablerDxe/FeatureEnablerDxe.inf
|
||||
!endif
|
||||
!if $(USE_CUSTOM_DISPLAY_DRIVER) == 1
|
||||
INF shengPkg/Drivers/ShengGopLogDxe/ShengGopLogDxe.inf
|
||||
INF shengPkg/Drivers/ShengDisplayDepexDxe/ShengDisplayDepexDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/DisplayDxe/DisplayDxe.inf
|
||||
!else
|
||||
INF SiliciumPkg/Drivers/SimpleFbDxe/SimpleFbDxe.inf
|
||||
!endif
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PILProxyDxe/PILProxyDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PILDxe/PILDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPSSDxe/SPSSDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
@@ -70,6 +89,7 @@ APRIORI DXE {
|
||||
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
||||
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPIDxe/SPIDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PmicGlinkDxe/PmicGlinkDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbPwrCtrlDxe/UsbPwrCtrlDxe.inf
|
||||
@@ -78,11 +98,13 @@ APRIORI DXE {
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbfnDwc3Dxe/UsbfnDwc3Dxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/XhciPciEmulationDxe/XhciPciEmulationDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/XhciDxe/XhciDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
||||
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
|
||||
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbMsdDxe/UsbMsdDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbDeviceDxe/UsbDeviceDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbConfigDxe/UsbConfigDxe.inf
|
||||
@@ -96,11 +118,14 @@ APRIORI DXE {
|
||||
INF Binaries/sheng/QcomPkg/Drivers/GpiDxe/GpiDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UCDxe/UCDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/RNGDxe/RngDxe.inf
|
||||
!endif
|
||||
|
||||
INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf
|
||||
INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
||||
INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
||||
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/RscDxe/RscDxe.inf
|
||||
!endif
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
||||
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/EnvDxe/EnvDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
|
||||
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
|
||||
@@ -9,9 +11,11 @@
|
||||
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
||||
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/ShmBridgeDxe/ShmBridgeDxeLA.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/TzDxe/ScmDxeCompat.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/TzDxe/TzDxeLA.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
||||
@@ -24,6 +28,7 @@
|
||||
INF ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf
|
||||
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/ChipInfoDxe/ChipInfoDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/IPCCDxe/IPCCDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/GLinkDxe/GLinkDxe.inf
|
||||
@@ -35,6 +40,7 @@
|
||||
INF Binaries/sheng/QcomPkg/Drivers/I2CDxe/I2CDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/TLMMDxe/TLMMDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PmicDxe/PmicDxeLa.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
||||
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
||||
@@ -42,6 +48,7 @@
|
||||
INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UFSDxe/UFSDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/CmdDbDxe/CmdDbDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PwrUtilsDxe/PwrUtilsDxe.inf
|
||||
@@ -53,9 +60,12 @@
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPMIDxe/SPMIDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/ICBDxe/ICBDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SmemDxe/SmemDxe.inf
|
||||
!endif
|
||||
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/RscDxe/RscDxe.inf
|
||||
!endif
|
||||
|
||||
INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf
|
||||
INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
|
||||
@@ -64,18 +74,28 @@
|
||||
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
||||
|
||||
# Headless until stock sheng framebuffer data is available.
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/GpiDxe/GpiDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPIDxe/SPIDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SdccDxe/SdccDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/FeatureEnablerDxe/FeatureEnablerDxe.inf
|
||||
|
||||
# Stock sheng display chain: board DEPEX glue, then unchanged vendor
|
||||
# DisplayDxe with the N81A panel data from RAW.inc.
|
||||
# USE_CUSTOM_DISPLAY_DRIVER = 1: stock sheng display chain (board DEPEX glue,
|
||||
# unchanged vendor DisplayDxe with the N81A panel data from RAW.inc).
|
||||
# Otherwise SimpleFbDxe publishes a GOP on the frame buffer the previous
|
||||
# stage left scanning out.
|
||||
!endif
|
||||
!if $(USE_CUSTOM_DISPLAY_DRIVER) == 1
|
||||
INF shengPkg/Drivers/ShengGopLogDxe/ShengGopLogDxe.inf
|
||||
INF shengPkg/Drivers/ShengDisplayDepexDxe/ShengDisplayDepexDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/DisplayDxe/DisplayDxe.inf
|
||||
!else
|
||||
INF SiliciumPkg/Drivers/SimpleFbDxe/SimpleFbDxe.inf
|
||||
!endif
|
||||
|
||||
# Headless until stock sheng framebuffer data is available.
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/ButtonsDxe/ButtonsDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/ChargerExDxe/ChargerExDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PmicGlinkDxe/PmicGlinkDxe.inf
|
||||
@@ -87,11 +107,13 @@
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbfnDwc3Dxe/UsbfnDwc3Dxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/XhciPciEmulationDxe/XhciPciEmulationDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/XhciDxe/XhciDxe.inf
|
||||
!endif
|
||||
|
||||
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
||||
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
|
||||
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
||||
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbMsdDxe/UsbMsdDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbDeviceDxe/UsbDeviceDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/UsbConfigDxe/UsbConfigDxe.inf
|
||||
@@ -101,3 +123,4 @@
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PILDxe/PILDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/PILProxyDxe/PILProxyDxe.inf
|
||||
INF Binaries/sheng/QcomPkg/Drivers/SPSSDxe/SPSSDxe.inf
|
||||
!endif
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
SECTION RAW = Binaries/sheng/RawFiles/SecParti.cfg
|
||||
}
|
||||
|
||||
!if $(USE_CUSTOM_DISPLAY_DRIVER) == 1
|
||||
# Stock sheng N81A panel data, original FFS GUIDs and UI names, matched to
|
||||
# the SSH-observed 3048x2032 DSI panel.
|
||||
FILE FREEFORM = 15A84758-9EE1-4543-9C82-F430A70F0813 {
|
||||
@@ -14,3 +15,4 @@
|
||||
SECTION UI = "Panel_N81A_36_02_0a_duldsi_dsc_vid.xml"
|
||||
SECTION RAW = Binaries/sheng/RawFiles/Panel_N81A_36_02_0a_duldsi_dsc_vid.xml
|
||||
}
|
||||
!endif
|
||||
|
||||
@@ -34,13 +34,30 @@ not distributed here. Full firmware assembly and runtime driver protocol
|
||||
compatibility still require qualification. Static coverage of the stock
|
||||
TZApps dynamic reservation does not establish runtime partition sizes.
|
||||
|
||||
Initial bring-up is headless. Do not enable SimpleFbDxe until the actual
|
||||
framebuffer address, reservation, pixel layout, stride and dimensions are
|
||||
known. QRD panel XMLs, display reservations and board ACPI are not included.
|
||||
The SimpleFb PCDs are set only for the DEBUG FrameBufferSerialPortLib early
|
||||
log, from the stock N81A XML active size (3048x2032, 32 bpp). Its writes stay
|
||||
inside the stock 0x2B00000 "Display Reserved" region; SimpleFbDxe is not in
|
||||
the FV. With the PCDs at 0 the log drew nothing after SEC cleared the region.
|
||||
## Bring-up state observed on the device (fastboot boot, no flashing)
|
||||
|
||||
The stock ABL hands over with the panel scanning out the 3048x2032 32-bit
|
||||
linear frame buffer at the "Display Reserved" region (the stock sheng dtbo
|
||||
carries a `splash_region` node for it; the appended DTB needs the same node
|
||||
or ABL powers the panel down, see `scripts/sheng-abl-dtb.py` in the umbrella).
|
||||
Line pitch equals the width in bytes; the early log is readable as is.
|
||||
|
||||
* `SHENG_VENDOR_HW = 0` (default): Mu drivers only, SimpleFbDxe publishes the
|
||||
GOP on that frame buffer. The panel stays on and CrabApple's menu shows.
|
||||
* `SHENG_VENDOR_HW = 1`: adds the stock vendor hardware drivers. Their
|
||||
initialization (seen last: ClockDxe after SMEM/DAL/IPCC/GLink/CmdDb/NPA/RPMh/
|
||||
VCS) turns the panel black while the backlight stays on; the log goes with
|
||||
it. The stock DisplayDxe chain (`USE_CUSTOM_DISPLAY_DRIVER = 1`) needs this
|
||||
and has never produced a GOP here. RamManagerDxe also needs this stack.
|
||||
|
||||
SEC selects SP_ELx first: the previous stage enters with SPSel=0, which made
|
||||
every exception run on a stale SP_EL1 next to the unwritable vector page.
|
||||
`Resources/MuPatches/Gic-Spurious.patch` masks a GIC interrupt that has no
|
||||
handler; the leftover IPCC interrupt (INTID 0x105) otherwise loops forever.
|
||||
The umbrella `scripts/build-uefi-sheng.sh` applies it for the build only.
|
||||
The log follows the frame buffer a platform driver hands over
|
||||
(`ShengGopLogDxe`, used by the stock display chain only).
|
||||
|
||||
Generic Kailua code may still require additional ACPI/DT work.
|
||||
|
||||
CrabApple is embedded as an application plus its registrar. The sibling
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
FLASH_DEFINITION = shengPkg/sheng.fdf
|
||||
USE_CUSTOM_DISPLAY_DRIVER = 0
|
||||
|
||||
#
|
||||
# 0 = Mu drivers only. The previous stage's display keeps scanning out, so
|
||||
# the boot manager is visible without any vendor hardware driver.
|
||||
# 1 = also load the stock vendor hardware drivers (SMEM, clocks, RPMh, UFS,
|
||||
# USB, charger, ...). Their initialization currently blanks the panel.
|
||||
#
|
||||
SHENG_VENDOR_HW = 0
|
||||
|
||||
#
|
||||
# 0 = SM8550-AB
|
||||
# 1 = SM8550-AC
|
||||
@@ -33,6 +41,10 @@
|
||||
|
||||
!include KailuaPkg/KailuaPkg.dsc.inc
|
||||
|
||||
!if ($(USE_CUSTOM_DISPLAY_DRIVER) == 1) && ($(SHENG_VENDOR_HW) == 0)
|
||||
!error The stock DisplayDxe chain needs SHENG_VENDOR_HW = 1
|
||||
!endif
|
||||
|
||||
[PcdsFixedAtBuild]
|
||||
#
|
||||
# DDR Memory
|
||||
@@ -65,6 +77,11 @@
|
||||
gSiliciumPkgTokenSpaceGuid.PcdFrameBufferWidth|3048
|
||||
gSiliciumPkgTokenSpaceGuid.PcdFrameBufferHeight|2032
|
||||
gSiliciumPkgTokenSpaceGuid.PcdFrameBufferColorDepth|32
|
||||
# Scale 3 gives 56 lines. The log wraps, so the screen always shows the
|
||||
# newest lines; the platform debug level is left unchanged.
|
||||
gSiliciumPkgTokenSpaceGuid.PcdFrameBufferFontScale|3
|
||||
# Pause per log line so a video of the screen shows what loads last.
|
||||
gSiliciumPkgTokenSpaceGuid.PcdFrameBufferDelay|30000
|
||||
|
||||
|
||||
#
|
||||
@@ -90,6 +107,7 @@
|
||||
CrabApplePkg/Application/CrabApple/CrabApple.inf
|
||||
CrabApplePkg/Driver/CrabAppleDxe/CrabAppleDxe.inf
|
||||
shengPkg/Drivers/ShengDisplayDepexDxe/ShengDisplayDepexDxe.inf
|
||||
shengPkg/Drivers/ShengGopLogDxe/ShengGopLogDxe.inf
|
||||
|
||||
[LibraryClasses]
|
||||
CrabAppleLib|CrabApplePkg/Library/CrabAppleLib/CrabAppleLib.inf
|
||||
|
||||
@@ -83,8 +83,10 @@ READ_LOCK_STATUS = TRUE
|
||||
!include Include/DXE.inc
|
||||
!include Include/RAW.inc
|
||||
|
||||
# RAM Manager
|
||||
# RAM Manager reads the RAM partition table published by the vendor stack.
|
||||
!if $(SHENG_VENDOR_HW) == 1
|
||||
INF SiliciumPkg/Drivers/RamManagerDxe/RamManagerDxe.inf
|
||||
!endif
|
||||
|
||||
# SmBios
|
||||
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/ArmPkg/Drivers/ArmGicDxe/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGicDxe/GicV3/ArmGicV3Dxe.c
|
||||
index 5fd28e3..9fc5942 100644
|
||||
--- a/ArmPkg/Drivers/ArmGicDxe/GicV3/ArmGicV3Dxe.c
|
||||
+++ b/ArmPkg/Drivers/ArmGicDxe/GicV3/ArmGicV3Dxe.c
|
||||
@@ -504,8 +504,20 @@ GicV3IrqInterruptHandler (
|
||||
// Call the registered interrupt handler.
|
||||
(*InterruptHandlerPtr)(GicInterrupt, SystemContext);
|
||||
} else {
|
||||
+ BOOLEAN Enabled;
|
||||
+
|
||||
DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", (UINT32)GicInterrupt));
|
||||
+
|
||||
+ // A level interrupt without a handler fires again as soon as it is
|
||||
+ // acknowledged and would starve the CPU. Mask it, like an unhandled IRQ
|
||||
+ // in other kernels; registering a handler enables the source again.
|
||||
+ GicV3DisableInterruptSource (&gHardwareInterruptV3Protocol, GicInterrupt);
|
||||
GicV3EndOfInterrupt (&gHardwareInterruptV3Protocol, GicInterrupt);
|
||||
+
|
||||
+ Enabled = FALSE;
|
||||
+ if (!EFI_ERROR (GicV3GetInterruptSourceState (&gHardwareInterruptV3Protocol, GicInterrupt, &Enabled)) && Enabled) {
|
||||
+ DEBUG ((DEBUG_ERROR, "GIC interrupt 0x%x cannot be masked\n", (UINT32)GicInterrupt));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user