summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Add PcdMaxPeiPerformanceLogEntries16 PROMPT&HELP STR to *.uniStar Zeng2016-03-151-1/+10
| | | | | | | | | | | | | | | | | | | | | Commit 7c50b3434377cbb49ce4514ee31339000a5cadc0 introduced PcdMaxPeiPerformanceLogEntries16 to support > 256 PEI performance log entries, but its PROMPT&HELP STR were forgotten to be added into *.uni. Commit 7c50b3434377cbb49ce4514ee31339000a5cadc0 also updated PcdMaxPeiPerformanceLogEntries HELP STR. This patch is to add PcdMaxPeiPerformanceLogEntries16 PROMPT&HELP STR and update PcdMaxPeiPerformanceLogEntries HELP STR in *.uni. Cc: Shumin Qiu <shumin.qiu@intel.com> Cc: Cinnamon Shia <cinnamon.shia@hpe.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add missing pcd description to MdeModulePkg.uniDandan Bi2016-03-111-0/+8
| | | | | | | | | | | Since PcdHiiOsRuntimeSupport has added in the MdeModulePkg.dec file, now add the usage information in the uni file. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* ModulePkg/DxeHttpLib: Adding Functions to HttpLibGhazi Belaam2016-03-104-66/+753
| | | | | | | | | | | There some usefull functions in edk2 private modules that could be used, so we added them to the httpLib Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ghazi Belaam <Ghazi.belaam@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg: Increase the maximum number of PEI performance log entriesCinnamon Shia2016-03-085-10/+37
| | | | | | | | | | | | | The maximum number of PEI performance log entries is 255. Add a new PCD, PcdMaxPeiPerformanceLogEntries16, to increase the maximum number of PEI performance log entries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Joseph Shifflett <joseph.shifflett@hpe.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg AcpiTableDxe: Use Rsdt to check against NULLStar Zeng2016-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | Some static scan tool may regard CurrentRsdtEntry to be potentially referenced to NULL pointer if CurrentRsdtEntry == NULL is used in the right above if condition judgment. CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32)); It is introduced by commit f9bbb8d9c3f065faba9f266cf4e731fe2ca70c4d. To avoid it and have same style with "((Xsdt == NULL) || CurrentTablePointer64 == (UINT64) (UINTN) Table->Table)", use Rsdt instead of CurrentRsdtEntry to check against NULL. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Shumin Qiu <shumin.qiu@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg/Bds: More user-friendly network boot option descriptionRuiyu Ni2016-03-072-39/+133
| | | | | | | | | | | | The patch enhances the UefiBootManagerLib to use more user-friendly network boot option description. It builds description like below: "PXEv6 (MAC:112233445566 VLAN1)" "HTTPv4 (MAC:112233445566)" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg/UefiBootManagerLib: Separate boot description functions.Ruiyu Ni2016-03-074-621/+613
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg/Bds: Fix VS2010/VS2012 build failure.Ruiyu Ni2016-03-071-0/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg AcpiTableDxe: Don't uninstall Acpi Sdt Protocol at ReadyToLockStar Zeng2016-03-043-67/+3
| | | | | | | | | | | | 1. The consumer of Acpi Sdt Protocol may want to use the API after ReadyToLock. 2. The ACPI system configuration table even could be overwritten, we see little issue in leaving Acpi Sdt Protocol installed. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Feng Tian <feng.tian@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>
* MdeModulePkg/PciHostBridge: Don't assert when setting UC to MMIO failsRuiyu Ni2016-03-041-1/+3
| | | | | | | | | | | Failing to set EFI_MEMORY_UC to MMIO aperture is not a fatal error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/Bds: Support booting from remote file system.Ruiyu Ni2016-03-042-1/+89
| | | | | | | | | Enhance BDS to support booting from a remote file system exposed by a HTTP boot option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg/Bds: Support short-form URI boot.Ruiyu Ni2016-03-041-0/+72
| | | | | | | | | The patch adds short-form URI boot support to follow UEFI Spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg/Bds: Wide match HTTP boot option.Ruiyu Ni2016-03-041-12/+137
| | | | | | | | | | | Enhance BDS to wide match the HTTP boot option without matching the specific device path data in IP device path and URI device path node. It's to follow UEFI Spec 2.6. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg/Bds: Refine the code to load file from FV.Ruiyu Ni2016-03-041-23/+40
| | | | | | | | | | | | Change BmGetFileBufferByMemmapFv to BmGetFileBufferByFvFilePath. The original function gets the file buffer only from memory mapped FV device path and leaves GUIDed FV device path to the code below; The new function gets the file buffer from both formats of FV device paths. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg: Fix IPv4 double freeSamer El-Haj-Mahmoud2016-03-041-1/+3
| | | | | | | | | | | | | | | Fix a possible ASSERT after NBP finishes loading from a PXE boot. Ip4Dxe driver calls Ip4Config2SetPolicy which calls CloseEvent on the Dhcp4Event struct member. After NBP is downloaded, it then calls Ip4Config2CleanInstance which calls CloseEvent again on Dhcp4Event. This double free can cause an ASSERT. When the event is closed, set the event pointer to NULL so the Ip4 code won't call CloseEvent on it again. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg: Make HII configuration settings available to OS runtimeDandan Bi2016-03-047-5/+259
| | | | | | | | | | | | | | | | | | This feature is aimed to allow OS make use of the HII database during runtime. In this case, the contents of the HII Database is exported to a buffer. The pointer to the buffer is placed in the EFI System Configuration Table, where it can be retrieved by an OS application. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Brian J. Johnson <bjohnson@sgi.com> Cc: Andrew Fish <afish@apple.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/DisplayEngineDxe: Refine the coding styleDandan Bi2016-03-041-1/+0
| | | | | | | | | | Remove the empty line to conform with current coding style. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/PciHostBridgeLib: Correct the function header commentsRuiyu Ni2016-03-032-6/+5
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* MdeModulePkg: PciHostBridgeDxe: don't assume extended config spaceLaszlo Ersek2016-03-033-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The "pc" ("pc-i440fx-*") machine types of QEMU don't support extended config space. Accordingly, OVMF will use the following library instances in connection with the core PciHostBridgeDxe driver: BasePciSegmentLibPci [class: PciSegmentLib] BasePciLibCf8 [class: PciLib] BasePciCf8Lib [class: PciCf8Lib] Add a new field to the PCI_ROOT_BRIDGE structure so that RootBridgeIoCheckParameter() can catch config space offsets above 0xFF on such old (emulated) platforms. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: PciHostBridgeDxe: insert horizontal whitespaceLaszlo Ersek2016-03-032-29/+29
| | | | | | | | | | | ... in preparation for the next patch. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* MdeModulePkg/FvSimpleFs: don't open DevicePath with BY_DRIVER modeFeng Tian2016-03-031-6/+5
| | | | | | | | | | | | The device path protocol doesn't get closed at FvSimpleFilesystem driver stop() when it's opened at start() with BY_DRIVER mode. We change it to open DevicePath with GET_PROTOCOL mode as FV2 protocol with BY_DRIVER is enough. Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* MdeModulePkg: Change the default IPv4 config policyJiaxin Wu2016-03-025-107/+150
| | | | | | | | | | | | | | | | | | | | | | | | | Git version '3d0a49ad' commit provided a scenario to resolve the performance issue for IPv4, but it's not workable for IPv6. To avoid IPv4 and IPv6 inconsistency, we decided to revert that version fix. If so, the default policy for Ip4Config2 is Ip4Config2PolicyDhcp, which results in all NIC ports attempting DHCP. So, this patch is used to changes the the default IPv4 config policy to Ip4Config2PolicyStatic and also defer the SetData operation after Ip4Config2Protocol installed. This update let the other platform drivers have chance to change the default config data by consume Ip4Config2Protocol. Cc: Subramanian Sriram <sriram-s@hpe.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Subramanian Sriram <sriram-s@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* MdeModulePkg: Add ASSERT to make sure pointers are not NULLDandan Bi2016-03-021-0/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: FileExplorerLib: Modify the EFI_FILE_EXPLORE_FORMSET_GUIDDandan Bi2016-03-021-2/+2
| | | | | | | | | | | Currently the EFI_FILE_EXPLORE_FORMSET_GUID value in BdsDxe in IntelFrameworkModulePkg is same with the GUID VALUE in FileExplorerLib. This patch is to modify the EFI_FILE_EXPLORE_FORMSET_GUID in FileExplorerLib to avoid potential issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: FileExplorerLib: Add check when to call FreePool functionDandan Bi2016-03-021-2/+6
| | | | | | | | | | when free up resource allocated for a MenuEntry, there exists the case that the DevicePath and DisplayString are NULL, so before calling FreePool function, need to check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: DxeCore: fully initialize image context before passing it onArd Biesheuvel2016-03-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | When the DXE core is loaded, it invokes the PeCoffExtraActionLib library function 'PeCoffLoaderRelocateImageExtraAction' explicitly, which may be in addition to the same function having been called by the DxeIpl PE/COFF loader instance. The ImageContext that DXE core presents to this function is only partially initialized, which may result in the following output on AArch64 systems: add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226240 <some intermediate output> add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226000 This is caused by incorrect data in the ImageContext structure, which means the start of the .text section is calculated incorrectly. In general, it is the duty of the caller to present a valid ImageContext structure, so let's add the missing values before invoking PeCoffLoaderRelocateImageExtraAction(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/NvmExpress: Fix uninitialized field used in NVMe DiskInfoTian, Feng2016-03-011-1/+2
| | | | | | | Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Add new API HttpUrlGetPath() to HttpLib.hFu Siyuan2016-03-012-2/+85
| | | | | | | | | | | This patch is to add a new interface to get the "Path" component according to the URI parse result, it would be helpful for the library user to extract the file path value in a URI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* MdeModulePkg/HiiDatabaseDxe: Fix a variable is uninitialized.Cinnamon Shia2016-02-291-0/+2
| | | | | | | | | | | | The StringSize variable in the FindStringBlock function is a IN OUT parameter of the GetUnicodeStringTextOrSize function. Thought the GetUnicodeStringTextOrSize function changes the value of the StringSize variable, it is better to initialize the StringSize variable before passing it to the GetUnicodeStringTextOrSize function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: PciHostBridgeLibNull: rewrap source to 79 charactersLaszlo Ersek2016-02-292-24/+38
| | | | | | | | | Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: Update PeiCore dispatcher to handle PEIM and PEI_CORE onlyLiming Gao2016-02-291-3/+21
| | | | | | | | | | | When PcdShadowPeimOnBoot is FALSE, they are not copied to memory and execute from their original locations. Here, this policy should only apply for PEIM and PEI_CORE, not for other file type, such as DXE_CORE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Tested-by: Eugene Cohen <eugene@hp.com>
* MdeModulePkg RamDiskDxe: Install Block I/O 2 Protocol on RAM disk devicesHao Wu2016-02-295-5/+373
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add RamDiskDxe driver implementationHao Wu2016-02-2914-0/+2648
| | | | | | | | | | | | | The RamDiskDxe driver will: 1. Produce the EFI RAM Disk Protocol 2. Install RAM disk device path and block I/O related protocols on the RAM disk device handle. 3. Install RAM disk configuration form to HII database Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModuelPkg/PciBus: Return AddrTranslationOffset in GetBarAttributesRuiyu Ni2016-02-291-0/+62
| | | | | | | | | | | | | | | Some platform doesn't use CPU(HOST)/Device 1:1 mapping for PCI Bus. But PCI IO doesn't have interface to tell caller (device driver) whether the address returned by GetBarAttributes() is HOST address or device address. UEFI Spec 2.6 addresses this issue by clarifying the address returned is HOST address and caller can use AddrTranslationOffset to calculate the device address. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/PciBus: reorganize case-statement to reduce code linesRuiyu Ni2016-02-291-24/+10
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/PciBus: Change local variable AddressSpace to DescriptorRuiyu Ni2016-02-291-26/+22
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Add missing PCD usage information string.Qiu Shumin2016-02-291-1/+12
| | | | | | | | | | | For new PCDs add their usage information strings in UNI file. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: "Yao, Jiewen" <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg:Fix a robustness issue of Mnp DriverZhang Lubo2016-02-291-4/+60
| | | | | | | | | | | | | | | | | | | | v3: * When there exists duplicate items in VLAN variable , save the correct variable content back to the variable storage after duplicate items are removed Duplicate items in VLAN variable will cause MNP driver binding start function fall into infinite loop,so we should check it's content before using it. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* MdeModulePkg: RegularExpressionDxe: support free(NULL)Laszlo Ersek2016-02-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ISO C standard says about free(), If ptr is a null pointer, no action occurs. This is not true of the FreePool() interface of the MemoryAllocationLib class: Buffer must have been allocated on a previous call to the pool allocation services of the Memory Allocation Library. [...] If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT(). Therefore we must not forward the argument of free() to FreePool() without checking. Cc: Cecil Sheng <cecil.sheng@hpe.com> Cc: Cinnamon Shia <cinnamon.shia@hpe.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Samer El-Haj-Mahmoud <elhaj@hpe.com> Cc: Yao Jiewen <Jiewen.Yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-By: Cinnamon Shia <cinnamon.shia@hpe.com>
* MdeModulePkg: AcpiTableDxe: fix VS2008 build by merging adjacent if blocksArd Biesheuvel2016-02-261-12/+10
| | | | | | | | | | | | | The assignment of CurrentRsdtEntry and its subsequent dereference are subject to the same condition, but for some reason, VS2008 does not see that and warns about the dereference possibly involving an uninitialized pointer. Since the single statememt between the blocks is unrelated, we can just move it and merge the two conditional blocks together. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/PciHostBridge: Don't assume resources are fully NonExistentRuiyu Ni2016-02-261-11/+294
| | | | | | | | | | | | | | | | | | | | | The patch removes the assumption that the resources claimed by root bridges should not exist. Because resources might have been added: 1. by platform modules either in PEI through resource HOB, or in DXE, before the PCI host bridge driver runs. 2. Resources claimed by different root bridges may overlap so that resource adding operation for latter root bridges may fail if we assume the resource should not exist. In real world, this patch is to fit OVMF platform needs because different root bridges in OVMF platform shares the same resources. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> [lersek@redhat.com: intersection-based implementation] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/PciHostBridge: Refine function header comments.Ruiyu Ni2016-02-264-81/+103
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* MdeModulePkg: Add ASSERT to make sure pointer 'OptionalData' not be NULLDandan Bi2016-02-261-0/+2
| | | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL.Qiu Shumin2016-02-261-0/+1
| | | | | | | | | If 'CoreGetMemoryMap' return success the 'MemoryMap' shouldn't be NULL. Add code to make sure this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
* MdeModulePkg: Add submitted callback test case in DriverSampleDandan Bi2016-02-254-3/+40
| | | | | | | | | | | Now we add new HII action type EFI_BROWSER_ACTION_SUBMITTED in EFI HII Configuration Access Protocol, so add the test case in DriverSample to show how to use it and whether it works. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Add new HII action type EFI_BROWSER_ACTION_SUBMITTEDDandan Bi2016-02-251-0/+98
| | | | | | | | | | Add new HII action type EFI_BROWSER_ACTION_SUBMITTED to notify HII driver when its question values are submitted. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Fix Memory Attributes table type issueJiewen Yao2016-02-252-83/+37
| | | | | | | | | | | | | | | | According to the spec, each entry in the Memory Attributes table shall have the same type as the region it was carved out of in the UEFI memory map. The current attribute uses RTData for PE Data, but it should be RTCode. This patch fixed the issue. It is validated with or without PropertiesTable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Fix the build fail issue on VS2008\VS2010\GCCDandan Bi2016-02-251-24/+8
| | | | | | | | | | | | This is caused by my last commit,the LoadOption may not initialize when call FreePool, and after investigation, find that we can delete the LoadOption variable, this patch is to fix this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: AcpiTableDxe: make 4 GB table allocation limit optionalArd Biesheuvel2016-02-244-184/+273
| | | | | | | | | | | | | | | | | | | | AARCH64 systems never require compatibility with legacy ACPI OSes, and may not have any 32-bit addressable system RAM. To support ACPI on these systems, we need to be able to relax the 4 GB allocation restriction. So add a PCD PcdAcpiExposedTableVersions containing a bitmask describing which ACPI versions are targeted, and wire it up it up to the memory allocation calls in AcpiTableDxe/AcpiTableProtocol.c. I.e., if ACPI v1.0b is not among the supported versions, the memory allocations are not limited to 4 GB, and only table types that carry 64-bit addresses are emitted. Note that this will inhibit the publishing of any tables that carry only 32-bit addresses, i.e., RSDPv1, RSDTv1 and RSDTv3. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Add sample help information for HelloWorld application.Qiu Shumin2016-02-243-2/+44
| | | | | | | | | | | | | | | | Since Shell supports finding help information from resource section of application image. We enhance the HelloWorld to add help information string. After the HelloWorld are loaded in system the help string will be stored in resource section of the application image. Cc: Feng Tian <feng.tian@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>