Commit Graph

161 Commits

Author SHA1 Message Date
qhuang8 20bcdbcb69 Add assertion to ensure pointer dereference has been checked against NULL pointer.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7528 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-16 02:07:32 +00:00
gikidy 055f28d0fb Meta-data reviewed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7523 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-13 08:38:34 +00:00
eric_tian 525aded947 add assert logic to avoid Klocwork fake report
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7512 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-12 06:39:01 +00:00
eric_tian fbbb42115c clean K8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7492 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-10 09:56:23 +00:00
eric_tian 311a71b299 Cleanup K8 warning.
We need judge return status of CoreGetMemorySpaceMap() to avoid the generation of NULL pointer of MemorySpaceMap.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7448 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-06 03:58:04 +00:00
lgao4 657abcff30 Enhance DxeCore to handle the all block sized allowed by the PI Specification and remove the assumption that the FV block size is always larger than the size of an FV Header.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7426 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-04 03:37:14 +00:00
eric_tian 57dfc48f93 enhance the condition branch to handle Unix style file path. and avoid array overflow
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7394 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-02 08:01:35 +00:00
eric_tian 29dd3b04b0 Fix Klocwork warning. We should directly return EFI_INVALID_PARAMETER when BufferSize is NULL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7323 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-21 04:56:24 +00:00
qhuang8 b364eeb012 Apply code to avoid security warnings.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7279 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-15 03:00:00 +00:00
lgao4 f497011482 Correct /FAcs option to /FAsc
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7191 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-06 05:09:27 +00:00
jji4 7df7393feb check the usage of %d,%x,%ld,%lx and so on in debug print statement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7080 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-18 08:48:36 +00:00
qhuang8 f3f2e05db8 Clean up to update the reference of the these macros:
EFI_SIGNATURE_16 -> SIGNATURE_16
  EFI_SIGNATURE_32 -> SIGNATURE_32
  EFI_SIGNATURE_64 -> SIGNATURE_64
  EFI_FIELD_OFFSET -> OFFSET_OF
  EFI_MAX_BIT      -> MAX_BIT
  EFI_MAX_ADDRESS  -> MAX_ADDRESS
