Paolo, Happy weekends! Thanks! I will read it on my next Monday. Thanks, Ray > -----Original Message----- > From: Paolo Bonzini <[email protected]> > Sent: Friday, March 1, 2024 4:44 PM > To: Ni, Ray <[email protected]> > Cc: [email protected]; Kinney, Michael D <[email protected]>; > Liming Gao <[email protected]>; Laszlo Ersek <[email protected]>; > Michael Brown <[email protected]> > Subject: Re: [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue > due to nested interrupts > > One fix is needed in the code. > > On Thu, Feb 29, 2024 at 2:04 PM Ray Ni <[email protected]> wrote: > > + // > > + // Save the "Interrupted TPL" (TPL that was interrupted). > > + // > > + mInterruptedTplMask |= (UINTN)(1 << gEfiCurrentTpl); > > + } > > } > > > + // > > + // Clear interrupted TPL level mask, but do not re-enable interrupts > here > > + // This will return to CoreTimerTick() and interrupts will be > re-enabled > > + // when the timer interrupt handlers returns from interrupt > context. > > + // > > + ASSERT ((INTN)gEfiCurrentTpl == HighBitSet64 > (mInterruptedTplMask)); > > + mInterruptedTplMask &= ~(UINTN)(1 << gEfiCurrentTpl); > > + } > > } > > Both of these need to use "1U" to avoid sign extending bit 31 into bits > 31..63. > > The same issue is (in three places) present in my own version of the patch. :( > > Paolo
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116226): https://edk2.groups.io/g/devel/message/116226 Mute This Topic: https://groups.io/mt/104642317/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
