summaryrefslogtreecommitdiff
path: root/QuarkSocPkg
AgeCommit message (Collapse)AuthorFilesLines
2017-08-16QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2Marvin H?user1-2/+2
As part of commit 5f82e02, ActiveRecordInDb was introduced as a copy of RecordInDb as latter may be freed by the callback function. This commit replaces an access of RecordInDb after the callback function has been executed with an access to ActiveRecordInDb. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2017-08-10QuarkSocPkg/MemoryInit: Remove use of memset()/memcpy()Michael D Kinney2-8/+8
Map the use of memset() and memcpy() to the BaseMemoryLib functions ZeroMem(), SetMem(), and CopyMem(). This fixes GCC build issues with this module. With the remap of the functions, the [BuildOptions] MSFT CC_FLAGS to enable /Oi can also be removed, so the MSFT and GCC builds behave the same. Cc: Kelly Steele <kelly.steele@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Kelly Steele <kelly.steele@intel.com>
2017-08-07QuarkSocPkg MtrrLib: Remove reference deprecated macro.Eric Dong1-11/+15
Cc: Jeff Fan <jeff.fan@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-08-07QuarkSocPkg MtrrLib: Enhance get mtrr mask logic.Eric Dong1-5/+4
In order to not use the deprecated macro, refine get mtrr mask value logic. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-08-03edk2: Move License.txt file to rootMichael D Kinney1-25/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=642 Add top level License.txt file with the BSD 2-Clause License that is used by the majority of the EKD II open source project content. Merge copyright statements from the BSD 2-Clause License files in each package directory and remove the duplication License.txt file from package directories. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03edk2: Move TianoCore Contribution Agreement to rootMichael D Kinney1-218/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=629 Move Contributions.txt that contains the TianoCore Contribution Agreement 1.0 to the root of the edk2 repository and remove the duplicate Contributions.txt files from all packages. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-12-02QuarkSocPkg: Remove use of IntelFrameworkModulePkg legacy libsLeif Lindholm1-1/+1
LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied from IntelFrameworkModulePkg to MdeModulePkg, but the originals were kept for compatibility. Since the libraries are identical, move iQuarkSocPkg to use the MdeModulePkg versions instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-10-27QuarkSocPkg/Library: Remove extra UefiBaseType.h includesMichael Kinney1-2/+1
Based on Laszlo Ersek work to add ASSERT_RETURN_ERORR(): https://lists.01.org/pipermail/edk2-devel/2016-October/003132.html Laszlo also discovered libraries of type BASE that include UefiBaseType.h that should not include that file: https://lists.01.org/pipermail/edk2-devel/2016-October/003308.html This change removes the extra #include of <Uefi/UefiBaseType.h> from QNCSmmLib.c. Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-10-25QuarkSocPkg: Fix typos in commentsGary Lin9-19/+19
- paramter -> parameter - reseting -> resetting - stoping -> stopping - hanlder -> handler - boundry -> boundary - tempory -> temporary Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2016-10-07QuarkSocPkg/QncSmmDispatcher: Fix use after free issueMichael Kinney2-5/+38
Update Quark North Cluster SMM dispatcher logic to handle case where an SMI handler unregisters itself. https://bugzilla.tianocore.org/show_bug.cgi?id=51 This issue was reproduced using the unit test at: https://github.com/mdkinney/edk2/tree/Bug51/Reproduce An ASSERT() is generated the 4th time the periodic SMI handler is triggered when the periodic SMI handler unregisters itself. After applying this patch, the DEBUG() message from the periodic SMI handler in this unit test is generated 4 times, the periodic SMI handler is unregistered, and the UEFI Shell works as expected. Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Kelly Steele <kelly.steele@intel.com>
2016-10-07QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlersMichael Kinney3-10/+11
https://bugzilla.tianocore.org/show_bug.cgi?id=136 1) Add CallbackContext field to the DATABASE_RECORD structure that is set to the RegisterContent value passed to QNCSmmCoreRegister(). This is the content that must be passed to the SMI handler when its source is triggered. 2) Update usage of ChildContext field in the DATABASE_RECOD to use CopyMem() instead of structure assignments to avoid compiler use of memcpy() intrinsics This issue was reproduced using the unit test at: https://github.com/mdkinney/edk2/tree/Bug51/Reproduce An ASSERT() is generated the first time the periodic SMI handler is triggered. After applying this patch, the DEBUG() messages from the periodic SMI handler in this unit test are generated. Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Kelly Steele <kelly.steele@intel.com>
2016-09-05QuarkSocPkg/QuarkSocPkg.dsc: Declare PciSegmentLibStar Zeng1-0/+1
PiDxeS3BootScriptLib will be updated to consume PciSegmentLib instead of PciLib to support multiple PCI segment. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Amy Chan <amy.chan@intel.com> Cc: Kelly Steele <kelly.steele@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: Michael Kinney <michael.d.kinney@intel.com>
2016-09-02QuarkSocPkg/ResetSystemLib: Implement ResetPlatformSpecificRuiyu Ni1-1/+21
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com>
2016-05-19QuarkSocPkg/SmmCpuFeaturesLib: Add SMRR PhysBase/PhysMask fields checkMichael Kinney2-2/+18
SMRR range size and alignment should follow the rules like MTRR: a. The minimum range size is 4 KBytes and the base address of the range must be on at least a 4-KByte boundary. b. For ranges greater than 4 KBytes, each range must be of length 2^n and its base address must be aligned on a 2^n boundary, where n is a value equal to or greater than 12. The base-address alignment value cannot be less than its length. Thus, it could meet "Address_Within_Range AND PhysMask = PhysBase AND PhysMask". Cc: Jeff Fan <jeff.fan@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: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
2016-05-13QuarkSocPkg/SDControllerDxe: Add EFIAPI to SetHighSpeedModeLee Leahy1-1/+2
Add the missing EFIAPI to fix the inconsistent routine declaration and implementation of a protocol service. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-04-13QuarkSocPkg: Add /Oi option to let MemoryInit pass build.Liming Gao1-0/+4
MemoryInit uses the intrinsic memset function. To keep it pass build in VS tool chain without source code change, /Oi option will be added. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-03-25QuarkSocPkg: Ohci/Pei: remove set but unused variablesLaszlo Ersek2-12/+0
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: Ohci/Dxe: remove set but unused variablesLaszlo Ersek2-13/+1
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: SDMediaDeviceDxe: remove set but unused variablesLaszlo Ersek3-7/+1
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: Spi/Common: remove set but unused variablesLaszlo Ersek1-23/+0
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: SmmControlPei: remove set but unused variablesLaszlo Ersek1-3/+1
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: SmmControlDxe: remove set but unused variablesLaszlo Ersek1-3/+1
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: QNCInit/Dxe: remove set but unused variablesLaszlo Ersek1-3/+0
This patch also eliminates a PCI config space access, but that should be fine. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: MemoryInit/Pei: remove set but unused variable TRFCLaszlo Ersek1-2/+1
The expression that was used to set it had no side effects. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: QNCSmmLib: remove set but unused variablesLaszlo Ersek2-4/+1
This patch also removes a PcdGet16() call, but that should be harmless. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: MtrrLib: remove set but unused variablesLaszlo Ersek1-2/+0
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25QuarkSocPkg: IntelQNCLib: remove set but unused variablesLaszlo Ersek1-12/+1
This patch also removes a few PCI config space accesses, but that shouldn't be a problem. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-01-07QuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURESMichael Kinney1-4/+4
QuarkSocPkg is only for IA32. Remove X64 from SUPPORTED_ARCCHITECTURES in DSC file. Cc: Kelly Steele <kelly.steele@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Kelly Steele <kelly.steele@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19615 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15QuarkSocPkg: Add new package for Quark SoC X1000Michael Kinney175-0/+54714
Changes for V4 ============== 1) Remove Unicode character from C source file 2) Move delete of QuarkSocPkg\QuarkNorthCluster\Binary\QuarkMicrocode from QuarkPlatformPkg commit to QuarkSocPkg commit Changes for V2 ============== 1) Sync with new APIs in SmmCpuFeaturesLib class 2) Use new generic PCI serial driver PciSioSerialDxe in MdeModulePkg 3) Remove PCI serial driver from QuarkSocPkg 4) Apply optimizations to MtrrLib from MtrrLib in UefiCpuPkg 5) Convert all UNI files to utf-8 6) Replace tabs with spaces and remove trailing spaces 7) Add License.txt Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19286 6f19259b-4bc3-4df7-8a09-765794883524