<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib, branch trunk</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-06-04T03:43:08+00:00</updated>
<entry>
<title>Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305b</title>
<updated>2024-06-04T03:43:08+00:00</updated>
<author>
<name>kx</name>
<email>kx@radix.pro</email>
</author>
<published>2024-06-04T03:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7e2ccccace24636f29ddc210b94606abd4c7e42b'/>
<id>urn:sha1:7e2ccccace24636f29ddc210b94606abd4c7e42b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MdeModulePkg: 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:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg 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>MdeModulePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d510e61fceee7b92955ef9a3c20343752d8ce3f'/>
<id>urn:sha1:9d510e61fceee7b92955ef9a3c20343752d8ce3f</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: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Clean up source files</title>
<updated>2018-06-28T03:19:45+00:00</updated>
<author>
<name>Liming Gao</name>
<email>liming.gao@intel.com</email>
</author>
<published>2018-06-27T13:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d1102dba7210b95e41d06c2338a22ba6af248645'/>
<id>urn:sha1:d1102dba7210b95e41d06c2338a22ba6af248645</id>
<content type='text'>
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 &lt;liming.gao@intel.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg PiSmmCoreMemoryAllocLib: Fix a FreePool() assertion issue</title>
<updated>2017-08-01T09:44:02+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2017-07-28T03:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ecf85eb24c62f7864884e3719418d4d22d515135'/>
<id>urn:sha1:ecf85eb24c62f7864884e3719418d4d22d515135</id>
<content type='text'>
When PiSmmCore links against PeiDxeDebugLibReportStatusCode, the code
flow below will cause a FreePool() assertion issue.

PiSmmCoreMemoryAllocationLibConstructor() -&gt;
SmmInitializeMemoryServices() -&gt;
DEBUG ((DEBUG_INFO, "SmmAddMemoryRegion\n")) in SmmAddMemoryRegion() -&gt;
DebugPrint() -&gt; REPORT_STATUS_CODE_EX() -&gt; ReportStatusCodeEx() -&gt;
AllocatePool()/FreePool(PiSmmCoreMemoryAllocLib) -&gt;
ASSERT() at Head = CR (Buffer, POOL_HEAD, Data, POOL_HEAD_SIGNATURE)
  in CoreFreePoolI() of DxeCore Pool.c

It is because at the point of FreePool() in the code flow above,
mSmmCoreMemoryAllocLibSmramRanges/mSmmCoreMemoryAllocLibSmramRangeCount
are not been initialized yet, the FreePool() will be directed to
gBS-&gt;FreePool(), that is wrong.

This patch is to temporarily use BootServicesData to hold the
SmramRanges data before calling SmmInitializeMemoryServices().

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Refine casting expression result to bigger size</title>
<updated>2017-03-06T06:33:20+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2017-02-24T02:01:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=16f6922709952c7ad468dcdee6ef94b3e5a3cd90'/>
<id>urn:sha1:16f6922709952c7ad468dcdee6ef94b3e5a3cd90</id>
<content type='text'>
There are cases that the operands of an expression are all with rank less
than UINT64/INT64 and the result of the expression is explicitly cast to
UINT64/INT64 to fit the target size.

An example will be:
UINT32 a,b;
// a and b can be any unsigned int type with rank less than UINT64, like
// UINT8, UINT16, etc.
UINT64 c;
c = (UINT64) (a + b);

Some static code checkers may warn that the expression result might
overflow within the rank of "int" (integer promotions) and the result is
then cast to a bigger size.

The commit refines codes by the following rules:
1). When the expression is possible to overflow the range of unsigned int/
int:
c = (UINT64)a + b;

2). When the expression will not overflow within the rank of "int", remove
the explicit type casts:
c = a + b;

3). When the expression will be cast to pointer of possible greater size:
UINT32 a,b;
VOID *c;
c = (VOID *)(UINTN)(a + b); --&gt; c = (VOID *)((UINTN)a + b);

4). When one side of a comparison expression contains only operands with
rank less than UINT32:
UINT8 a;
UINT16 b;
UINTN c;
if ((UINTN)(a + b) &gt; c) {...} --&gt; if (((UINT32)a + b) &gt; c) {...}

