Commit Graph

88 Commits

Author SHA1 Message Date
zliu3 53f491d326 Added the StatusCode protocol installation for the IPF architecture; removed the CapsuleArchProtocol checking for the IPF architecture
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2036 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-29 13:29:14 +00:00
mdkinney 838c84ec7e 1) Fix buffer overflow in JUMP_BUFFER in the DXE Core StartImage()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2035 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-29 03:05:46 +00:00
lgao4 b32a39b328 Output DxeCore Entrypoint in DxeIpl module, and make dxecore module can correctly output >4G module entry point address.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2033 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-29 02:54:20 +00:00
qhuang8 3112de21e5 Fix a typo in yesterday's check in.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2032 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-29 02:40:28 +00:00
qhuang8 f40793becf Make DxeIpl "assembly-free" to avoid the undesired LongMode.obj code in image even if we do not choose to switch to long mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2031 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-29 01:49:26 +00:00
qhuang8 e7953f39bf Set default value of DxeIplBuildShareCodeHob to FALSE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2029 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 08:05:03 +00:00
qhuang8 9667d62eb3 Remove this file for no usage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2027 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 08:01:47 +00:00
qhuang8 657d3918fe • Set the default value of PcdDxeIplSwitchToLongMode to TRUE.
•	Make access to PcdDxeIplSwitchToLongMode to Ia32 specific code.
•	Introduce another feature flag named PcdDxeIplBuildShareCodeHobs to define whether to build hobs to DXE core to share code.
•	Remove the #progma bug 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2026 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 07:59:59 +00:00
mdkinney 6f4f08890d Add JumpBuffer field to the static structure
Align all Jump Context buffers according to the CPU specific alignment requirements


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2024 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 02:45:20 +00:00
mdkinney d57427a7f7 Add JumpBuffer field that records the allocated pool address that may be different that the Jump Context address
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2023 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 02:44:20 +00:00
mdkinney 62332e5da3 Align the top of the stack correctly when the PEI Core calls SwitchStack()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2022 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-28 02:42:44 +00:00
qhuang8 abb26634f2 Introduce PcdDxeIplSwitchToLongMode to DxeIplPeim and remove DxeIplX64Peim.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2018 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-27 10:14:02 +00:00
klu2 f5103f2a21 The performance data for PEI phase should be collected from pre-memory, so move PERF_START macro to correct place.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2015 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-27 02:20:22 +00:00
lgao4 25549f698d Use global variable gInMemory in place of gInMemoryGuid ppi in DxeIplX64 module to point this module is shadowed or not for size reduction.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1987 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-21 03:01:52 +00:00
lgao4 b00c892423 In core\dxe\Dispatcher\Dispatcher.c uses CoreLoadImage with TRUE parameter of BootPolicy. But according to CoreLoadImage comments, BootPolicy is TRUE indicates that the request originates from the boot manager. Dispatcher driver is from memory, not from boot manager. So it should call CoreLoadImage with FALSE parameter of BootPolicy.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1981 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-20 03:59:14 +00:00
bbahnsen 3219f9742b Start to port the LongMode stuff to gnu asm.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1974 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-17 19:49:28 +00:00
bbahnsen 0cc82df1eb Fix gcc warnings -- please review affected files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1972 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-17 17:38:32 +00:00
lgao4 5ab95f33d1 Fix gcc build break for this module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1941 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-13 10:32:22 +00:00
lgao4 3e97cd8b87 Fix build break error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1937 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-13 07:16:11 +00:00
lgao4 3e025b6993 Add comments about why pre-allocate 32 bytes for load 64bit dxe core and Add code to make sure the stack is aligned to 16 bytes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1935 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-13 07:10:54 +00:00
lgao4 9723bdde15 Fix to pre-allocate 32bytes in stack to Load X64 Image.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1929 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-10 09:01:25 +00:00
mdkinney 4a50184986 Fix build break from CPU_STACK_ALIGNMENT update.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1927 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-09 22:18:41 +00:00
mdkinney 5a0c25f817 Use CPU_STACK_ALIGNMENT to align stack allocated for used in the DXE Phase.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1925 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-09 22:05:07 +00:00
mdkinney 395859376e Use CPU_STACK_ALIGNMENT to align stack allocated for used in the DXE Phase.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1924 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-09 22:04:33 +00:00
mikewuping c91eaa3d55 I fixed following bugs in EDKII.
1. In AsmFuncs.asm, DebugSupport, Vect2Desc() function will use hardcode CS to fill the IDT. 20h for Ia32.If the system CS is changed by CPU driver, this driver can not work. System maybe crash.
2. In EBC, RegisterExceptionCallback() can not restore the environment and I add some enhancements.
3. In Image.c, CoreLoadImageCommon never return EFI_SECURITY_VIOLATION when SecurityStatus == EFI_SECURITY_VIOLATION.
4. In Variable.c, 1. There're additional unnecessary loop. All blocks will be gone through even if all the data has been written. We should check the "CurrWriteSize" to see if there's no more data to write, and stop the for loop immediately. 2 "if.else." can be merged to save lines of code.
5. in FvbServices,c, Checksum calculation error.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1891 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-03 03:34:43 +00:00
cwu11 511710d68f 1. Add the fix for the following Bugs:
i)	BMM_FAKE_NV_DATA definition inconsistent in bm.vfr and BootMain.h
        (EdkNt32Pkg\Dxe\PlatformBdsDxe\Generic\BootMaint\BootMain.h)