These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7056 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-16 15:34:21 +00:00
gikidy d7db090280 Fix some typo.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7008 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-12 06:04:02 +00:00
jji4 6f3156155b INF head modified
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7002 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-12 01:27:36 +00:00
mdkinney 50d7ebad92 Change _CR() to BASE_CR() to follow naming convention
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6888 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-06 01:23:24 +00:00
mdkinney 4e2dd553a6 Simplify call to FUNCTION_ENTRY_POINT() based on updates to that macro
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6884 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-05 23:26:01 +00:00
gikidy cfc8865f17 Remove some useless EDK_RELEASE_VERSION, EFI_SPECIFICATION_VERSION ,and review VALID_ARCHITECTURES in inf files with DSC file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6818 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-03 09:08:05 +00:00
jljusten d9b834afbf Move call to CoreDisplayDiscoveredNotDispatched to be before the
ASSERT_EFI_ERROR (CoreAllEfiServicesAvailable ());
statement, since this ASSERT can force the system to hang.  Since
drivers not loading may be the reason that not all EFI services are
available, it is helpful to display the non-dispatched driver list
before using the ASSERT.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6687 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-24 00:19:49 +00:00
jljusten 9490351076 Add useful DEBUG message for determining the when drivers are
being loaded and dispatched.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6686 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-24 00:14:27 +00:00
mdkinney 7b3381a232 Clean up
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6676 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-22 00:51:51 +00:00
klu2 1232b21473 1, Add <Library/DevicePathLib.h> for all source that use device path utility macros
2, Add DevicePathLib library class to module's INF that use device path utility macros

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6456 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-11 15:42:40 +00:00
klu2 0ddec2cfde Remove over specific Guid
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6384 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-05 02:25:26 +00:00
qhuang8 da06ac1c70 Add missing TimerLib class since DxeMain directly use TimerLib API.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6345 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-31 04:53:07 +00:00
mdkinney 7cff25d649 Measure time spent in Driver Binding Supported() calls
Update time measurement of StartImage() calls to properly record the handle of the started Image


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6292 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-30 04:03:59 +00:00
eric_tian e34ecc8a1e Remove unnessary UEFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION in INF file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6281 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-29 03:17:21 +00:00
xli24 405b567555 Refine file header for INF files of DXE and PEI core modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6276 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 13:16:21 +00:00
vanjeff 078bee4ebf clean up EBC in inf files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6267 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-28 07:17:17 +00:00
qwang12 44cfd8a827 Move global variable to the top of C file for consistent coding style.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6255 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-27 11:40:49 +00:00
qwang12 0e549d5be5 Make use of correct format String:
1) UINT64 should use %lx
2) POINTER type should use %p
3) EFI_STATUS should use %r


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6253 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-27 10:13:00 +00:00
vanjeff 43025b293f ECC Clean up.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6205 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-24 02:55:01 +00:00
qhuang8 6e53646837 Fix several coding style violations
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6163 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-21 03:11:47 +00:00
klu2 e97835ba3f Change PeiMain/DxeMain's base name to PeiCore/DxeCore.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6073 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-05 13:32:39 +00:00
qhuang8 2f2a277df4 1. Set the EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED bit on insertion/deletion of entries in DebugImageInfo Table.
2. Change field EFI_DEBUG_IMAGE_INFO_TABLE_HEADER.TableSize to be the number of valid entries. Apply another global variable mMaxTableEntries to track the maximum of the allocated entires.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6051 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-27 08:02:57 +00:00
eric_tian dc8d93ca0c add detail comments on the complicated code segment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5954 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-23 14:49:45 +00:00
eric_tian ec90508b3d move header files in MdeModulePkg\Core\Dxe except DxeMain.h into their corresponding sub-module directories. It is used to provide good modularity.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5949 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-23 07:35:34 +00:00
lgao4 1046284db9 Don't align image address for TeImage, because TeImage section alignment is undefined.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5948 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-23 07:16:46 +00:00
qwang12 4792a1a65b Rollback change done in 5919: "Remove the status code EFI_ALREADY_STARTED to avoid confusion since it is not a possible return status from LoadFile() interface." It is accidentally overwritten in last check-in.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5925 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-18 09:03:36 +00:00
qwang12 61ad8a41e7 Remove the GrowBuffer function. Just use the simple way to get the buffer size and then read the buffer. This change improve the readability and save 0x60 byte of data for release build according to MAP file generated for X64 arch.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5924 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-18 08:42:11 +00:00
qhuang8 d9177625f6 Adjust the function layout to remove the prototype of internal functions to reduce sync efforts.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5921 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 14:20:29 +00:00
qhuang8 e676c4d0c6 Apply HighBitSet() in MDE baseLib to retire the internal function CoreHighestSetBit().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5920 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:35:14 +00:00
qhuang8 2ce854f515 Remove the status code EFI_ALREADY_STARTED to avoid confusion since it is not a possible return status from LoadFile() interface.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5919 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:34:18 +00:00
qhuang8 f94b9be34f Adjust the function layout of Timer.c to remove the prototype to reduce sync efforts.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5918 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:32:52 +00:00
qhuang8 3f1435782f Refine code to remove the last entry of mArchProtocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5917 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:31:43 +00:00
qhuang8 57b4ecb94b Fix several code review minor comments:
1. Line 79:Use the pre-initialized global variable mPoolHeadList = INITIALIZE_LIST_HEAD_VARIABLE (mPoolHeadList) to remove the statement in line 102
2. Line 337: The debug print statement: “Addr = %x” should change to “Addr = %p” since the expected Buffer is VOID *; How about “(len %x) %,d” ? The Size & Pool->Used belong to type UINTN? Cast it to UINT64 and use %lx 
3.Line 413, 418, 425, 477: Use “Buffer != NULL” instead of “NULL != Buffer”  
4. Line 451: The debug print statement: “FreePool = %x” should change to FreePool = %p” since Head->Data is pointer; How about “(len %x) %,d” ? The Head->Size& Pool->Used belong to type UINTN? Cast it to UINT64 and use %lx 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5916 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:29:44 +00:00
qhuang8 d45fd26026 Fix several code review minor comments:
1.Line 1520, 1525, 1530:Use goto to save Release Lock
2.Line 224: Do not use DEBUG_ERROR, since it is not an error case
3.Scrub the DEBUG () print statement to add DEBUG_PAGE
4.Line 20: Typo of "help cooalese"


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5915 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 13:28:05 +00:00
qwang12 a70c0fd846 Add VA_END to end the VA_START.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5907 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 02:30:24 +00:00
qwang12 46fee0d7b6 Remove the unnecessary spin_lock protection around CoreUnloadImage. There is almost zero possibility for this reentrancy issue here. With this change, we also keep EDK 2 and EDK core's CoreUnloadImage consistent with each other.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5906 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-17 02:20:24 +00:00
eric_tian 11074aabe1 CoreHandleProtocol function description should be corrected.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5903 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-16 08:02:57 +00:00
eric_tian 1947c70c3e Merge the global data in ExecData.c to Event.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5901 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-16 07:53:15 +00:00
eric_tian c18f12d375 Comments for CoreInitializeMemoryServices should be updated
Comments for CoreInitializeGcdServices should be updated.
Comments for CoreInitializeEventServices should be updated.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5899 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-16 07:35:17 +00:00