summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg/Library
Commit message (Collapse)AuthorAgeFilesLines
* PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLibKun Qin2021-02-016-78/+214
| | | | | | | | | | | | This change added a new instance of AcpiTimerLib for StandaloneMm core and drivers. It centralizes the common routines into shared files and abstract the library constructor into corresponding files to accommodate each constructor function prototypes. Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Kun Qin <kun.q@outlook.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* PcAtChipsetPkg: Fix few typosAntoine Coeur2020-02-102-4/+4
| | | | | | | | | | | Correctly write 'serial', remove duplicated 'the'. Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-62-philmd@redhat.com>
* PcAtChipsetPkg: remove EnterS3WithImmediateWake () from ResetSystemLibArd Biesheuvel2020-01-101-17/+0
| | | | | | | | EnterS3WithImmediateWake () no longer has any callers, so remove it from ResetSystemLib. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ray Ni <ray.ni@intel.com>
* PcAtChipsetPkg: Fix spelling errorsSean Brogan2019-10-222-5/+5
| | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2263 Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* PcAtChipsetPkg/ResetSystemLib: Add new API ResetSystemZhichao Gao2019-04-281-1/+47
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add a new API ResetSystem to this ResetSystemLib instance. It only adds the basic functions from ResetSystemRuntimeDxe. Lacking of this interface may cause link error, if some drivers use this new API and link to this library instance. Notes: This library API only provide a basic function of reset. Full function should use the instance in the MdeModulePkg and make sure the depex driver is dispatched. Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* PcAtChipsetPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0919-133/+19
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* PcAtChipsetPkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* PcAtChipsetPkg: Clean up source filesLiming Gao2018-06-2811-51/+51
| | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* PcAtChipsetPkg PeiAcpiTimerLib: Add the missing DebugLib header fileLiming Gao2018-02-071-0/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* PcAtChipsetPkg: Add PeiAcpiTimerLib to save Frequency in HOBLiming Gao2018-02-066-7/+209
| | | | | | | | | | | | | | | In V2: 1) Update PeiAcpiTimerLib base name to PeiAcpiTimerLib 2) Update PeiAcpiTimerLib to add the missing constructor to enable ACPI IO space 3) Update DxeAcpiTimerLib to cache frequency in constructor. PeiAcpiTimerLib caches PerformanceCounterFrequency in HOB, then Pei and Dxe AcpiTimerLib can share the same PerformanceCounterFrequency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* PcAtChipsetPkg/SerialIoLib: Remove negative value shiftMichael Kinney2017-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=553 Remove left shift of negative values that always evaluate to 0 to address build errors from the llvm/clang compiler used in the XCODE5 tool chain. Clang rightfully complains about left-shifting ~DLAB. DLAB is #defined as 0x01 (an "int"), hence ~DLAB has value (-2) on all edk2 platforms. Left-shifting a negative int is undefined behavior. Rather than replacing ~DLAB with ~(UINT32)DLAB, realize that the nonzero bits of (~(UINT32)DLAB << 7) would all be truncated away in the final conversion to UINT8 anyway. So just remove (~DLAB << 7). Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* PcAtChipsetPkg: Refine casting expression result to bigger sizeHao Wu2017-03-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases that the operands of an expression are all with rank less than UINT64/INT64 and the result of the expression is explicitly cast to UINT64/INT64 to fit the target size. An example will be: UINT32 a,b; // a and b can be any unsigned int type with rank less than UINT64, like // UINT8, UINT16, etc. UINT64 c; c = (UINT64) (a + b); Some static code checkers may warn that the expression result might overflow within the rank of "int" (integer promotions) and the result is then cast to a bigger size. The commit refines codes by the following rules: 1). When the expression is possible to overflow the range of unsigned int/ int: c = (UINT64)a + b; 2). When the expression will not overflow within the rank of "int", remove the explicit type casts: c = a + b; 3). When the expression will be cast to pointer of possible greater size: UINT32 a,b; VOID *c; c = (VOID *)(UINTN)(a + b); --> c = (VOID *)((UINTN)a + b); 4). When one side of a comparison expression contains only operands with rank less than UINT32: UINT8 a; UINT16 b; UINTN c; if ((UINTN)(a + b) > c) {...} --> if (((UINT32)a + b) > c) {...} For rule 4), if we remove the 'UINTN' type cast like: if (a + b > c) {...} The VS compiler will complain with warning C4018 (signed/unsigned mismatch, level 3 warning) due to promoting 'a + b' to type 'int'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* PcAtChipsetPkg: Fix typing errorsThomas Huth2017-01-201-1/+1
| | | | | | | | | Correct the reported by the codespell utility in some files of PcAtChipsetPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* PcAtChipsetPkg AcpiTimerLib: Clear bits [31:24] after reading by IoRead32()Star Zeng2016-10-113-9/+15
| | | | | | | | | | | | | | | Clear bits [31:24] after reading ACPI timer count by IoRead32(), and also add comments "Note: The implementation uses the lower 24-bits of the ACPI timer and is compatible with both 24-bit and 32-bit ACPI timers." in INF. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* PcAtChipsetPkg/ResetSystemLib: Implement ResetPlatformSpecificRuiyu Ni2016-09-021-0/+21
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Cc: Amy Chan <amy.chan@intel.com>
* PcAtChipsetPkg AcpiTimerLib: Wait 363 ACPI timer counts to get TSC FreqStar Zeng2016-08-183-27/+33
| | | | | | | | | | | | | | | | | | Compute the number of ticks to wait to measure TSC frequency. Instead of (ACPI_TIMER_FREQUENCY / 10000) = 357 and 357 * 10000 = 3570000, use 363 * 9861 = 3579543 Hz which is within 2 Hz of ACPI_TIMER_FREQUENCY. 363 counts is a calibration time of 101.4 uS. The idea comes from Michael and Paolo. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Paul A Lohr <paul.a.lohr@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* PcAtChipsetPkg AcpiTimerLib: Get more accurate TSC FrequencyStar Zeng2016-08-123-21/+99
| | | | | | | | | | | | | | Minimize the code overhead between the two TSC reads by adding new internal API to calculate TSC Frequency instead of reusing MicroSecondDelay (). Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Paul A Lohr <paul.a.lohr@intel.com> 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: Michael D Kinney <michael.d.kinney@intel.com>
* PcAtChipsetPkg: Update ResetSystemLib with PCDsLiming Gao2016-06-282-4/+8
| | | | | | | | | Update ResetSystemLib with PCDs for Reset Control Register and Value instead of hard code 0x64 and 0xFE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
* PcAtChipsetPkg AcpiTimerLib: Fix a logic errorwang xiaofeng2016-05-151-1/+1
| | | | | | | | | | | | | | | | | if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister) & EnableMask) != EnableMask)) { The bracket place is not right, I think it should be if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister)) & EnableMask) != EnableMask) Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: wang xiaofeng <winggundum82@163.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* PcAtChipsetPkg SerialIoLib: Fix VS2010 build errorHao Wu2016-01-111-11/+3
| | | | | | | | | | | | | | When overriding compiler options '/GL' with '/GL-', VS2010 will report warning C4701 potentially uninitialized local variable for 'LcrParity' and 'LcrStop' in function SerialPortSetAttributes(). This commit fixes this build issue. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19629 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: Convert all .uni files to utf-8Jordan Justen2015-12-155-0/+0
| | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py PcAtChipsetPkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19260 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg SerialIoLib: Implement Get(Set)Control/SetAttributesStar Zeng2015-11-261-0/+276
| | | | | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@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: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18964 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg SerialIoLib: Fix typo in SerialPortWrite()Star Zeng2015-11-201-2/+2
| | | | | | | | | | | | | The "read" word in SerialPortWrite() header comment block should be "write". Cc: Michael D Kinney <michael.d.kinney@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: Michael D Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18909 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: Update BaseAcpiTimerLibLiming Gao2015-02-283-6/+8
| | | | | | | | | | Introduce new PcdAcpiIoPortBaseAddressMask to mask BITS ACPI IO Port Base Address. 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@16952 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: Convert non DOS format files to DOS format and rename the ↵Gao, Liming2014-09-037-6/+6
| | | | | | | | | | | | same module name. 1. Module UNI and Package UNI files are not DOS format. Convert them to DOS format. 2. BaseAcpiTimerLib and DxeAcpiTimerLib has the same module name. Update them to the different name, and add the module uni file with the updated module name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16046 6f19259b-4bc3-4df7-8a09-765794883524
* Minor format update: add missing space in copyright lineTian, Hot2014-09-021-1/+1
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tian, Hot <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16034 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: INF/DEC file updates to EDK II packagesQiu, Shumin2014-08-284-0/+0
| | | | | | | | | | | | | | | | | | 2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module. a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion. c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion. 3. Add Module Extra UNI file that provides the localized Name of a module. a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file. b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation. c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15943 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: INF/DEC file updates to EDK II packagesQiu, Shumin2014-08-283-7/+11
| | | | | | | | | | | | 1. Usage information in INF file comment blocks are either incomplete or incorrect. This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes. The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15942 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: new AcpiTimerLib libraries. Gao, Liming2014-08-146-0/+529
| | | | | | | | | | | Two library instances are added to support BASE type and DXE type. Those libraries provides basic timer support using the ACPI timer hardware. The performance counter features are provided by the processors time stamp counter. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15803 6f19259b-4bc3-4df7-8a09-765794883524
* Add generic HPET Timer DXE Driver and support librariesmdkinney2011-09-022-0/+196
| | | | | | | Signed-off-by: mdkinney Reviewed-by: li-elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12260 6f19259b-4bc3-4df7-8a09-765794883524
* RefRefine soma code to make code run safely.ydong102010-09-171-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10885 6f19259b-4bc3-4df7-8a09-765794883524
* Add ResetSystemLib instances for PCAT that only supports cold reset and a ↵mdkinney2010-08-032-0/+124
| | | | | | warm reset that is always converted to a cold reset. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10766 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-242-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10426 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up EFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION.klu22010-02-251-2/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10075 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Correct File header to ## @filelgao42010-02-231-4/+4
| | | | | | 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
* Cleanup and remove DuetPkg references. Allow library to be used withjljusten2009-02-232-18/+15
| | | | | | | any driver type (increased scope from DXE_DRIVER to BASE). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7621 6f19259b-4bc3-4df7-8a09-765794883524
* DuetSerialIoLib.inf => SerialIoLib.infjljusten2009-02-231-0/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7619 6f19259b-4bc3-4df7-8a09-765794883524
* DuetPkg/Library/DuetSerialIoLib => PcAtChipsetPkg/Library/SerialIoLibjljusten2009-02-232-0/+258
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7618 6f19259b-4bc3-4df7-8a09-765794883524