Commit Graph

166 Commits

Author SHA1 Message Date
lgao4 c941b270ea TeImage Signature should be got from Te pointer, not Pe pointer
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1136 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-28 06:08:00 +00:00
klu2 aa0dc7b430 Fix a warning issue under CYGWIN_GCC building:
A function cannot be declared as returning a data object having a volatile or const type, but it can return a pointer to a volatile or const object.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1121 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-27 12:25:28 +00:00
ajfish 236877a6a7 Added back safety check for PE/COFF image walking. I think the safety check is broken in some places (Linux) but we need to investigate more.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1108 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-26 23:34:08 +00:00
ajfish 2ce311322c Removed cross references from PciCf8Lib and PciExpressLib class to PciLib class.
Added PeCoffLoaderGetMachineType to the PeCoffGetEntryPointLibrary Class. Document to be updated.

Added the PeCoffLoaderImageReadFromMemory() and PeCoffLoaderRelocateImageForRuntime () to the PcCoffLib. 

Updated EfiImage.h and removed EFI_IMAGE_OPTIONAL_HEADER and EFI_IMAGE_NT_HEADERS as they were replaced with checking the MachineType.

PeCoffLib – Added checks for MachineType so the PeCoff lib can load any PE32 or PE32+ image. The relocations are still limited to IA32, X64, IPF, and EBC. I also added a re-relocator function to remove PeLoader Code from Runtime Lib. Even though there is only one instance of the re-relocator I wanted to get all the PeCoff loader code together.

Replaced DEBUG_CODE() macro with DEBUG_CODE_START() and DEBUG_CODE_END() so you can debug through the DEBUG_CODE() macros. Also removed PE/COFF code and replaced with library usage.