ii)	Change some files’ EOL(end of line) format to DOS. Some file use even mixed style EOL.
   (EdkModulePkg\Universal\DevicePath\Dxe\DevicePath.c, DevicepathFromText.c, DevicePathUtilities.c;
EdkModulePkg\Universal\Disk\DiskIo\Dxe\diskIo.c; MdePkg\Library\UefiLib\UefiNotTiano.c)
iii)    Change some illegal characters in many files, the problem is mainly connected with people using Chinese Input method to input symbols such as ' " - ?, etc. Multiple files are influenced.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1890 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-03 02:47:43 +00:00
lgao4 d66974717c Enhance DxeIpl module to support EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE ffs type, and Enhance DxeIpl module decompression function to load the decompressed FvImage to the memory address aligned at FvImage required alignment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1875 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-31 08:22:25 +00:00
mikewuping d4f397c031 1. In event.c, a function's name is not spelled correctly, a typo.
2. In Graphics.c, Memory Leak in Graphics Library, ConvertBmpToUgaBlt().
3. In HobLib.c, PeiBuildHobModule and three other functions do not zero hob reserved data area according to HOB spec v0.9.
4. In statuscode.h, the number of definition of EFI_SW_PEIM_PC_CAPSULE_START is equal to EFI_SW_PEIM_PC_CAPSULE_LOAD.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1861 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-30 07:47:44 +00:00
lgao4 b5ace64c27 Fix one bugger in Image.c in PeiCore module to get the correct module name for debug output.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1852 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-30 03:26:07 +00:00
ajfish e47b06c339 MAX_POOL_SIZE was hardcoded to 0xFFFFFF00. MAX_POOL_SIZE was replaced with MAX_ADDRESS and POOL_OVERHEAD. MAX_POOL_SIZE is used to prevent a large allocation from passing since adding the POOL_OVERHAD to the allocation (done internally) could cause the size to wrap around and be small. This would cause a return value of success that was an error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1833 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-24 01:20:09 +00:00
mikewuping 3114b33496 I fixed following bugs.
1. In dependency.c, DXE Dispatcher doesn't check the dependency expression boundary correctly.
2. In page.c, a misspelling code in DXE core memory service code, duplicate code.
3. In gcd.c, according to DXE CIS 0-91 spec, When GcdAllocateType is EfiGcdAllocateMaxAddressSearchBottomUp or EfiGcdAllocateMaxAddressSearchTopDown, then the GCD memory space map is searched from the lowest address up to BaseAddress (or from BaseAddress down to the lowest address) looking for unallocated memory ranges of Length bytes. Here, BaseAddress itself is inclusive, that is, any range in [0, BaseAddress] is allowable. But current code BaseAddress to be exclusive.
4. In Ebcinit.c, EbcDebugRegisterPeriodicCallback() not check whether it is already registered.
5. In Ebcinit.c, EbcDebugRegisterExceptionCallback() not check whether it is already registered.
6. In Ebcinit.c, EbcDebugSignalException() does not assign value to EbcContext.ControlFlags.
7. In Ebcinit.c, EBC: StatusCodeValue should use EFI_SOFTWARE_EBC_EXCEPTION.
8. In Ebcinit.c, EbcDebugRegisterExceptionCallback() does not check ExceptionType
9. In ElTorito.c, BlockIo and DiskIo failed in SCT when there is CD in CD-ROM.
10. In Mbr.c, MBR code can't handle some situations. That is when there are 3 partitions in HD, if delete the first partition, it will not be able to recognize the other two partitions, and if delete the second partition, it will not be able to recognize the third partition. 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1749 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-16 02:48:19 +00:00
klu2 2ea767cc94 Set Hob type for FvMainCompactFv to EFI_HOB_TYPE_UNUSED after decompressed. The can improve the performance of Dxe dispatcher.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1706 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-10 09:59:34 +00:00
klu2 217f1d11c3 Add pair of performance macro function to measure the whole PEI phase's performance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1704 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-10 07:30:40 +00:00
klu2 b1288fcac3 Add PERF_START function for collecting performance data for DXE_OK tag.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1688 6f19259b-4bc3-4df7-8a09-765794883524
2006-10-08 08:15:12 +00:00
lgao4 542834ce80 Remove the duplicated Copy Right in msa header.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1634 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-27 09:26:40 +00:00
qhuang8 e4e7fed9be Optimize the algorithm of creating page table to enhance boot performance and save code size.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1628 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-26 07:22:33 +00:00
mdkinney e29d70965d Add PCD Feature Flags to control which decompression method(s) are included in the DXE IPL. The choices are any combination of EFI, Tiano, and Custom decompression.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1569 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-19 19:10:41 +00:00
mdkinney f47629a482 Remove IDT
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1568 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-19 19:08:01 +00:00
lgao4 62f8431554 changed EdkModulePkg GUID from the original B6EC423C-21D2-490D-85C6-DD5864EAA674 to new 68169ab0-d41b-4009-9060-292c253ac43d to avoid its conflict with gPeiBaseMemoryTestPpiGuid and change all msa and fpd file in EdkII, which depends on EdkModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1551 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-18 11:31:20 +00:00
lgao4 fc198a79e0 Move ConPlatform module from EdkNT32 package to EdkModulePkg, and remove EdkPeCoffLoaderX64Lib from DxeIplX64 module because EdkPeCoffLoaderLib based on new BasePeCoffLib can support 32bit and 64bit PE iamge both.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1523 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-13 05:02:30 +00:00
lgao4 7c9e5810d0 Fix PeiLoadImage() for compressed peim to print the correct image address and entrypoint.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1467 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-05 11:28:57 +00:00
lgao4 2be2804b25 Fix EdkII tracker 219, change incorrect print level in line 200 and line 453 from EFI_D_INFO to EFI_D_ERROR
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1443 6f19259b-4bc3-4df7-8a09-765794883524
2006-09-05 02:07:18 +00:00
lgao4 f78797d5b7 Fix Edk Tracker 206.
When recovery media is not found, CpuDeadLoop() is used in place of ASSERT() to assure dxeipl always enters into dead loop even if PcdDebug is turn off.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1360 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-23 06:39:00 +00:00
lgao4 a61513d6f9 Fix one bug in PeiMain to make it output correct ImageStartAddress. And in DxeIplX64Peim/DxeLoadX64.c, install EndOfPeiSignalPpi can delay only if it enters into dxecore.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1348 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-22 06:53:46 +00:00
bxing eeb1cd5af3 1. Added Non-existing.c in BaseLib to assert no invocations of SwitchStack() on IPF.
2. Added SwitchIplStacks() function to DxeIplPeim to encapsulate arch details on stack switching.
3. Added PeiSwitchStacks() function to PeiMain to encapsulate arch details on stack switching.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1328 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-21 02:53:29 +00:00
qhuang8 5823a8e9bd Remove dead code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1303 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-17 05:25:16 +00:00
klu2 5b18234d98 Add temporary fix for PeLoader
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1113 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-27 05:07:48 +00:00
ajfish ec412251c4 Reverted back to Old style not using the library and fixed the code to do PE32 and PE32+.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1109 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-26 23:35:16 +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
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