For rule 4), if we remove the 'UINTN' type cast like:
if (a + b &gt; c) {...}
The VS compiler will complain with warning C4018 (signed/unsigned
mismatch, level 3 warning) due to promoting 'a + b' to type 'int'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Feng Tian &lt;feng.tian@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/Library: Fix typos in comments and variables</title>
<updated>2016-10-27T01:11:19+00:00</updated>
<author>
<name>Gary Lin</name>
<email>glin@suse.com</email>
</author>
<published>2016-10-19T07:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3b28e7448de6ef8ed94036bffe23c67dc20a7aff'/>
<id>urn:sha1:3b28e7448de6ef8ed94036bffe23c67dc20a7aff</id>
<content type='text'>
- servity -&gt; severity
- TURE -&gt; TRUE
- contiue -&gt; continue
- Pepresentation -&gt; Representation
- suported -&gt; supported
- opints -&gt; points
- sucessfully -&gt; successfully
- hexidecimal -&gt; hexadecimal
- Pacakge -&gt; Package
- Libary -&gt; Library
- successull -&gt; successfully
- reseting -&gt; resetting
- Retrive -&gt; Retrieve
- dirver -&gt; driver
- availible -&gt; available
- chracter -&gt; character
- seperator -&gt; separator

Cc: Feng Tian &lt;feng.tian@intel.com&gt;
Cc: Star Zeng &lt;star.zeng@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin &lt;glin@suse.com&gt;
Reviewed-by: Feng Tian &lt;feng.tian@intel.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg PiSmmCoreMemoryAllocLib:  Extend to support MemoryProfileLib</title>
<updated>2016-07-01T01:39:59+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2016-06-23T14:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cdad7675e6e12418abb1231fc14c38a1373173bc'/>
<id>urn:sha1:cdad7675e6e12418abb1231fc14c38a1373173bc</id>
<content type='text'>
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Convert all .uni files to utf-8</title>
<updated>2015-12-15T04:56:23+00:00</updated>
<author>
<name>Jordan Justen</name>
<email>jordan.l.justen@intel.com</email>
</author>
<published>2015-12-15T04:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3f5287971ffdb5c42e3325a3a94c101f08d3a02a'/>
<id>urn:sha1:3f5287971ffdb5c42e3325a3a94c101f08d3a02a</id>
<content type='text'>
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Reviewed-by: Michael Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Feng Tian &lt;feng.tian@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
<entry>
<title>MdeModulePkg PiSmmCore: Remove a hidden assumption of SMRAM reservation</title>
<updated>2015-07-26T07:38:12+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2015-07-26T07:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c03beb762a7f1a08c0c91ccd8968500b2ccf5959'/>
<id>urn:sha1:c03beb762a7f1a08c0c91ccd8968500b2ccf5959</id>
<content type='text'>
that assumes the SMRAM reserved range is only at the end of the SMRAM descriptor.

          //
          // This range has reserved area, calculate the left free size
          //
          gSmmCorePrivate-&gt;SmramRanges[Index].PhysicalSize = SmramResRegion-&gt;SmramReservedStart - gSmmCorePrivate-&gt;SmramRanges[Index].CpuStart;

Imagine the following scenario where we just reserve the first page of the SMRAM range:

SMRAM Descriptor:
  Start: 0x80000000
  Size: 0x02000000

Reserved Range:
  Start: 0x80000000
  Size: 0x00001000

In this case the adjustment to the SMRAM range size yields zero: ReservedStart - SMRAM Start is 0x80000000 - 0x80000000 = 0.
So even though most of the range is still free the IPL code decides its unusable.

The problem comes from the email thread: [edk2] PiSmmIpl SMRAM Reservation Logic.
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/15268

Also to follow the idea in the email thread, the patch is to
1. Keep only one copy of full SMRAM ranges in gSmmCorePrivate-&gt;SmramRanges,
split record for SmmConfiguration-&gt;SmramReservedRegions and SMM Core that
will be marked to be EFI_ALLOCATED in gSmmCorePrivate-&gt;SmramRanges.
2. Handle SmmConfiguration-&gt;SmramReservedRegions at beginning of, at end of,
in the middle of, or cross multiple SmramRanges.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18031 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
</feed>
