<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BaseSafeIntLib, branch dependabot/github_actions/github/codeql-action-4</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-09-25T22:04:10+00:00</updated>
<entry>
<title>MdePkg: Remove ARM32 Support</title>
<updated>2025-09-25T22:04:10+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-09-15T20:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=84c026111c759abd5649865d6c047d69ea477b3e'/>
<id>urn:sha1:84c026111c759abd5649865d6c047d69ea477b3e</id>
<content type='text'>
edk2 is dropping support for the ARM32 architecture. This
commit removes the remaining ARM32 code from MdePkg. This
also removes irrelevant VALID_ARCHITECTURES comments from
infs that are not arch specific.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for BaseSafeIntLib.</title>
<updated>2022-10-14T02:16:33+00:00</updated>
<author>
<name>Chao Li</name>
<email>lichao@loongson.cn</email>
</author>
<published>2021-11-12T04:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ced203c3d5a2962589358b47e3aa87d5e19c62ee'/>
<id>urn:sha1:ced203c3d5a2962589358b47e3aa87d5e19c62ee</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053

Add LoongArch64 architecture for BaseSafeIntLib library.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;

Signed-off-by: Chao Li &lt;lichao@loongson.cn&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2f88bd3a1296c522317f1c21377876de63de5be7'/>
<id>urn:sha1:2f88bd3a1296c522317f1c21377876de63de5be7</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: Add RISCV64 arch for BaseSafeIntLib.</title>
<updated>2020-05-07T03:17:15+00:00</updated>
<author>
<name>Abner Chang</name>
<email>abner.chang@hpe.com</email>
</author>
<published>2020-04-07T08:02:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4e74764245c4d92d51ed0ed67147e16ad8f8296c'/>
<id>urn:sha1:4e74764245c4d92d51ed0ed67147e16ad8f8296c</id>
<content type='text'>
Add RISCV64 arch for BaseSafeIntLib library.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2672

Signed-off-by: Abner Chang &lt;abner.chang@hpe.com&gt;
Reviewed-by: Leif Lindholm &lt;leif@nuviainc.com&gt;
Reviewed-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
Cc: Gilbert Chen &lt;gilbert.chen@hpe.com&gt;
Cc: Daniel Helmut Schaefer &lt;daniel.schaefer@hpe.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: Fix VS20xx IA32 link failures</title>
<updated>2020-02-13T01:42:50+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2020-02-12T21:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=02b7b861b18afd1744f462878060abda38eccb44'/>
<id>urn:sha1:02b7b861b18afd1744f462878060abda38eccb44</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=2525

SafeUint64Mult() looks for 64-bit overflows and performs
several 32-bit multiples with 64-bit results to check for
all possible overflow conditions.  IA32 builds using VS20xx
with optimizations enabled are producing a reference to
the _allmull intrinsic.

The fix is to use MultU64x64() instead of '*' for
these operations.  These are safe because the inputs
are guaranteed to have the upper 32-bits clear, which
means MultU64x64() can never overflow with those inputs.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Bret Barkelew &lt;bret.barkelew@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:13+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9344f0921518309295da89c221d10cbead8531aa'/>
<id>urn:sha1:9344f0921518309295da89c221d10cbead8531aa</id>
<content type='text'>
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 &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Removing ipf which is no longer supported from edk2.</title>
<updated>2018-09-25T15:48:21+00:00</updated>
<author>
<name>Chen A Chen</name>
<email>chen.a.chen@intel.com</email>
</author>
<published>2018-07-02T01:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3cb0a311cb7e747d7be5c5076d0fff76ad256d2b'/>
<id>urn:sha1:3cb0a311cb7e747d7be5c5076d0fff76ad256d2b</id>
<content type='text'>
Removing rules for Ipf sources file:
* Remove the source file which path with "ipf" and also listed in
  [Sources.IPF] section of INF file.
* Remove the source file which listed in [Components.IPF] section
  of DSC file and not listed in any other [Components] section.
* Remove the embedded Ipf code for MDE_CPU_IPF.

Removing rules for Inf file:
* Remove IPF from VALID_ARCHITECTURES comments.
* Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section.
* Remove the INF which only listed in [Components.IPF] section in DSC.
* Remove statements from [BuildOptions] that provide IPF specific flags.
* Remove any IPF sepcific sections.

