summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Library
AgeCommit message (Collapse)Author
2014-01-07MtrrDebugPrintAllMtrrs() should loop until the max physical address is reached. Jeff Fan
GetMemoryCacheTypeFromMtrrType () should return the default memory type instead of UC type for MTRR_CACHE_INVALID_TYPE. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15053 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-201. Only dump CPU Context and CpuDeadLoop () for CPU exception.Jeff Fan
2. mEnabledInterruptNum is total enabled interrupt number, InterruptType should less than mEnabledInterruptNum. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15012 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13Fix meta file issue.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Hesheng Chen <hesheng.chen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14978 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-11Correct INF file to make module pass ICC compiler.Liming Gao
Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14961 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06Fix comments format issue.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14934 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-30Add missing ASM_PFX for HookAfterStubHeaderEnd.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14922 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-29Fixed typo: HookAfterStubEnd should be HookAfterStubHeaderEnd. It will make ↵Jeff Fan
UINIXGCC IA32 build issue: Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14921 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-29UefiCpuPkg: Using the "movabsq" instruction to read global variable ↵Laszlo Ersek
mDoFarReturnFlag and mErrorCodeFlag to avoid page fault with big RAM sizes (> 2GB). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14920 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-26Cleanup unused ReportStatusCodeLib reference.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14898 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-221. Separated DxeSmmCpuExceptionHandlerLib.inf into 2 instance ↵Jeff Fan
DxeCpuExceptionHandlerLib.inf and SmmCpuExceptionHandlerLib.inf. 2. Updated CPU Exception Handler Library instance according to the new CPU Exception Handler Library class definitions. 3. Updated CPU Exception Handler Library instance to handle the vector attributes defined in PI 1.2.1. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hot Tian <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14885 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-161. Read 32bit CPU Init APIC ID from CPUID leaf B in XAPIC mode.Jeff Fan
2. Read CPU APIC ID from CPUID leaf B in case CPU Init APIC ID is larger 255 in XAPIC mode. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14674 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-27Removed the assumption on APIC timer initial Count is all 1s and updated it ↵Jeff Fan
to handle the long delay that timer initial count. 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@14604 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-05Fix build issue on DDK3790 tool chain.vanjeff
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14122 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-10Add missing parameter in functions header.vanjeff
signed-off-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13815 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27Save and disable CPU interrupt before programming MTRR settings, and restore ↵vanjeff
the CPU interrupt after programming MTRR setting. signed-off-by: Kinney, Michael D <michael.d.kinney@intel.com> reviewed-by: Bjorge, Erik C <erik.c.bjorge@intel.com> reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13749 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-231. Added SetLocalApicBaseAdress() and GetLocalApicBaseAddress() APIs in ↵vanjeff
Local APIC library. 2. Updated Local APIC library instances to get Local APIC base Address by invoking GetLocalApicBaseAddress() instead of by PCD PcdCpuLocalApicBaseAddress. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Kinney Michael D <michael.d.kinney@intel.com> Reviewed-by: Rui Sun <rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13668 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-05UefiCpuPkg BaseUefiCpuLib: Change the initialization value for x87 FPU ↵rsun3
Control Word for x64 arch from 0x27f to 0x37f per UEFI 2.3.1c spec. Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13506 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-31Remove CPU dead loop code from IA32 assembly codes.vanjeff
Signed-off-by: Fan Jeff <jeff.fan@intel.com> Reviewed-by: Sun Rui <rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13388 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-11UefiCpuPkg MtrrLib: For MtrrSetAllMtrrs(), do not set FE/E bits in ↵rsun3
IA32_MTRR_DEF_TYPE MSR after the MSR is restored. Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13182 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-19Fix doxgen format issue.vanjeff
Signed-off-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13112 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-15Import two CPU Exception Handler Library instances: ↵vanjeff
SecPeiCpuExceptionHandler.inf and DxeSmmCpuExceptionHandler.inf. Signed-off-by: vanjeff Reviewed-by: jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13098 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-25UefiCpuPkg MTRR Library: Remove a buggy check logic in ↵rsun3
MtrrSetMemoryAttribute() that may incorrectly RETURN_OUT_OF_RESOURCES in some cases. Signed-off-by: rsun3 Reviewed-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12780 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-281. Introduce the API MtrrGetDefaultMemoryType () in Mtrr Library.vanjeff
2. Invoke MtrrGetDefaultMemoryType() to get the default memory type instead of the hard code value in module. 3. Add go though for UC attributes. Signed-off-by: vanjeff Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12587 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27Update Base type SecPeiDxeTimerLibUefiCpu to support all module type.lgao4
Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12576 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-20UefiCpuPkg MTRR Library: enhance MTRR Library.rsun3
When it finds that a request range is covered by an existing MTRR with same cache type, the MTRR library set a flag and continues to check other MTRRs and invalidate any MTRR of the same request range with a higher-priority cache type. Signed-off-by: rsun3 Reviewed-by: gxing git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12388 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-13Enhance the MTRR lib to support the case where alignment of base address < ↵rsun3
length. Signed-off by: rsun3 Reviewed-by: hhuan13 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12330 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-02Add generic HPET Timer DXE Driver and support librariesmdkinney
Signed-off-by: mdkinney Reviewed-by: li-elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12259 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-25Add new API GetTimeInNanoSecond() to TimerLib to convert elapsed ticks to ↵xdu2
time in unit of nanoseconds. Signed-off-by: xdu2 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12206 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-11Remove extra {} inside DEBUG_CODE() macromdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11244 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-07Fix 32-bit build breakmdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11235 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-06Add DEBUG() macros for DEBUG_CACHE to MTRR Library show all changes memory ↵mdkinney
caches setting changes. If DEBUG_PROPERTY_DEBUG_CODE_ENABLED is also set in PcdDebugPropertyMask, then the entire set of MTRRs will be displayed on every memory cache setting change. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11231 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-29Lost a file in last check-in.rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11101 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-29Add a new Timer Library instance SecPeiDxeTimerLibUefiCpu into UefiCpuPkg. ↵rsun3
This library differs with the SecPeiDxeTimerLibCpu library in the MdePkg in that it uses the local APIC library so that it supports x2APIC mode. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11100 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-28Fix build break when doing 32-bit build with some certain C compiler option ↵rsun3
combinations. Use the library functions for shift operations in BaseLib for a 64-bit integer where the code is shared for 32-bit and 64-bit. Defining bitfields in structures with > 32 bits will cause these types of issues on IA32 builds. So the largest bitfield should be type UINT32 with a max size of :32. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10983 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-27Add DisableLvtInterrupts() for the Local APIC library class.rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10827 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-26Improve Local APIC library class. Add new library APIs: GetApicVersion(), ↵rsun3
SendFixedIpi(), SendFixedIpiAllExcludingSelf(), GetApicTimerState(). Remove GetApicTimerDivisor (), its functionality can be covered by GetApicTimerState(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10824 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-23Add Local APIC Library class defining APIs for common Local APIC operations. ↵rsun3
Add two Local APIC library instances, one is for xAPIC mode only, the other is for x2APIC capable processors which have xAPIC and x2APIC modes. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10814 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-10Add boundary check against variable MTRR count.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10787 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-13Code refinement.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10647 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10429 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-16Fixed GCC 4.4 build issues due to EFIAPI not being used when required.geekboy15a
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10380 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-10Add Checking for MTRR existence.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10223 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-04Add array index check to avoid potential buffer overflow.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10179 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-231. Correct File header to ## @filelgao4
2. Remove unnecessary .common] postfix on section. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10051 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-14Use atomic AsmDisableCache() and AsmDisableCache() functions instead of ↵mdkinney
AsmWriteCr0() and AsmWbinvd() calls git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9998 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-05Revert incompatible change:jyao1
1) No API change from old version. 2) Change MACRO: #define MTRR_NUMBER_OF_VARIABLE_MTRR 32 // the semantics are changed from NUMBER to MAX_NUMBER. #define FIRMWARE_VARIABLE_MTRR_NUMBER 6 // wrong and deprecated #define MTRR_LIB_IA32_VARIABLE_MTRR_END 0x20F // wrong and deprecated #define RESERVED_FIRMWARE_VARIABLE_MTRR_NUMBER 2 // add new one. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9941 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-05Original MTRR lib hardcode VARIABLE_MTRR as 8. But it is 7 in Core2 if SMRR ↵jyao1
enabled, and 10 in latest Corei7. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9935 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-26Clean up MtrrLib to remove unnecessary package dependencyqhuang8
Add it to the [Components] section of UefiCpuPkg for build validation git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9823 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-08Fixed incorrect syntax for immediate HEX value.geekboy15a
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9700 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-08Removed use of pre-initialized global data in this file as it was causing ↵geekboy15a
problems with UNIXGCC tool chain. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9699 6f19259b-4bc3-4df7-8a09-765794883524