summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Ia32
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg Base.h: Use correct style to check macro _MSC_VER valueLiming Gao2020-02-061-1/+1
| | | | | Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg Base.h: Add definition for CLANG9 tool chainLiming Gao2019-10-241-2/+2
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 CLANG9 tool chain defines __clang__ macro only, doesn't define __GNUC__ macro. But, it uses some same definitions with GCC. So, update base definition for CLANG9 tool chain. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-092-14/+2
| | | | | | | | | | | | | | | | | | | | 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: Liming Gao <liming.gao@intel.com>
* MdePkg/Include: Add Nasm.incYao, Jiewen2019-02-281-0/+28
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1521 This is to add CET related instruction in Nasm because CET instruction is not supported yet. See https://www.nasm.us/xdoc/2.14.02/html/nasmdocb.html Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
* MdePkg/Base: introduce MAX_ALLOC_ADDRESSArd Biesheuvel2018-12-201-0/+5
| | | | | | | | | | | | | | | | On some architectures, the maximum representable address deviates from the virtual address range that is accessible by the firmware at boot time. For instance, on AArch64, UEFI mandates a 4 KB page size, which limits the address space to 48 bits, while more than that may be populated on a particular platform, for use by the OS. So introduce a new macro MAX_ALLOC_ADDRESS, which represent the maximum address the firmware should take into account when allocating memory ranges that need to be accessible by the CPU at boot time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Clean up source filesLiming Gao2018-06-281-20/+20
| | | | | | | | | 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>
* MdePkg/BaseSafeIntLib: Add SafeIntLib class and instanceSean Brogan2018-01-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=798 SafeIntLib provides helper functions to prevent integer overflow during type conversion, addition, subtraction, and multiplication. Conversion Functions ==================== * Converting from a signed type to an unsigned type of the same size, or vice-versa. * Converting to a smaller type that could possibly overflow. * Converting from a signed type to a larger unsigned type. Unsigned Addition, Subtraction, Multiplication =============================================== * Unsigned integer math functions protect from overflow and underflow (in case of subtraction). Signed Addition, Subtraction, Multiplication ============================================ * Strongly consider using unsigned numbers. * Signed numbers are often used where unsigned numbers should be used. For example file sizes and array indices should always be unsigned. Subtracting a larger positive signed number from a smaller positive signed number with SafeInt32Sub() will succeed, producing a negative number, that then must not be used as an array index (but can occasionally be used as a pointer index.) Similarly for adding a larger magnitude negative number to a smaller magnitude positive number. * SafeIntLib does not protect you from such errors. It tells you if your integer operations overflowed, not if you are doing the right thing with your non-overflowed integers. * Likewise you can overflow a buffer with a non-overflowed unsigned index. Based on content from the following branch/commits: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/21ef3a321c907b40fa93797619c9f6c686dd92e0 https://github.com/Microsoft/MS_UEFI/commit/ca516b1a61315c2d823f453e12d2135098f53d61 https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Disable VS warning 4701 & 4703 for VS2017Liming Gao2017-11-291-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* MdePkg/ProcessorBind: add defines for page allocation granularityArd Biesheuvel2017-03-061-0/+6
| | | | | | | | | | | | | | The UEFI spec differs between architectures in the minimum alignment and granularity of page allocations that are visible to the OS as EFI_MEMORY_RUNTIME regions. So define macros that carry these values to the respective ProcessorBind.h header files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Fix some typing errors in the header filesThomas Huth2016-10-071-2/+2
| | | | | | | | | Correct the typos in some header files of MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* MdePkg: Disable VS2015 warning C4701 & C4703Liming Gao2015-12-041-3/+3
| | | | | | | | | | | C4701 & C4703 may cause false positive issues. They have been disabled in VS2013. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19111 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg IA32/X64 ProcessorBind.h : Disable the C4701 and C4703 warnings for ↵Shumin Qiu2015-01-091-1/+21
| | | | | | | | | | | | VS2013. As they may be raised as false positive in building. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16594 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg Base.h: Always define ASM_PFXJordan Justen2014-09-011-0/+4
| | | | | | | | | | | | Some compilers may define __USER_LABEL_PREFIX__ to determine the prefix used with ASM_PFX. Otherwise, IA32 will use a single underscore '_' character, and all other architectures will use an empty prefix. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16019 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Add defines for MAX values for UEFI data types.Liming Gao2013-07-121-1/+7
| | | | | | | | | | | 2. Remove the #defines and add the extern declarations for gEfiDebugPortVariableGuid and gEfiDebugPortDevicePathGuid. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: michael.d.kinney@intel.com Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14465 6f19259b-4bc3-4df7-8a09-765794883524
* Update MdePkg and EdkCompatibilityPkg INT8 definition to be typedef signed ↵lgao42012-05-161-3/+3
| | | | | | | | | char to follow UEFI spec. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D. Kinney <michael.d.kinney@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13312 6f19259b-4bc3-4df7-8a09-765794883524
* Add the missing default definition of EFIAPI in Ia32/ProcessorBind.h.lgao42011-06-131-7/+11
| | | | | | | Signed-off-by: lgao4 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11813 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-231-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10403 6f19259b-4bc3-4df7-8a09-765794883524
* Grammatical and disclaimer changes (does not follow internal C coding stds.)myronporter2010-03-121-33/+33
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10236 6f19259b-4bc3-4df7-8a09-765794883524
* Updating processor bindings to not use stdint.h. Also added code to verify ↵geekboy15a2010-03-111-133/+68
| | | | | | at compile time that data widths are correct. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10232 6f19259b-4bc3-4df7-8a09-765794883524
* disable ICC compiler warning #593: variable was set but never used.eric_tian2010-01-111-1/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9705 6f19259b-4bc3-4df7-8a09-765794883524
* Fix file headers and a few commentsmdkinney2009-08-241-3/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9188 6f19259b-4bc3-4df7-8a09-765794883524
* Move content from CPU specific ProcessorBind.h files into Base.h if the ↵mdkinney2009-08-181-31/+0
| | | | | | content is the same for all supported CPU architectures. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9097 6f19259b-4bc3-4df7-8a09-765794883524
* redefine the ASM_PFX to let it can work on Apple/NetBSD and other Unix* ↵eric_tian2009-08-141-5/+12
| | | | | | platform. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9073 6f19259b-4bc3-4df7-8a09-765794883524
* Fix build breaks from comment clean up checkinmdkinney2009-06-041-0/+5
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8468 6f19259b-4bc3-4df7-8a09-765794883524
* Second set of changes based on a review of the code comments in the Include ↵pkandel2009-06-041-8/+3
| | | | | | directory for typos, grammar issues, and language clarity. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8467 6f19259b-4bc3-4df7-8a09-765794883524
* Remove __APPLE__ usage in ProcessorBind.h files.xli242009-05-211-6/+6
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8362 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Remove .extern from GCC assembly.xli242009-05-201-0/+5
| | | | | | | 2. Define macro for .global/.globl in GCC assembly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8344 6f19259b-4bc3-4df7-8a09-765794883524
* Allow EFIAPI to be defined on the compiler command line.jljusten2009-04-101-2/+6
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8061 6f19259b-4bc3-4df7-8a09-765794883524
* 1, Use #if defined() to judge the switching macro such as compiler macro. klu22009-02-231-8/+8
| | | | | | | | Original, some code directly judge the value of these macros, but linux ICC compiler will report error as "zero used for undefined preprocessing identifier". So it is better judge whether these macros are defined before accessing their value. 2, Use #if defined() style to replace #ifdef style. It is good to keep consistent style for this case. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7596 6f19259b-4bc3-4df7-8a09-765794883524
* Update copyright for files modified in this yearqhuang82008-12-291-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7148 6f19259b-4bc3-4df7-8a09-765794883524
* Add more detailed comments for many of the Base Typesmdkinney2008-12-071-7/+137
| | | | | | | Remove all declarations of UINT8_MAX. Use BIT8-1 instead. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6909 6f19259b-4bc3-4df7-8a09-765794883524
* Update FUNCTION_ENTRY_POINT() to be compatible with a wider variety of input ↵mdkinney2008-12-051-1/+1
| | | | | | parameters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6883 6f19259b-4bc3-4df7-8a09-765794883524
* Add comments for the MACRO follow the Spec, and change some definition not ↵gikidy2008-12-051-6/+7
| | | | | | match the Spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6852 6f19259b-4bc3-4df7-8a09-765794883524
* Correct Minor Comments in M3 to M4 review.lgao42008-12-041-0/+9
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6842 6f19259b-4bc3-4df7-8a09-765794883524
* update comments and refine code.vanjeff2008-11-171-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6559 6f19259b-4bc3-4df7-8a09-765794883524
* trunk/edk2/MdePkg/Include/X64/ProcessorBind.h:jljusten2008-10-071-6/+0
| | | | | | | | | | | trunk/edk2/MdePkg/Include/Ia32/ProcessorBind.h: trunk/edk2/MdePkg/Include/Ipf/ProcessorBind.h: * Do not ignore this warning (Intel Compiler warning #593; Local Variable is set, but not used.) We will attempt to clean up code that generates this particular warning. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6083 6f19259b-4bc3-4df7-8a09-765794883524
* edk2/MdePkg/Include/Ia32/ProcessorBind.h:jljusten2008-09-031-0/+6
| | | | | | | * Disable ICC warning for: "LocalVariable" was set but never used git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5804 6f19259b-4bc3-4df7-8a09-765794883524
* edk2/MdePkg/Include/Ia32/ProcessorBind.h:jljusten2008-08-291-1/+6
| | | | | | | | * Add mask for ICC warning when a parameter is not referenced in a function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5757 6f19259b-4bc3-4df7-8a09-765794883524
* Use doxygen comment style for document entity such as struct, enum, variable ↵klu22008-08-141-15/+15
| | | | | | that use /// but not // git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5644 6f19259b-4bc3-4df7-8a09-765794883524
* make change to support UnixPkg build. The changes are listed as follows:eric_tian2008-06-301-1/+5
| | | | | | | | 1. change ASM_PFX() macro, the underscore preceding to function symbol don't be added in Linux. 2. move some illegal characters in .S file. 3. change ELFGCC flag in tools_def.template to support Linux&ELFGCC build git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5381 6f19259b-4bc3-4df7-8a09-765794883524
* Use #if...#else to not confuse some lint tools for definition of EFIAPIklu22008-06-021-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5316 6f19259b-4bc3-4df7-8a09-765794883524
* Fix comment typo.klu22008-04-221-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5106 6f19259b-4bc3-4df7-8a09-765794883524
* Add FUNCTION_ENTRY_POINT macromdkinney2007-11-271-0/+2
| | | | | | | | Update DxeDebugLibSerialPort to have a module type of BASE git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4328 6f19259b-4bc3-4df7-8a09-765794883524
* Added "#define ASM_PFX(name) _##name" for GNU assembly code preprocessingjwang362007-07-241-0/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3409 6f19259b-4bc3-4df7-8a09-765794883524
* Updated comments for IntelCompiler specific warnings AJFISH2007-07-061-0/+17
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3133 6f19259b-4bc3-4df7-8a09-765794883524
* Updated headers to follow coding standardAJFISH2007-06-271-2/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2815 6f19259b-4bc3-4df7-8a09-765794883524
* Move to directory "Include"yshang12007-06-081-0/+182
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2646 6f19259b-4bc3-4df7-8a09-765794883524
* Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break ↵lhauch2007-06-011-182/+0
| | | | | | existing builds. Also updated the SPD and FPD files UiNames git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2616 6f19259b-4bc3-4df7-8a09-765794883524
* Fix some Linux's build issue.klu22006-12-261-0/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2138 6f19259b-4bc3-4df7-8a09-765794883524
* Add #define CPU_STACK_ALIGNMENT to the ProcessorBind.h for each of the ↵mdkinney2006-11-091-0/+5
| | | | | | supported CPU architectures. This value is sizeof(UINTN) for IA-32, X64, and EBC. It is 16 bytes for IPF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1920 6f19259b-4bc3-4df7-8a09-765794883524