summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePrintLib/PrintLib.c
AgeCommit message (Collapse)Author
2017-09-05Remove core packages since we can get them from edk2 repositoryGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2012-02-01Add Missing invocations to VA_END() for VA_START().rsun3
Signed-off-by: rsun3 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12979 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02Add 2 functions to UefiLib library class: CatSPrint and CatVSPrint.jcarsey
Implement these functions in the UefiLib instance. Add 2 functions to PrintLib library class: SPrintLengthAsciiFormat and SPrintLength. Implement these functions in the BasePrintLib instance and the DxePrintLib2Protocol instance. Signed-off-by: jcarsey Reviewed-by: jljusten Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12081 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-25Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter
did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10604 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-23Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10415 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-17Update function description to be consistent with code definition: HEX_RADIX ↵xdu2
=> RADIX_HEX. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9434 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-24Fix file headersmdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9189 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-19Update to make end-of-line consistent for all source files in MdePkg. There ↵qhuang8
are no other updates besides that change. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9141 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-18Update BasePrintLib to work correctly on compilers where VA_LIST is a structuremdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9109 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-30This checkin addresses the compatibility issue of passing arguments of type ↵mdkinney
VA_LIST between components. The type VA_LIST is mapped onto the compiler specific implementation of varargs. As a result, modules build with different compilers may not use the same VA_LIST structure. The solution to this issue is to define a new type called BASE_LIST that is a compiler independent method of passing varargs between modules. Add BASE_LIST type to Base.h Add BAS_ARG() macro to Base.h Add 4 functions to PrintLib.h that use BASE_LIST. Change ReportStatsuCodeExtractDebugInfo() from ReportStatusCodeLib.h to take a BASE_LIST argument instead of a VA_LIST argument Add the 4 new functions to BasePrintLib implementation that use BASE_LIST Update BaseReportStatusCodeLib implementation of ReportStatsuCodeExtractDebugInfo() to use a BASE_LIST argument instead of a VA_LIST argument git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8404 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-11Synchronize MdePkg h files to Library/Base* c files.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6984 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-26Function headers in .h and .c files synchronized with specjji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6731 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-21Function headers and comments have been checked with spec.jji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6653 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-19Update doxygen comment for VarArg list parameter. "..."'s description is added.qwang12
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6623 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-25Clean up code according to code review.vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5986 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17remove unnecessary comments introduced by tools from MdePkg. The regular ↵vanjeff
express is "//^p//[ ]Include[ ]common[ ]header[ ]file[ ]for[ ]this[ ]module[.]^p//" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5911 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-15Code scrub for the Debug library, PostCode library, Print library, and ↵lgao4
ExtractGuidedSection library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5478 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-25Fix a bug in print library "%a" should not print anything if the var ↵qhuang8
argument points to a null string. The default precision for string should be set to 0 according to MdeLib spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4634 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-01Fixed problem with sign extension in print lib. PrintXY could not print out ↵AJFISH
French characters like é. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3761 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-12Removed MdePkg usage of ModuleName: in file headersAJFISH
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3217 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29Removed CommonHeader.h generated file from the MdePkg. AJFISH
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2922 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-22Import some basic libraries instances for Mde Packages. vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2704 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-01Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break ↵lhauch
existing builds. Also updated the SPD and FPD files UiNames git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2616 6f19259b-4bc3-4df7-8a09-765794883524
2007-02-131. Add two interfaces in PeCoffGetEntryPointLib.hqhuang8
2. Fix the description of EfiTestChildHandle & EfiTestManagedDevice 3. Clean up BasePciLbPciCf8 & BasePciLibPciExpress to remove the dependency on DebugLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2387 6f19259b-4bc3-4df7-8a09-765794883524
2007-02-121) Added BIT0, BIT1, …, BIT63 to the Base Defines qwang12
2) Added MIN() and MAX() macros to the Base Macros 3) Added StrStr(), StrDecimalToUnitn(), StrDecimalToUint64(), StrHexToUintn(), StrHexToUintn64(), UnicodeToAscii(), AsciiStrStr(), AsciiStrDecimalToUnitn(), AsciiStrDecimalToUint64(), AsciiStrHexToUintn(), AsciiStrHexToUintn64(), and AsciiToUnicode() to the Base Library String Functions 4) Added the Base Library Checksum Functions which include CalculateSum8(), CaclculateCheckSum8(), CalculateSum16(), CalculateChecksum16(), CalculateSum32(), CalculateCheckSum32(), CalculateSum64(), CalculateChecksum64(). 5) Added MMIO Buffer functions to the I/O Library including MmioReadBuffer8(), MmioReadBuffer16(), MmioReadBuffer32(), MmioReadBuffer64(), MmioWriteBuffer8(), MmioWriteBuffer16(), MmioWriteBuffer32(), MmioWriteBuffer64(). 6) Changed the parameter name from SizeOfValue to SizeOfBuffer in PcdSetPtr(), PcdSetPtrEx(), PatchPcdSetPtr(), LibPcdSetPtr(), LibPcdSetPtrEx(), LibPatchPcdSetPtr() 7) Added RADIX_HEX flag to the Print Library to support the conversion of values to hexadecimal strings in UnicodeValueToString() and AsciiValueToString() 8) Added EfiGetCurrentTpl() UEFI Library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2363 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-19Add GLOBAL_REMOVE_IF_REFERENCED to the declaration of module globals in the ↵mdkinney
Print Library that were still present in the final image even through there were no references to those module globals. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1566 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-131.Fix SetMem64.S to not use SSE3 instructionqhuang8
2.Make sure NULL-terminator can be appended. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@945 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13BasePrintLib: Fix Buffer Overflow issue.qhuang8
BaseMemoryLib: Fix error in CopyMem.S for BaseMemoryLibMmx & BaseMemoryLibRepStr instance. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@938 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-06 PciLib:qhuang8
For PciRead/WriteBuffer(): A fix to handle boundary cases when Size is 0; DevicePathLib: For FileDevicePath(): Change to use AppendDevicePath () in place of AppendDevicePathNode(). PrintLib: For type %p, according to current MWG, it should ignore flag 0, +, space, l, & L Misc: Fix a bug in EBC interpreter for Ia32. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@796 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-05 DebugLib:qhuang8
Fix a bug in PeiDxeDebugLibReportStatusCode: it should use gReportStatusCodeDebugType so that report status code infrastructure can correctly extract debug info. Fix functional and coding style issues in the three instances in EdkModulePkg, namely: EdkDxeDebugLibReportStatusCode, EdkUefiDebugLibStderr, EdkUefiDebugLibConout. DevicePathLib: Sync with MWG 0.57 and add new interface of CreateDevicePathNode(). All the function headers have been updated. PeiServicesLib: Adjust coding style and fix a minor comment error. PciLib: Adjust assert() condition to sync with MWG 0.57 BaseMemoryLib: Adjust assert() for ScanMemXX (), ScanGuid() Rename UefiMemoryLib to DxeMemoryLib PrintLib: Change the return value of all print services to exclude the NULL-terminator. Misc: Slightly adjust the coding style in hob.c in PeiCore module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@757 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-281.BaseMemoryLibMmx: Add X64 Cpu Arch support.qhuang8
2.BasePrintLib: Fix some minor bugs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@651 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-26• BaseMemoryLib:qhuang8
Modify some Aassert()s conditions to sync with MWG 0.56d Modify some defects in function header. • PostCodeLib: Implement PeiDxePostCodeLibReportStatusCode. • Misc Rename BaseDebugLibReportStatusCode to PeiDxeDebugLibReportStatusCode Remove tabs in all .c and .h files in MdePkg. Rename PeiServicesReinstallPpi() to PeiServicesReInstallPpi() Adjust some minor coding style in PeCoffLoaderGetEntryPointerLib() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@626 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-221. UINTN & INTN issue for EBC architecture:qhuang8
The MAX_BIT of EBC will no longer be fixed to bit 63. It is defined as (1ULL << (sizeof (INTN) * 8 - 1)). Make EdkModulePkg & MdePkg EBC compiler clean: treat all EFI_STATUS error code as variable. 2. PrintLib Complete all missing ASSERT()s. Fix “\n” & “%\n” issue thanks to the clarification of MWG 0.56d. Adjust StatusString array to support EBC build. 3. BaseMemoryLib Adjust ASSERT () & function header of ComparaMem, SetMemXX, ScanMemXX to synchronize with MWG 0.56d. 4.SmbusLib Change Pec bit to bit 22 SmBusAddress to synchronize MWG 0.56d. Add ASSERT()s to check if length is illegal for SmBusBlockWrite() & SmBusProcessBlock() since it is 6 bit now. 5. PerformanceLib Rename “EdkDxePerformanceLib” & “EdkPeiPerformanceLib” to “DxePerformanceLib” & “PeiPerformanceLib” respectively. Synchronize the function header of GetPerformanceMeasurement() with MWG 0.56d. 6. BasePeCoffLoaderLib. Make PeCoffLoaderLoadImage () Assert() if ImageContext is NULL> Make PeCoffLoaderLoadImage () return RETURN_INVALID_PARAMETER if the ImageAddress in ImageContext is 0. Adjust some coding style. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@593 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-13 BaseMemoryLib (BaseMemoryLibRepStr):qhuang8
Fix a logic error in SetMem64 (); The correct stride should be 8 instead of 4. BasePrintLib: Fix Printf(“%\n”) passer error. Fix BufferSize = 0, 1 issue Fix some missing ASSERT ()s Move MAXIMUM_VALUE_CHARACTERS from PrintLibInternal.h to PrintLib.h ReportStatusCodeLib: Add CONST modifier to some interfaces Modify DebugLib: Replace some Unicode in comments. PeiServicesTablePointerLib Add ASSERT()s PciLib: Remove unnecessary ASSERT()s in PciRead/WriteBuffer() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@496 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-07BaseMemoryLib:qhuang8
Correct wrong ASSERT()s on SetMem16(), SetMem32(), SetMem64() HobLib: Add Missing ASSERT()s for BuildGuidHobData() since CopyMem() now allow zero source buffer with length > 0. BasePrintLib Add ASSERT()s to check NULL buffer and NULL format. PostCodeLib Add 3 instances of PostCodeLib and introduce new Pcd for post code property mask. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@438 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-031) Add support for %p to print pointersmdkinney
2) Fix %d,%x,%X to pull values off the vararg stack using (int) and (unsigned int) types to resolve compatibility issues with X64 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@408 6f19259b-4bc3-4df7-8a09-765794883524
2006-05-31add function headervanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@350 6f19259b-4bc3-4df7-8a09-765794883524
2006-05-25MemoryAllocationLib: For boundary case: “AllocationSize + ↵qhuang8
OverAllocationSize >= 4G” DxeMemoryAllocationLib: Change the behavior from returning NULL to ASSERT () PeiMemoryAllocationLib: Add ASSERT () I also add ASSERT () in Pei Service AllocatePool () to catch if allocation size > 64K DebugLib: Header file (DebugLib.h): Fix an issue in ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid). In contrast with LocateProtocol (), the first & second parameter type of HandleProtocol () is EFI_HANDLE & EFI_GUID respectively. UefiLib: For UnicodeStringDisplayLength (CONST CHAR8 *String), return 0 if String is NULL. BasePrintLib: Add missing “EFIAPI” to UnicodeValueToString() and AsciiValueToString() and move their definitions from PrintLibInternal.c to PrintLib.c. Fix the comments error(Maximum Length TIME”) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@275 6f19259b-4bc3-4df7-8a09-765794883524
2006-05-25git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@272 ↵yshang1
6f19259b-4bc3-4df7-8a09-765794883524
2006-05-24git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@263 ↵yshang1
6f19259b-4bc3-4df7-8a09-765794883524
2006-04-21Initial import.bbahnsen
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524