summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/Event/Tpl.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-07MdeModulePkg: Apply uncrustify changesMichael Kubacki1-15/+16
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-12-07MdeModulePkg: Change use of EFI_D_* to DEBUG_*Michael D Kinney1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2019-04-09MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney1-7/+1
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2018-06-28MdeModulePkg: Clean up source filesLiming Gao1-2/+2
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-29MdeModulePkg/Tpl: Fix negative value left shiftHao Wu1-3/+9
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=695 Within function CoreRestoreTpl(), left shift a negative value -2 is used in: "while (((-2 << NewTpl) & gEventPending) != 0) {" which involves undefined behavior. According to the C11 spec, Section 6.5.7: > 4 The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated > bits are filled with zeros. If E1 has an unsigned type, the value > of the result is E1 * 2^E2 , reduced modulo one more than the > maximum value representable in the result type. If E1 has a signed > type and nonnegative value, and E1 * 2^E2 is representable in the > result type, then that is the resulting value; otherwise, the > behavior is undefined. This commit refines the code logic to avoid left shifting the negative value. Cc: Steven Shi <steven.shi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2015-06-01MdeModulePkg DxeCore: Add debug message to assist TPL related issues.Star Zeng1-3/+9
The debug message is to print the current TPL and requested TPL value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17543 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-16Refine code to make code run safely.ydong101-1/+1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10880 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24Update the copyright notice formathhtian1-2/+2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-13Update DXE Core to be compatible with PI 1.2 SMM Drivers.mdkinney1-7/+18
PI 1.2 SMM Drivers are allowed to call UEFI/DXE services and Protocols from the entry point of the PI 1.2 SMM Driver. These UEFI/DXE services and Protocols may directly or indirectly calls the UEFI Boot Services RaiseTPL() and RestoreTPL(). These UEFI Boot Services use the CPU Architectural Protocol to enable interrupts if the TPL level is below TPL_HIGH_LEVEL and enable interrupts of the TPL is at TPL_HIGH_LEVEL. Interrupts should be masked while executing SMM drivers, so if a direct or indirect call to the UEFI Boot Service RestoreTPL() would enable interrupts, then an interrupt could be incorrectly delivered in SMM context. The solution is for the DXE Core to register for the PI 1.2 SMM Base2 Protocol. If that protocol is present in the platform, then the DXE Core can use the SMM Base 2 Protocol's InSmm() function to determine if the platform is currently executing in SMM content. If the current context is in SMM, then do not allow any requests to be forwarded to the CPU Architecture Protocol to enable interrupts. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9997 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-23move header files in MdeModulePkg\Core\Dxe except DxeMain.h into their ↵eric_tian1-1/+1
corresponding sub-module directories. It is used to provide good modularity. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5949 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17Apply HighBitSet() in MDE baseLib to retire the internal function ↵qhuang81-32/+2
CoreHighestSetBit(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5920 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-27Clean up DxeCore to remove duplicate memory allocation & device path utility ↵qhuang81-1/+1
services in Library.c.DxeCore should use MemoryAllocationLib & DevicePathLib for these API. Minor cleanup the coding style: #include <DxeMain.h> should be changed to #include "DxeMain.h" since "DxeMain.h" is not pubic header fie. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5742 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-24Code Scrub for Dxe Core.qhuang81-4/+4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5560 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-18Code scrub for DxeCoreqhuang81-6/+6
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5520 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-21Update to fix minor coding style issues.qhuang81-11/+9
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5256 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-21Change the file name case to follow coding style: The first character should ↵qhuang81-0/+163
be capital. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5250 6f19259b-4bc3-4df7-8a09-765794883524