summaryrefslogtreecommitdiff
path: root/Core
AgeCommit message (Collapse)Author
2017-07-12UefiCpuPkg/MpLib.c: Set AP state after X2APIC mode enabledJeff Fan
After X2APIC mode is enabled, APs need to be set tp IDLE state, otherwise APs cannot be waken up by MP PPI services. https://bugzilla.tianocore.org/show_bug.cgi?id=505 Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 59a119f0fcaed5a7cab4829bb19dd7ffa94e16a0)
2017-07-12UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLibJeff Fan
In PEI phase, BSP did not program vitural wired mode while APs did. Move program virtual wired mode from CpuDxe to MpInitLib, thus it could benefit on both CpuDxe and CpuMpPei. https://bugzilla.tianocore.org/show_bug.cgi?id=496 Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 9d64a9fd9ee05f0b0228fc1f8b66398dac85e2c9)
2017-07-12UefiCpuPkg/MpInitLib: needn't to allocate AP reset vectorJeff Fan
Because we will always borrow the AP reset vector space for AP waking up. We needn't allocate such range to prevent other module to use it. It could simply the code. https://bugzilla.tianocore.org/show_bug.cgi?id=500 Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit c934a0a5816e38ca5dbdb25936c4f841958a008e)
2017-07-12UefiCpuPkg/MpInitLib: save/restore original contentsJeff Fan
If APs is in HLT-LOOP mode, we need AP reset vector for waking up APs. This updating is to save/restore original contents of AP reset vector around waking up APs always. https://bugzilla.tianocore.org/show_bug.cgi?id=500 Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 9293d6e42e677e4a38e055258c0993ad8a9df14e)
2017-07-12MdeModulePKg/BDS: Build meaningful description for Wi-Fi boot optionRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Fan Wang <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> (cherry picked from commit 6bbd4a8f5f2a538e5017045ab75674ec106f7b54)
2017-07-12MdeModulePkg/Ip4Dxe: Refine the IPv4 configuration help infoJiaxin Wu
Below value indicate whether network address configured successfully or not: Network Device List->MAC->IPv4 Network Configuration->Configured. This patch is to refine its help info. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit d7dd4f0a0678c458005ea40acba70984c58bcb20)
2017-07-12MdeModulePkg: Update PiSmmCore to set correct ImageAddress into LoadedImageLiming Gao
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> (cherry picked from commit d5a67b3da18f815c83593d9329a353ec3a739d66)
2017-07-12MdeModulePkg PiSmmIpl: Fix the issue in LMFA featureLiming Gao
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> (cherry picked from commit c2aeb66fff90e7326d095aed0876d1f67f94f75e)
2017-07-12MdeModulePkg/UfsPciHc: Avoid overriding return value in BindingStartHao Wu
In function UfsHcDriverBindingStart(), the return value 'Status' may be overridden during the original PCI attributes restore process. This commit refines the logic to avoid such override. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit 1a5ae661754625b8f4bba39214006e87216747e9)
2017-07-12MdeModulePkg/UfsPciHc: Remove unused field in UfsHc private structHao Wu
The commit removes the unused field 'EFI_HANDLE Handle' in Ufs host controller private data structure 'UFS_HOST_CONTROLLER_PRIVATE_DATA'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit c36ea72ebd4c0fd2c73f881d4708fa623c20c320)
2017-07-12MdeModulePkg/NvmExpressDxe: Handling return of write to sq and cq dbSuman Prakash
In case of an async command if updating the submission queue tail doorbell fails then the command will not be picked up by device and no completion response will be created. This scenario has to be handled. Also if we create an AsyncRequest element and insert in the async queue, it will never receive a completion so in the timer routine this element won't be freed, resulting in memory leak. Also in case of blocking calls we should capture the status of updating completion queue head doorbell register and return it to caller of PassThru. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Suman Prakash <suman.p@samsung.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> (cherry picked from commit f6b139bde7e0a39f83ffad30af58136d5b0738a7)
2017-07-12MdeModulePkg: Discard received broadcast message in DxeIpIoLib.Fu Siyuan
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> (cherry picked from commit dd29d8b3565ba8ae2e71c097a95b22af5d1d90a4)
2017-07-12MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignmentHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit f8f931f632f7d7ff12a1cfdec36ebefe19085e83)
2017-07-12MdeModulePkg/DeviceManagerUiLib: Fix the network device MAC display issueJiaxin Wu
v3: * Add NULL string check. v2: * Define new STR_FORM_NETWORK_DEVICE_TITLE_HEAD for L" Network Device " instead of hard code in the code. Network device tile (STR_FORM_NETWORK_DEVICE_TITLE) is dynamic adjusted according the different MAC value. So, the string value shouldn't be treated as a constant string (Network Device). Otherwise, the display will be incorrect. Reproduce: Device Manager->Network Device List, select to enter MAC, then to press ESC back to previous page, then re-enter, found each enter/ESC operation, the MAC address display +1. Cc: Eric Dong <eric.dong@intel.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: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit 205a4b0c15372c004a947b6873f711805415f542)
2017-07-12MdeModulePkg/Mtftp4Dxe: Add invalid ServerIp check during MTFTP configurationJiaxin Wu
Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> (cherry picked from commit 17b25f520302f813a50f7876edc2e8fc901e7a7c)
2017-07-12NetworkPkg/TlsAuthConfigDxe: Close and free the file related resourceJiaxin Wu
v2: * Define one new internal function to clean the file content. TlsAuthConfigDxe open file by FileExplorerLib. It need to close file handler and free file related resource in some cases. * User enrolls Cert by escape the Config page. * The Cert is not X509 type. * User chooses another file after he selected a file. Cc: Zhang Chao B <chao.b.zhang@intel.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: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Chao Zhang<chao.b.zhang@intel.com> (cherry picked from commit 8ca417688363da941b329ce134e074971e864c34)
2017-07-12NetworkPkg: Correct the proxy DHCP offer handingJiaxin Wu
When PXE10/WFM11a offer received, we should only cache the first PXE10/WFM11a offer, and discard the others. But Current we discard all PXE10/WFM11a offer. This patch is to fix this issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit 8cdd559be622f7a35731b7f973d8b82d1c9e303e)
2017-07-12NetworkPkg/HttpDxe: Fix HTTP download OS image over 4G size failureJiaxin Wu
UINT32 integer overflow will happen once the download OS image over 4G size. This patch is to fix this issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> (cherry picked from commit 6893b16fb9f8afef71ae4e9e3dead6bb685f6994)
2017-07-12MdeModulePkg/FirmwarePerformanceDxe: Error Level is not used correctlyJeff Fan
Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit d3d562b90419596a1c7dec75d1b49a89b968ead1)
2017-07-12MdeModulePkg/UefiBootManagerLib: Avoid buggy USB short-form expandingRuiyu Ni
When a load option points to a physical UsbIo controller, whose device path contains UsbClass or UsbWwid node, old logic unconditionally treats it as a short-form device path and expands it. But the expanding gets the exactly same device path, and the device path is passed to BmGetNextLoadOptionDevicePath() which then passes this device path to BmExpandUsbDevicePath() again. This causes a infinite recursion. The patch avoids the USB short-form expanding when the device path points to a physical UsbIo controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Michael Turner <Michael.Turner@microsoft.com> (cherry picked from commit 21e359dccab7f3cd7b527721be042d034349417d)
2017-07-12NetworkPkg: Fix bug related DAD issue in IP6 driver.Zhang, Lubo
If we set PXEv6 as the first boot option and reboot immediately after the first successful boot, it will assert. the root cause is when we set the policy from manual to automatic in PXE driver, the ip6 Configure item size is already set to zero and other structures are also released, So it is not needed to perform DAD call back function which is invoked by Ip6ConfigSetMaunualAddress. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> (cherry picked from commit 52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e)
2017-07-12NetworkPkg: Add check logic for iSCSI driver.Zhang, Lubo
Need to check variable of mPrivate whether is null before used and redefine the array length of target address for keyword. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit b28bf4143d00142323d5dd9a9129b9b25d0dff56)
2017-07-12MdeModulePkg PiSmmCore: Enhance SMM FreePool to catch buffer overflowStar Zeng
This solution is equivalent to DXE core. AllocatePool() allocates POOL_TAIL after the buffer. This POOL_TAIL is checked at FreePool(). If the there is buffer overflow, the issue can be caught at FreePool(). This patch could also handle the eight-byte aligned allocation requirement. The discussion related to the eight-byte aligned allocation requirement is at https://lists.01.org/pipermail/edk2-devel/2017-April/009995.html. According to the PI spec (Vol 4, Section 3.2 SmmAllocatePool()): The SmmAllocatePool() function ... All allocations are eight-byte aligned. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Hao Wu <hao.a.wu@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: Hao Wu <hao.a.wu@intel.com> (cherry picked from commit 861c8dff2f506d602f8612ace12d244c29e63f31)
2017-07-12MdeModulePkg/Ufs: Wait fDeviceInit be cleared by devices during initHao Wu
In the origin codes, the host sets the fDeviceInit flag to initiate device initialization, but does not check whether the device resets this flag to indicate the device initialization is completed. Details can be referred at UFS 2.0 Spec Section 14.2 - Flags. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 95ad8f7f6a6c84ef46a96a8ba852afed805d1ca3)
2017-07-12MdeModulePkg/UfsPassThruDxe: Replace 'EFI_D_XXX' with 'DEBUG_XXX'Hao Wu
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> (cherry picked from commit edd94e74c81bc416403b7f19ca80730387ddd4c1)
2017-07-12ShellPkg/pci: Fix VS2012 build failureRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> (cherry picked from commit f1894fa294a17c17149c55ae21d4d85b2df3c1de)
2017-07-12ShellPkg/comp: Fix file tag name.Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> (cherry picked from commit a32c1a5b1c0945a7159a42a28aafcde4011ad55d)
2017-07-12MdeModulePkg/TerminalDxe: Avoid always append device path to *DevRuiyu Ni
When TerminalDxe Start() is called multiple times, the old logic unconditionally appended the terminal device path candidates to *Dev (ConInDev/ConOutDev/ErrOutDev), resulting the volatile storage is full. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit b9c04b88a148d6a4d618e176c9a35d9b15ce9954)
2017-07-12MdeModulePkg DxeCore: Fix issue to print GUID value %g without pointerLiming Gao
https://bugzilla.tianocore.org/show_bug.cgi?id=474 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> (cherry picked from commit e06179889586c37101e2900e7f52be9f0da12cda)
2017-07-12UefiCpuPkg/PiSmmCpuDxeSmm: Lock should be acquiredJeff Fan
SMM BSP's *busy* state should be acquired. We could use AcquireSpinLock() instead of AcquireSpinLockOrFail(). Cc: Hao Wu <hao.a.wu@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> (cherry picked from commit 170a3c1e0fff7de43501ef851b4ad5cbe355e220)
2017-07-12ShellPkg/Pci: Always dump the extended config space for PCIERuiyu Ni
It is to align to the original behavior before "-ec" option was added. The patch also refines the code to make it more readable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Cc: Jim Dailey <Jim.Dailey@dell.com> (cherry picked from commit 33cc487c263384451aef77fa5d749fd4f3d78b7d)
2017-07-12MdeModulePkg/HiiDB: Avoid incorrect results of multiplicationDandan Bi
An example: The codes in function Output8bitPixel in Image.c: OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos); Both Image->Width and Ypos are of type UINT16. They will be promoted to int (signed) first, and then perform the multiplication defined by macro BITMAP_LEN_8_BIT. If the result of multiplication between Image->Width and Ypos exceeds the range of type int, a potential incorrect results will be assigned to OffsetY. This commit adds explicit UINT32 type cast for 'Image->Width' to avoid possible overflow in the int range. And also fix similar issues in HiiDatabase. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> (cherry picked from commit f76bc44362e5f0a2ea509c07b2f6846bd9833ee8)
2017-07-12MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck arrayDandan Bi
When initializing ConsoleOutCheck/ConsoleInCheck/ConsoleErrCheck array in BMM_FAKE_NV_DATA structure, also need to consider whether the terminal device is ConOut/ConIn/ConErr or not. 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> (cherry picked from commit d508fe87fe73f1e99c5e71ff2aa49459cbe68d2f)
2017-07-12UefiCpuPkg/MtrrLib: Avoid running unnecessary codeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> (cherry picked from commit c9b449213337172d629197a75390a151eba65eb6)
2017-07-12ShellPkg/ConsistMapping: Remove unneeded memory reallocationRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 17c3dc19395121486c6f1614dbc564f39763720a)
2017-07-12MdeModulePkg/BootManagerMenu: Add assertion to indicate no DIV by 0Ruiyu Ni
BootMenuSelectItem() contains code to DIV BootMenuData->ItemCount. When BootMenuData->ItemCount can be 0, the DIV operation may trigger CPU exception. But in logic, this case won't happen. So add assertion to indicate it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> (cherry picked from commit 51a1db9b24d850c785d240da599c4bf9ba1c0fd3)
2017-07-12CryptoPkg: Correct some minor issues in function commentsLong Qin
Correct some minor comment issues in BaseCryptLib.h and CryptPkcs7Verify.c, including: - missed "out" in parameter property for ARC4 interfaces; - Wrong Comment tail in Pkcs7GetAttachedContent function Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit 0c9fc4b1679946f59efa1aaf11e2e9e1acab303d)
2017-07-12MdeModulePkg CapsuleApp: Add directory supportStar Zeng
Current CapsuleApp only supports input/output file from rootdirectory. If the CapsuleApp and related file are put into subdirectory, below message will be shown when running the CapsuleApp in shell. "CapsuleApp: capsule image (Capsule image file name) is not found." This patch is to add directory support for CapsuleApp by using shell protocol. 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> (cherry picked from commit 8b17683a27cfef7e70008dfccbc17a358ae33df1)
2017-07-12IntelFrameworkPkg/UefiLib: Avoid mis-calculate of graphic console sizeHao Wu
The commit adds check in function InternalPrintGraphic() to ensure that the expression: Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) will not overflow in the UINTN range. The commit also adds an explicit UINT32 type cast for 'Blt->Width' to avoid possible overflow in the int range for: Blt->Width * Blt->Height Since both Blt->Width and Blt->Height are of type UINT16. They will be promoted to int (signed) first, and then perform the multiplication operation. If the result of multiplication between Blt->Width and Blt->Height exceeds the range of type int, a potential incorrect size will be passed into function AllocateZeroPool(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 9c0e4db3db8d102812ca57f6225290c7ba079ad8)
2017-07-12MdePkg/UefiLib: Avoid mis-calculate of graphic console sizeHao Wu
The commit adds check in function InternalPrintGraphic() to ensure that the expression: Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) will not overflow in the UINTN range. The commit also adds an explicit UINT32 type cast for 'Blt->Width' to avoid possible overflow in the int range for: Blt->Width * Blt->Height Since both Blt->Width and Blt->Height are of type UINT16. They will be promoted to int (signed) first, and then perform the multiplication operation. If the result of multiplication between Blt->Width and Blt->Height exceeds the range of type int, a potential incorrect size will be passed into function AllocateZeroPool(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 458cd568b64a0e4159f85a31809e55657db23792)
2017-07-12MdeModulePkg/DxeCore: Add ASSERT to ensure no subtract underflowHao Wu
For function SplitRecord() in file PropertiesTable.c, there is a potential subtract underflow case for line: return TotalNewRecordCount - 1; However, such case will not happen since the logic in function SplitTable() ensure that when calling SplitRecord(), the variable 'TotalNewRecordCount' will not be zero when performing the subtraction. It will be handled in the previous if statement: if (MaxSplitRecordCount == 0) { CopyMem (NewRecord, OldRecord, DescriptorSize); return 0; } Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 1860cb00c18c6f0c58336ea15a63889dabd31d15)
2017-07-12MdeModulePkg/PiSmmCore: Fix potentially uninitialized local variableHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 89558f1653e1820f0f824d3299122100b0a6d82c)
2017-05-26GCC build support.zwei4
Change code which is not compatible with GCC. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 <david.wei@intel.com>
2017-05-09Upgrade coreGuo Mang
Upgrade core to UDK2017 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com> Reviewed-by: zwei4 <david.wei@intel.com>
2017-04-27SignedCapsulePkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-04-27IntelFrameworkPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-04-27UefiCpuPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-04-27SourceLevelDebugPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-04-27ShellPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-04-27ShellBinPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>