I also updated the IO Instrinsic lib to use _ReadWriteBarrior() to help with sync problems

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1103 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-26 15:23:35 +00:00
bxing ebca816989 Added a 64-bit version of EnablePaging64() on X64. AsmEnablePaging64() is the transition code to switch the processor from 32-bit into 64-bit long mode and thus is typically linked with 32-bit images only. However, it's desired to link the transition code into a 64-bit image in some special cases. CPU driver is a good example among those.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1092 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-25 08:30:02 +00:00
bxing 452e6c77be Updated function headers according to latest MWG.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1090 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-25 07:37:25 +00:00
bxing ed384ef31c 1. Updated declaration of timer functions according to latest MWG.
2. Updated coding style.
3. Updated the algorithm used in delay functions to handle timer counter wrap-around.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1089 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-25 07:33:02 +00:00
qhuang8 c4898a017e Fix a bug in UefiDevicePathLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1084 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-24 10:15:33 +00:00
qhuang8 9a557fb6c7 Remove the instance of BaseSmbusLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1076 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-23 12:55:55 +00:00
qhuang8 1f33a17ff1 Adjust coding style for MemoryAllocationLib.
Add function header for an internal function of PciExpressLib
Fix a typo in one comment of UefiLib
Remove BaseSmbusLib

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1075 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-23 12:55:05 +00:00
bxing 3f566587ae 1. Updated function headers in all assembly files.
2. Split x86LowLevel.c into a bunch of C files to make images linked with BaseLib smaller.
3. Fixed a few minor bugs.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1066 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-21 08:47:38 +00:00
vanjeff 151c1ccdcd Modified comment for gDs
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1054 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-20 07:27:57 +00:00
vanjeff 9f73d38da4 added some comments in BaseLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1053 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-20 04:00:59 +00:00
vanjeff bda7fbcc2f 1.Added EFIAPI for some assembly functions declare
2.Modified some functions header 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1052 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-20 02:48:06 +00:00
vanjeff 1ea5ca46c7 1. added functions header for BaseUefiDecompressLi
2. added some internal functions header for BaseLib
3. added EFIAPI for some internal assembly files declare

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1050 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-19 17:37:07 +00:00
ajfish a537f1483c Fixed some naming issues and update to the EDK II name. I also fixed an issue with the UEFI library forcing UEFI.h to include Tinao protocols. I make the UEFI library a DXE library so it would get the correct includes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1048 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-19 12:24:11 +00:00
qwang12 2a870f5348 Add [in,out] in the @param for PCD header and c file.
Update GetNextToken and GetNextTokenSpaces APIs parameter sequence according to PCD spec.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1040 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-19 05:18:47 +00:00
klu2 4b9fc76f7b Fix track EDKT104: If a module use PCD, MSA of this module should use PcdLib libraryClass.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1034 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-17 14:31:03 +00:00
bxing bbe4ba8149 Modified coding style, removed unnecessary comments and "offset" key words.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1033 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-17 09:38:46 +00:00
qhuang8 3847c8f315 Add missing ASSERT()s in PeiPcdLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1002 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-14 07:48:36 +00:00
qhuang8 44cf7a02c1 Port thunk16 code from MSFT to GCC assembly.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@999 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-14 06:30:17 +00:00
jwang36 5e1c3eedcd Added license & copyright declaration
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@967 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 08:24:50 +00:00
bxing 3cc092acf2 Revised GetPowerOfTwo32() and GetPowerOfTwo64() to be more efficient.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@963 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 08:05:35 +00:00
qhuang8 f23c214dca Fix bug in .S files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@952 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 05:58:02 +00:00
jwang36 3fc9d866c4 Enforced case-sensitive on the file names;
Corrected file and/or path names in some msa files.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@949 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 05:21:14 +00:00
qhuang8 64ad76699c 1. Add Assert in SetJump.S
2. Rename internal function of ModU64x32.S to avoid collision.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@948 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 04:58:40 +00:00
qhuang8 d08b357f8a 1.Fix SetMem64.S to not use SSE3 instruction
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-13 04:19:34 +00:00
qhuang8 4f7f1f5fa8 BasePrintLib: Fix Buffer Overflow issue.
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-13 01:53:27 +00:00
vanjeff a42b182076 added function header
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@935 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 01:17:21 +00:00
qhuang8 871fdd38c5 Fix a typo BaseLib.msa and add the missing file in BaseSmbusLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@922 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-12 15:11:21 +00:00
qhuang8 1fe4ef1bd8 1. Updated some files’ description files in MdePkg, EdkModulePkg & EdkNt32Pkg.
2.	Update .msa files to add some missing files files in MdePkg 
3.	Add Help text to Mde Library related PCDs.
4.	Fix some bugs in CpuId.S and CpuIdEx.S.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@919 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-12 14:15:40 +00:00
qwang12 cf93f221c6 Remove some junk informatin.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@914 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-12 12:28:44 +00:00
yshang1 7fda265d2f git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@910 6f19259b-4bc3-4df7-8a09-765794883524 2006-07-12 11:15:11 +00:00
alfred 13091b658e git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@906 6f19259b-4bc3-4df7-8a09-765794883524 2006-07-12 10:34:39 +00:00
alfred abf537ea15 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@905 6f19259b-4bc3-4df7-8a09-765794883524 2006-07-12 10:24:36 +00:00
bxing db8f40e294 1. Added '#pragma pack' directive in BaseLib.h for the structure IA32_DESCRIPTOR
2. Updated SetMem64.asm's to remove any SSE3 instructions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@901 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-12 09:23:28 +00:00
qwang12 2de0141aab Add in Abstract and Description for a few MSA files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@897 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-12 08:16:09 +00:00
qhuang8 bd0cd44be5 sync GCC assembly files with MASM assembly files
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@878 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-11 10:25:13 +00:00
vanjeff 4748b24d77 1. Fix one bug on EBC for GetPowerOfTwo64.c
2. Fix one bug for GetPowerOfTwo32.c and GetPowerOfTwo64.c, when Operand is 1, 1 should be returned

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@873 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-11 07:48:43 +00:00
qouyang 53b8619385 Change UINAME to CName of GUID/PPI/Protocol in all Msa file and change tool to support it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@863 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-10 10:14:25 +00:00
qhuang8 5b1b9d8bf4 1. BaseSmbusLib: Make SmbusReadDataByte() & SmbusWriteBlock() function well by re-arranging register settings.
2. BaseMemoryLibMmx for X64: Make CopyMem() be reentrant by saving Mm0 to r10.
	3. DxeCorePerformanceLib: Fix some typo to save build error of that library instance.
	4. Remove the orphanage definition of gEfiPerformanceProtocolGuid


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@859 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-10 08:41:58 +00:00
bxing 003673f507 Fixed a syntax error in BasePciCf8Lib/PciLib.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@852 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-10 03:20:48 +00:00
bxing 9748aecca6 1. Fixed a logical error in PciReadBuffer() and PciWriteBuffer()
2. Fixed GetInterruptState() on IPF to return the state of interrupts correctly

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@850 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-10 02:56:56 +00:00
vanjeff 03e772c322 In AsciiStrncmp(), if length=0, should return 0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@840 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-08 15:21:04 +00:00
lgao4 15b06e58b0 Redefine SPEC and Release Version to 0x20000
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@826 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-07 14:37:11 +00:00
jwang36 44050d53af Obsoleted by new schema and new build tools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@821 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-07 09:28:33 +00:00
qhuang8 28c73f6ef7 PciLib:
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-06 10:37:49 +00:00
jwang36 df569f61e3 Fixed the GCC assembler issue. Now we can use full GCC tools to build our package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@795 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-06 10:31:48 +00:00
bxing a69c49fc11 1. Simplified PalCallStatic.s's by removing unnecessary condition testings.
2. Fixed a logical error in Synchronization.c which caused InterlockedIncrement() and InterlockedDecrement() to hang.
3. Replaced the pseudo-implementation of GetInterruptState() with a real version.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@793 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-06 07:46:22 +00:00
qwang12 1de04b4f83 Add in support for MaxSize and CurrentSize for PCD entry.
Change the behavior for PcdSET for Variable_Enabled Pcd entry. If a Variable does not exist, we will only save the value to a volatile space. We save it to variable ONLY when the variable exist. 

Fix a few bugs in Pcd Build tool when generated Pcd database for Pcd entry with Unicode String type.

Support PcdSet to return MaxSize if the input SizeOfBuffer is greater than the Max Size declared in FPD file.

Add SetValueWorker and GetValueWoker for each PcdSET and PcdGET function to reduce code size.

Sync function prototype definition for PCD_PPI_SET_POINTER, PCD_PPI_SET_EX_POINTER, PCD_PROTOCOL_SET_POINTER and PCD_PROTOCOL_SET_EX_POINTER with PCD arch spec 0.52.

Add ASSERTION in LibPcdSetPtr.





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@789 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-06 06:10:20 +00:00