Removing rules for Dec file:
* Remove [Includes.IPF] section from Dec.

Removing rules for Dsc file:
* Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC.
* Remove any IPF specific sections.
* Remove statements from [BuildOptions] that provide IPF specific flags.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen &lt;chen.a.chen@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: Fix VS2015 IA32 NOOPT build failure</title>
<updated>2018-02-28T03:44:14+00:00</updated>
<author>
<name>Dandan Bi</name>
<email>dandan.bi@intel.com</email>
</author>
<published>2018-02-26T03:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=dc9b2a57403262cf6df9d150ea3a118a7d765ad8'/>
<id>urn:sha1:dc9b2a57403262cf6df9d150ea3a118a7d765ad8</id>
<content type='text'>
v2: Add [LibraryClasses] section in INF file and refine coding style.

There are VS2015 NOOPT IA32 build failure like below in BaseSafeIntLib.
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __allmul
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __allshl
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __aullshr

This patch replaces direct shift/multiplication of 64-bit integer
with related function call to fix these failure.

Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael Kinney &lt;michael.d.kinney@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi &lt;dandan.bi@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: fix undefined behavior in SafeInt64Mult()</title>
<updated>2018-02-21T10:57:39+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2018-02-15T16:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=75505d161133cbeb57185b567d7b05756d255a3f'/>
<id>urn:sha1:75505d161133cbeb57185b567d7b05756d255a3f</id>
<content type='text'>
If we have to negate UnsignedResult (due to exactly one of Multiplicand
and Multiplier being negative), and UnsignedResult is exactly
MIN_INT64_MAGNITUDE (value 2^63), then the statement

        *Result = - ((INT64)UnsignedResult);

invokes both implementation-defined behavior and undefined behavior.

First, MIN_INT64_MAGNITUDE is not representable as INT64, therefore the
result of the (inner) conversion

  (INT64)MIN_INT64_MAGNITUDE

is implementation-defined, or an implementation-defined signal is raised,
according to ISO C99 6.3.1.3p3.

Second, if we assume that the C language implementation defines the
conversion to INT64 simply as reinterpreting the bit pattern
0x8000_0000_0000_0000 as a signed integer in two's complement
representation, then the conversion immediately produces the negative
value MIN_INT64 (value -(2^63)). In turn, the (outer) negation

  -(MIN_INT64)

invokes undefined behavior, because the mathematical result of the
negation, namely 2^63, cannot be represented in an INT64 object. (Not even
mentioning the fact that the mathematical result would be incorrect.) In
practice, the undefined negation of MIN_INT64 happens to produce an
unchanged, valid-looking result on x86, i.e. (-(MIN_INT64)) == MIN_INT64.

We can summarize this as the undefined -- effectless -- negation canceling
out the botched -- auto-negating -- implementation-defined conversion.
Instead of relying on such behavior, dedicate a branch to this situation:
assign MIN_INT64 directly. The branch can be triggered e.g. by multiplying
(2^62) by (-2).

Cc: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Tested-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseSafeIntLib: clean up parentheses in MIN_INT64_MAGNITUDE</title>
<updated>2018-02-21T10:57:36+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2018-02-15T16:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8c33cc0ec926b17396fcd71686c727b991984d4a'/>
<id>urn:sha1:8c33cc0ec926b17396fcd71686c727b991984d4a</id>
<content type='text'>
The definition of the MIN_INT64_MAGNITUDE macro is correct, but it's
harder to read than necessary: the sub-expression

      (( (UINT64) - (MIN_INT64 + 1) ))

is doubly parenthesized. Reusing one pair of the outer parens, rewrite the
sub-expression (without change in meaning) so that the minus sign cannot
be mistaken for subtraction:

      ( (UINT64)(- (MIN_INT64 + 1)) )

The resultant macro definition matches the following expressions in
SafeInt64Mult():

&gt;     //
&gt;     // Avoid negating the most negative number.
&gt;     //
&gt;     UnsignedMultiplicand = ((UINT64)(- (Multiplicand + 1))) + 1;

and

&gt;     //
&gt;     // Avoid negating the most negative number.
&gt;     //
&gt;     UnsignedMultiplier = ((UINT64)(- (Multiplier + 1))) + 1;

Cc: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Tested-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
</feed>
