summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
AgeCommit message (Collapse)Author
2015-09-21MdeModulePkg/Core/Dxe/Gcd: remove set but not used variablesLaszlo Ersek
These trip up compilation with gcc. (Sync patch r18515 from main trunk.) Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18516 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-18MdeModulePkg DxeCore: Take the range in resource HOB for PHIT as higher priorityStar Zeng
Take the range in the resource descriptor HOB for the memory region described by the PHIT as higher priority if it is big enough. It can make the memory bin allocated to be at the same memory region with PHIT that has more better compatibility to avoid memory fragmentation for some code practices assume and allocate <4G ACPI memory. Also let the minimal memory size needed include the total memory bin size needed to make sure memory bin could be allocated successfully. (Sync patch r18503 from main trunk.) Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18505 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-18MdeModulePkg DxeCore: Relocate HOB List after other tested memory resources ↵Star Zeng
added The HOB List relocation should be at after all the tested memory resources added (except the memory space that covers HOB List) to the memory services, because the memory resource found in CoreInitializeMemoryServices() may have not enough remaining resource for HOB List. And the memory space that covers HOB List should be processed after HOB List relocation to avoid the resources allocated by others to corrupt HOB List before its relocation. (Sync patch r18499 from main trunk.) Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> 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/branches/UDK2015@18504 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-26MdeModulePkg PiSmmCore: Prevent overlap for gSmmCorePrivate and CommBufferStar Zeng
InternalIsBufferOverlapped() is created to check overlap between buffers. 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@18312 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25MdeModulePkg PeiCore: Recheck SwitchStackSignal after ProcessNotifyList()Star Zeng
in case PeiInstallPeiMemory() is done in a callback with EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH, and the callback is registered on a PPI that is installed in the last PEIM. At the case, PeiCore SwitchStack code will be not being invoked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18305 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-07MdeModulePkg DxeIpl: Fix IA32 build failure with GCC 5.1.1Star Zeng
Got the build failure feedback below, this patch is to fix that. This broke the IA32 Ovmf build for me, with GCC 5.1.1 (Fedora 22): /home/dwmw2/git/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c:377:7: error: ‘PageTables’ may be used uninitialized in this function [-Werror=maybe-uninitialized] AsmWriteCr3 (PageTables); ^ /home/dwmw2/git/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c:224:9: note: ‘PageTables’ was declared here UINTN PageTables; ^ cc1: all warnings being treated as errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18190 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-05MdeModulePkg DxeIpl: Add stack NX supportStar Zeng
This feature is added for UEFI spec that says "Stack may be marked as non-executable in identity mapped page tables". A PCD PcdSetNxForStack is added to turn on/off this feature, and it is FALSE by default. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: "Yao, Jiewen" <Jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18166 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-04MdeModulePkg DxeCore: Move ProcessLibraryConstructorList()Star Zeng
to right after CoreInitializeGcdServices(). Why? Some platforms maybe report both below 4G and above 4G memory resource hob as tested, then CoreInitializeMemoryServices() will find and add the tested above 4G memory resource hob to memory descriptor for early memory allocation services, then if ProcessLibraryConstructorList() that has library constructor tries to allocate below 4G memory and will fail. In fact, the following CoreInitializeGcdServices() will add all the memory resource hob to GCD map, and add the tested below 4G memory resource hob to memory descriptor, but it has been too late for ProcessLibraryConstructorList(). Also move below two lines as they are needed to be after the constructor of DxeCorePerfomanceLib. PERF_END (NULL,"PEI", NULL, 0) ; PERF_START (NULL,"DXE", NULL, 0) ; 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@18146 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03MdeModulePkg PeiCore: Add PCD to specify PEIM ShadowLiming Gao
v2 changelog: Check CurrentPeimHandle to check the matched PeimHandle. Add check point to ShadowPeiCore based on PCD. v1 changelog: PeiCore LoadImage always shadow itself and PEIM on normal boot after the physical memory is installed. On the emulator platform, the shadow may be not necessary. To support such usage, new PCD PcdShadowPeimOnBoot is introduced to specify whether loads PEIM in memory by default. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18125 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-28MdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRangesStar Zeng
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
2015-07-26MdeModulePkg PiSmmCore: Remove a hidden assumption of SMRAM reservationStar Zeng
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
2015-07-16MdeModulePkg DxeIpl: Skip install MemoryInfoHob if this hob existsLiming Gao
Add the check at DxeLoadCore() on MdeModulePkg\Core\DxeIplPeim\DxeLoad.c to skip install the "gEfiMemoryTypeInformationGuid" hob if it is already installed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18018 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-03MdeModulePkg: Refine code to make it more readable.Qiu Shumin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17818 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: Merge GCD range before convert it to EFI memoryLiming Gao
GCD Range is byte address. EFI memory range is page address. To make sure GCD range is converted to EFI memory range, the following things are added: 1. Merge adjacent GCD range first. 2. Add ASSERT check on GCD range alignment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17813 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: enforce arch-specific alignment for split regionsArd Biesheuvel
The splitting of memory regions into code and data regions violates architecture specific alignment rules by using a fixed alignment of 4 KB. Replace it with EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT, which is defined appropriately on each architecture. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Jaben Carsey" <jaben.carsey@intel.com> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17812 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: move arch-specific allocation granularity defines to DxeMain.hArd Biesheuvel
Move the definitions of EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT and DEFAULT_PAGE_ALLOCATION to DxeMain.h to make them available explicitly to all parts of DxeCore. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17811 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: rename PropertiesTableEnable to PcdPropertiesTableEnableArd Biesheuvel
PCD names should start with 'Pcd' so rename PropertiesTableEnable to PcdPropertiesTableEnable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17810 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: make internal functions STATIC in Core/Dxe/Misc/PropertiesTable.cArd Biesheuvel
Add STATIC to functions that are only used internally. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Jaben Carsey" <jaben.carsey@intel.com> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17809 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: remove unused functions from Core/Dxe/Misc/PropertiesTable.cArd Biesheuvel
This removes the functions RevertRuntimeMemoryMap () and DumpMemoryMap () which are not referenced anywhere in the code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17808 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02MdeModulePkg: Update DxeCore to handle LoadFile DevicePathLiming Gao
UEFI Spec HTTP Boot Device Path, after retrieving the boot resource information, the BootURI device path node will be updated to include the BootURI information. It means the device path on the child handle will be updated after the LoadFile() service is called. To handle this case, DxeCore LoadImage() service is updated as the below: 1) Get Device handle based on Device Path 2) Call LoadFile() service (GetFileBufferByFilePath() API) to get Load File Buffer. 3) Retrieve DevicePath from Device handle Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17799 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25MdeModulePkg: Update PeiCore to handle specific child FVLiming Gao
Child FV may be placed in parent FV image without process required. Then, Child FV and parent FV will be in the same continuous space. For FileHandle, FileHandleToVolume() function needs to find the best matched FV handle. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17704 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25MdeModulePkg: Add Memory Capabilities for MMIO and Reserved RangeLiming Gao
UEFI2.5 spec, GetMemoryMap(), says: Attribute: Attributes of the memory region that describe the bit mask of capabilities for that memory region, and not necessarily the current settings for that memory region. But, GetMemoryMap() implementation doesn't append memory capabilities for MMIO and Reserved memory range. This will break UEFI2.5 Properties Table feature, because Properties Table need return EFI_MEMORY_RO or EFI_MEMORY_XP capabilities for OS. This patch appends memory capabilities for those memory range. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17703 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-18MdeModulePkg PiSmmCore: Unregister end of dxe notification in SmmReadyToLock.Star Zeng
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
2015-06-18MdeModulePkg PiSmmCore: Introduce SMM Exit Boot Services and Legacy Boot.Star Zeng
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
2015-06-10Fix logic error on SectionAlignment calculation.Yao, Jiewen
The correct logic should be: - The SectionAlignment is got from Magic number. - The Magic number is got from PE header and machine type. The original code mix them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <Jiewen.yao@intel.com> Reviewed-by: "Ard Biesheuvel" <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17603 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09MdeModulePkg PiSmmCore: Free FullSmramRanges at error condition.Star Zeng
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
2015-06-09MdeModulePkg DxeCore: Call UnregisterMemoryProfileImage correctly.Star Zeng
Use if (Image->Started) condition judgement before call to UnregisterMemoryProfileImage() in CoreUnloadAndCloseImage(). 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@17597 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09MdeModulePkg: Refine the comments format for PropertiesTable.Qiu Shumin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17589 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08MdeModulePkg: Fix bug of AllocatePages for large alignmentHeyi Guo
DescEnd will be clipped for alignment in CoreFindFreePagesI, and it may fall below DescStart, when alignment is more than 16KB (included) and both DescStart and original DescEnd fall into a single range of such alignment. This results in a huge size (Negative number in unsigned type) for this descriptor, fulfilling the allocation requirement but failing to run ConvertPages; at last it causes occasional failure of AllocatePages. A simple comparison is added to ensure we would never get a negative number. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17575 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-06PiSmmCore dispatcher should not use one Index for three loops.Zachary Bobroff
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Zachary Bobroff" <zacharyb@ami.com> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17566 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-05Fix GCC build error.Yao, Jiewen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <Jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17565 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-05Add UEFI 2.5 properties table support in DXE core.Yao, Jiewen
Add PropertiesTableAttributesDxe driver to set ACPINvs/Reserved memory type to be XP, as default policy. 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: "Gao, Liming" <Liming.Gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17564 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-01MdeModulePkg DxeCore: Add debug message to assist TPL related issues.Star Zeng
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
2015-05-29MdeModulePkg/DxeCore: Fixed build error.Star Zeng
ARM toolchain raises the build error: "enumerated type mixed with another type". To fix the issue, typecase can be used like below. - return EfiMaxMemoryType + 1; + return (EFI_MEMORY_TYPE)(EfiMaxMemoryType + 1); But to eliminate the confusion, update the return type of GetProfileMemoryIndex() from EFI_MEMORY_TYPE to UINTN. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17535 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-19MdeModulePkg: Update the short name for persistent memory type.Liming Gao
This change will make DEBUG information be aligned with DEBUG_GCD enabled. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17470 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-18MdeModulePkg: Update memory profile for OEM reserved memory type.Star Zeng
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@17462 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-18MdeModulePkg PiSmmCore: Care runtime code/data only for SMRAM profile.Star Zeng
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@17461 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-18MdeModulePkg DxeCore: Add OEM reserved memory type support.Star Zeng
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@17460 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-12MdeModulePkg: SmmIplEntry(): don't suppress SMM core startup failureLaszlo Ersek
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
2015-05-11MdeModulePkg DxeCore: Add memory more reliable support.Star Zeng
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@17400 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11MdeModulePkg DxeCore: Add read only memory support.Star Zeng
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@17397 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11MdeModulePkg: Update implementation of PeiAllocatePages() to allow ↵Star Zeng
EfiReservedMemoryType. 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@17394 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11MdeModulePkg: Add Reset2 ppi support in PEI CORE.Star Zeng
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@17389 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-07MdeModulePkg/SmmCore: SMM register protocol notify function clarifyJeff Fan
PI 1.4 clarified SMM register protocol notify function return status as below: EFI_SUCCESS Successfully returned the registration record that has been added or unhooked EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL The implementation of SmmRegisterProtocolNotify() already followed this new rule, needn't to be updated. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17349 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-29MdeModulePkg: PI1.4 DxeCore GetMemoryMap() updateLiming Gao
PI1.4: Updates DxeCore to add all EfiGcdMemoryTypeReserved memory into UEFI memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17253 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-29MdeModulePkg: Add support for UEFI2.5 and PI1.4 PersistentMemory featureLiming Gao
Update DxeCore to collect PersistentMemory resource and report them in EFI memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17242 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-10MdeModulePkg: Roll back report status code change in ↵Elvin Li
RuntimeDriverSetVirtualAddressMap. Roll back report status code to original place in RuntimeDriverSetVirtualAddressMap. Per UEFI spec, the call to SetVirtualAddressMap() must be done with the physical mappings. We can not assume virtual address could work in SetVirtualAddressMap (), so we can not call report status code interface with virtual address. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17139 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-09MdeModulePkg: Put report status code at the end of ↵Elvin Li
RuntimeDriverSetVirtualAddressMap. Move report status code to the end after all pointers convert and image relocation are finished. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17136 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-07MdeModulePkg: Put report status code after event was signaled per PI spec.Elvin Li
For PI spec vol3, "EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT The EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event was signaled." However, in current code base, it is reported before events were signaled. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17123 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01MdeModulePkg: add error handling when DXE IPL PPI is not found.Elvin Li
Add status code report and cpu deadloop when DXE IPL PPI is not found. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17087 6f19259b-4bc3-4df7-8a09-765794883524