summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-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>
* MdeModulePkg/PiSmmIpl: Do not reset SMRAM to UC when CPU driver runsRuiyu Ni2018-11-011-13/+2
| | | | | | | | | | | | | | | | Today's PiSmmIpl implementation initially sets SMRAM to WB to speed up the SMM core/modules loading before SMM CPU driver runs. When SMM CPU driver runs, PiSmmIpl resets the SMRAM to UC. It's done in SmmIplDxeDispatchEventNotify(). COMM_BUFFER_SMM_DISPATCH_RESTART is returned from SMM core that SMM CPU driver is just dispatched. Since now the SMRR is widely used to control the SMRAM cache setting. It's not needed to reset the SMRAM to UC anymore. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com>
* MdeModulePkg: Clean up source filesLiming Gao2018-06-281-69/+69
| | | | | | | | | | 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>
* MdeModulePkg/PiSmmIpl: fix non-executable SMM RAMJian J Wang2018-04-131-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue introduced by commit 5b91bf82c67b586b9588cbe4bbffa1588f6b5926 and 0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c This issue will only happen if PcdDxeNxMemoryProtectionPolicy is enabled for reserved memory, which will mark SMM RAM as NX (non- executable) during DXE core initialization. SMM IPL driver will unset the NX attribute for SMM RAM to allow loading and running SMM core/drivers. But above commit will fail the unset operation of the NX attribute due to a fact that SMM RAM has zero cache attribute (MRC code always sets 0 attribute to reserved memory), which will cause GCD internal method ConverToCpuArchAttributes() to return 0 attribute, which is taken as invalid CPU paging attribute and skip the calling of gCpu->SetMemoryAttributes(). The solution is to make use of existing functionality in PiSmmIpl to make sure one cache attribute is set for SMM RAM. For performance consideration, PiSmmIpl will always try to set SMM RAM to write-back. But there's a hole in the code which will fail the setting write-back attribute because of no corresponding cache capabilities. This patch will add necessary cache capabilities before setting corresponding attributes. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/PiSmmCore: remove NX attr for SMM RAMJian J Wang2018-01-181-2/+16
| | | | | | | | | | | | | | | | | | If PcdDxeNxMemoryProtectionPolicy is set to enable protection for memory of EfiReservedMemoryType, the BIOS will hang at a page fault exception during starting SMM driver. The root cause is that SMM RAM is type of EfiReservedMemoryType and marked as non-executable. The fix is simply removing NX attribute for those memory. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg PiSmmIpl: Add missing update to the prototypeStar Zeng2017-12-121-7/+17
| | | | | | | | | | | | | It is missing to update the prototype of SmmCommunicationCommunicate() in d1632f694be027dee87dd18fa8172d674221face. This patch is to add it. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* MdeModulePkg PiSmmIpl: Handle CommSize OPTIONAL caseStar Zeng2017-12-071-22/+39
| | | | | | | | | | | | Handle CommSize OPTIONAL case for SmmCommunicate. And return EFI_ACCESS_DENIED when CommunicationBuffer is not valid for SMM to access. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg PiSmmIpl: Fix the issue in LMFA featureLiming Gao2017-04-251-6/+6
| | | | | | | | | SmramBase should be got from mLMFAConfigurationTable. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Refine casting expression result to bigger sizeHao Wu2017-03-061-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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); --> 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) > c) {...} --> if (((UINT32)a + b) > c) {...} For rule 4), if we remove the 'UINTN' type cast like: if (a + b > 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 <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg PiSmmIpl: Update SmmCommunication comments to match code logicLiming Gao2017-02-101-2/+2
| | | | | | | | | Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg SmmIpl: Fill Smram range for SMM driver when LMFA enableLiming Gao2016-12-121-6/+34
| | | | | | | | | | | Allocate the additional Smram range to describe the reserved smram for SMM core and driver when LMFA feature is enabled. Cc: Star Zeng <star.zeng@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Fix typos in comments and variablesGiri P Mudusuru2016-07-111-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - abstrated to abstracted - accessibla to accessible - addres to address - apropriate to appropriate - arry to array - availabe to available - avaliable to available - becasue to because - correponding to corresponding - etablished to established - exeuction to execution - extensiable to extensible - fileds to fields - loadding to loading - ptototypes to prototypes - prococol protocol - requried to required - resoruce to resource - runing to running - uild to build Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.Jiewen Yao2016-07-011-1/+1
| | | | | | | | | | | | | | | PI specification Vol 4 - SMM does not have any limitation of BASE_4GB for SMM. So we should replace BASE_4GB check with MAX_ADDRESS check to make sure the SMM memory is accessible by SMM Core. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/PiSmmIpl: Check order of EndOfDxe and DxeSmmReadyToLockJeff Fan2016-05-301-1/+47
| | | | | | | | | | | | | | | | According to PI specification, EndOfDxe Event should be signaled before DxeSmmReadyToLock protocol installation. This update is ASSERT if EndOfDxe Event is not signaled when DxeSmmReadyToLock protocol installed. And do REPORT_STATUS_CODE() also. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* Move CommunicationBuffer from stack to global variable.Yao, Jiewen2015-11-251-13/+13
| | | | | | | | | | | | We had put communication buffer to Runtime memory, so that SMI handler can know it is not used by OS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zeng, Star" <star.zeng@intel.com> Reviewed-by: "Kinney, Michael D" <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18949 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRangesStar Zeng2015-07-281-2/+2
| | | | | | | | | | | to instead of AllocatePool() to ensure the data is clean for the following consumption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18087 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmCore: Remove a hidden assumption of SMRAM reservationStar Zeng2015-07-261-74/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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->SmramRanges[Index].PhysicalSize = SmramResRegion->SmramReservedStart - gSmmCorePrivate->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->SmramRanges, split record for SmmConfiguration->SmramReservedRegions and SMM Core that will be marked to be EFI_ALLOCATED in gSmmCorePrivate->SmramRanges. 2. Handle SmmConfiguration->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 <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18031 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmCore: Unregister end of dxe notification in SmmReadyToLock.Star Zeng2015-06-181-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17659 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmCore: Introduce SMM Exit Boot Services and Legacy Boot.Star Zeng2015-06-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | And also SMM Ready To Boot. The SMM Exit Boot Service protocol is to be published by the SMM Foundation code to associate with EFI_EVENT_GROUP_EXIT_BOOT_SERVICES to notify SMM driver that system enter exit boot services. The SMM Legacy Boot protocol is to be published by the SMM Foundation code to associate with EFI_EVENT_LEGACY_BOOT_GUID to notify SMM driver that system enter legacy boot. The SMM Ready To Boot protocol is to be published by the SMM Foundation code to associate with EFI_EVENT_GROUP_READY_TO_BOOT to notify SMM driver that system enter ready to boot. After them, any SMM drivers can get protocol notify on what happened in DXE phase, then there is no need to let each individual SMM driver to register SMM Communication Handler for that. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17657 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmCore: Free FullSmramRanges at error condition.Star Zeng2015-06-091-2/+3
| | | | | | | | | | | | | | | | | | 1. In PiSmmIpl.c, free FullSmramRanges at error condition. 2. Move pool and page management definitions and structures from PiSmmCorePrivateData.h to PiSmmCore.h. PiSmmCorePrivateData.h should be only used to share SMM_CORE_PRIVATE_DATA between PiSmmCore and PiSmmIpl. Pool and page management definitions and structures were moved from Pool.c and Page.c to PiSmmCorePrivateData.h incorrectly for memory profile feature at EDK2 R16335 commit. 3. DumpSmramInfo() only used for memory profile, so move the declaration into SmramProfileRecord.c. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17598 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: SmmIplEntry(): don't suppress SMM core startup failureLaszlo Ersek2015-05-121-6/+7
| | | | | | | | | | | | | | | | | | | When the ExecuteSmmCoreFromSmram() function fails, SmmIplEntry() restores the SMRAM range to EFI_MEMORY_UC. However, it saves the return value of gDS->SetMemorySpaceAttributes() in the same Status variable that gDS->contains the return value of ExecuteSmmCoreFromSmram(). Therefore, if gDS->SetMemorySpaceAttributes() succeeds, the failure of ExecuteSmmCoreFromSmram() is masked, and Bad Things Happen (TM). Introduce a temporary variable just for the return value of gDS->SetMemorySpaceAttributes(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17417 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Misc comments and DEBUG messagesSamer El-Haj-Mahmoud2014-11-271-3/+3
| | | | | | | | | | Fixed some spelling typos in some comments. Added a couple of useful DEBUG messages Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16450 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg DxeCore/PiSmmCore: Add UEFI memory and SMRAM profile support.Star Zeng2014-11-121-0/+15
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16335 6f19259b-4bc3-4df7-8a09-765794883524
* 1) Add type cast for better coding style.Feng Tian2014-08-071-2/+2
| | | | | | | | | | | 2) replace StrCpy() usage in Variable driver with StrnCpy(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15770 6f19259b-4bc3-4df7-8a09-765794883524
* Not close gEfiEndOfDxeEventGroupGuid event in ReadyToLock event notify ↵lzeng142013-03-041-2/+2
| | | | | | | | | because PI spec doesn't say gEfiEndOfDxeEventGroupGuid must be notified before ReadyToLock event. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14150 6f19259b-4bc3-4df7-8a09-765794883524
* Add PI1.2.1 EndOfDxe support.jyao12012-12-181-0/+6
| | | | | | | Signed-off-by: jiewen.yao@intel.com Reviewed-by: michael.d.kinney@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14009 6f19259b-4bc3-4df7-8a09-765794883524
* Change returned status codes for SmiManage() per PI 1.2.1 spec.rsun32012-05-311-2/+2
| | | | | | | Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13394 6f19259b-4bc3-4df7-8a09-765794883524
* Update code to pass build on VS2008 with /Od compiler option.lgao42011-11-281-2/+2
| | | | | | | | | Signed-off-by: lgao4 Reviewed-by: rsun3 Reviewed-by: ftian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12792 6f19259b-4bc3-4df7-8a09-765794883524
* Rollback SMRAM Lock locationmdkinney2011-08-311-11/+1
| | | | | | | | Signed-off-by: mdkinney Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12243 6f19259b-4bc3-4df7-8a09-765794883524
* Update SMM Core to use SMM Mode as soon as SMM Mode is availablemdkinney2011-08-241-35/+106
| | | | | | | | | Signed-off-by: mdkinney Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12190 6f19259b-4bc3-4df7-8a09-765794883524
* Add more checks to skip allocated SMRAM regions when searching for a largest ↵rsun32011-04-081-1/+8
| | | | | | free SMRAM region. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11514 6f19259b-4bc3-4df7-8a09-765794883524
* when SMM Communication Protocol.Communicate() is called from within SMM, ↵rsun32010-12-091-2/+2
| | | | | | SMRAM is accessible so it is not necessary to check the SMRAM open/lock state via SMM ACCESS Protocol. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11142 6f19259b-4bc3-4df7-8a09-765794883524
* Complement fix for revision #10998 (Remove PI SMM IPL's dependency on CPU AP).rsun32010-11-041-8/+12
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11001 6f19259b-4bc3-4df7-8a09-765794883524
* Remove PI SMM IPL's dependency on CPU AP so that PI SMM IPL can be ↵rsun32010-11-031-10/+17
| | | | | | | | dispatched before the CPU AP is installed. If PI SMM IPL will be dispatched before the CPU AP is installed for a platform, the platform developer is expected to set cache-ability of SMRAM to WB earlier to improve performance of SMM initialization. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10998 6f19259b-4bc3-4df7-8a09-765794883524
* Use new API GetSectionFromAnyFvByFileType() of MdePkg DxeServicesLib ↵lgao42010-05-051-79/+11
| | | | | | library to get PE data of SMM_CORE driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10457 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-241-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
* Change BufferSize from UINTN * to UINTN to eliminate pointer to pointer in ↵jyao12010-03-211-2/+10
| | | | | | SmmCore for security consideration. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10299 6f19259b-4bc3-4df7-8a09-765794883524
* Fix the SMRAM caching range base and size. The original code uses the ↵jgong52010-03-091-6/+52
| | | | | | biggest SMRAM range base and size to set the cache attribute by gDS->SetMemorySpaceAttributes(). This is not correct because the platform code might split the TSEG into several ranges. The fix searches and joins all the adjacent ranges to the biggest SMRAM range into a cacheable range so that TSEG can be cached as a whole. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10213 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug that a NULL pointer may be dereferenced. rsun32010-03-041-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10178 6f19259b-4bc3-4df7-8a09-765794883524
* Enable "Load Module At fixed Address" feature in SMM Corejchen202010-03-031-13/+173
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10166 6f19259b-4bc3-4df7-8a09-765794883524
* Change the minimal SMM core size from 1MB to 256KB-4K.jyao12010-03-031-2/+2
| | | | | | Some platforms only enable 1MB, after reserve 1 page for SMM S3. There is at most 1MB-4KB for SMM core. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10158 6f19259b-4bc3-4df7-8a09-765794883524
* Minor coding style fix.rsun32010-03-011-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10145 6f19259b-4bc3-4df7-8a09-765794883524
* Update PiSmmCore:hhuan132010-03-011-0/+7
| | | | | | | 1. Update PiSmmIpl.c DoCommunicate() to prevent exception in case call SmiManage directly if SMRAM is closed or locked. That case causes exception. 2. Update PiSmmCore.c SmmEntryPoint(). It is not required to save/restore InSmm. Because SMM is non-reentrant. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10131 6f19259b-4bc3-4df7-8a09-765794883524
* Add PI SMM IPL and PI SMM Coremdkinney2010-02-251-0/+1041
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10094 6f19259b-4bc3-4df7-8a09-765794883524