li-elvin [Tue, 23 Feb 2010 09:40:43 +0000 (09:40 +0000)]
Driver health entry in device manager page is not totally hidden, the original code just change string to empty string, if cursor is at empty string, there is no focus at all.
Dynamically create subtitle and action entry of driver health when driver health protocol is installed.
lgao4 [Mon, 22 Feb 2010 06:30:41 +0000 (06:30 +0000)]
1. Update GetStringWorker() of HiiDataBaseDxe to only search in other language and not update the StringSize to avoid GetString() buffer overflow.
2. Update SetupBrowser to correctly handle ordered list option.
niruiyu [Mon, 22 Feb 2010 06:05:11 +0000 (06:05 +0000)]
TPL of Pcd Dxe driver was changed to TPL_CALLBACK from TPL_NOTIFY to follow UEFI spec that caller of variable interface should run at TPL <= TPL_CALLBACK.
The change is to enable PcdsDynamicHii in Duet platform. Duet's variable driver should run at TPL <= TPL_CALLBACK so Pcd Dxe driver should run at TPL <= TPL_CALLBACK.
jgong5 [Mon, 22 Feb 2010 05:48:06 +0000 (05:48 +0000)]
Enhance memory copy logic for PEI core image read. The change uses CopyMem() library function for unshadowed version and uses inline implementation for a shadowed version. This reduces PE image reading time to 1/5 - 1/10 when code cache is disabled. The change also fixed a memory leak when allocating shadow space for image read function.
mdkinney [Sun, 21 Feb 2010 20:56:40 +0000 (20:56 +0000)]
Add [depex] on gEfiMpServiceProtocolGuid so the number of CPUs is known
Add [depex] on gEfiSmmCpuIo2Protocol so we know that the SMM CPU I/O 2 Protocol in the PI SMST is valid
mdkinney [Sun, 21 Feb 2010 20:46:36 +0000 (20:46 +0000)]
Fix build breaks
Update EfiAcpiResetSystem() to match function prototype for EFI_RESET_SYSTEM
Add CpuDeadLoop() in all paths, so EfiAcpiResetSystem() can never return to be compliant with UEFI Spec, even when ASSERT() statements are disabled.
Change DEBUG() messages from EFI_D_ERROR to DEBUG_INFO because they are not error messages.
Simplify implementation from 4 files down to 2 files.
Use IoAndTheOr16() and MmioAndTheOr16() instead if IoRead/Write16() and MmioRead/Write16()
andrewfish [Tue, 16 Feb 2010 23:45:42 +0000 (23:45 +0000)]
Fix bug in UncachedMemoryAllocationLib, Assembler, make DefaultExceptionHandler lib inc the PC past the faulting instruction to aid debug. Update LR in Exception hanlder, so return address can get updated properly.
mdkinney [Tue, 16 Feb 2010 20:59:57 +0000 (20:59 +0000)]
1) Fix build issues
2) Change ARCHITECTURAL_PROTOCOL_ENTRY name to EFI_CORE_PROTOCOL_NOTIFY_ENTRY so it can be used for both Architectural Protocols and optional protocols that the DXE Core may use. Also remove BOOLEAN ArchitecturalProtocol field, so it is back to its original form.
3) Put mArchProtocols[] back to its original form, but add a NULL entry at the end so the end of the table can be easily detected in loops
4) Add mOptionalProtocols[] that at this time only has the SMM Base 2 Protocol in it.
5) Add NULL entry to mMissingProtocols[] so the end of the table can be easily detected.
6) Update all loops on mArchProtocols[], mOptionalProtocols, and mMissingProtocols[] to remove Index(s) and simply looks for a NULL ProtocolGuid to find the end of the table.
7) Update protocol notify events to pass the associated EFI_CORE_PROTOCOL_NOTIFY_ENTRY * as the Context parameter. This simplifies GenericProtocolNotify() by completely eliminating the search loop.
andrewfish [Tue, 16 Feb 2010 02:52:15 +0000 (02:52 +0000)]
Fix crash in UnixPkg and BeagleBoard caused by gSmmBase2 getting added to the now incorectly named mARchProtocols list. CoreDispatchMissingArchProtocols() did to check to see if the element was an AP (not all are now). Also Missing entry was not bounds checked, it was assumed to be <= Index witch is no longer true. So in both UnixPkg and BeagleBoard the loop was blowing past the end and garbage data caused page faults. Also add m prefix to global.
andrewfish [Tue, 16 Feb 2010 01:03:16 +0000 (01:03 +0000)]
After the ASSERT adjust the PC so you skip the faulting instruction. Lets you walk out of the exception handler and keeprunning code. This way you can walk out of the call stack.
mdkinney [Sun, 14 Feb 2010 05:49:44 +0000 (05:49 +0000)]
1) Remove dependency on the UEFI Boot Services Table Library so the gBS, gST, and gImageHandle symbols will not be automatically linked into an SMM Driver that uses this library.
2) Remove redundant include of <PiDxe.h>
3) Clean up constructor to use InSmm() library function instead of duplicating logic.
mdkinney [Sun, 14 Feb 2010 05:47:00 +0000 (05:47 +0000)]
Remove constructor from this library. This library already has SMM CPU I/O 2 in its [Depex], so any module using this library will not be dispatched until the SMM CPU I/O 2 Protocol is installed into the SMM handle database and also copied into the SMM Services Table.
The worker functions in this library have also been updated to simply use the instance of the SMM CPU I/O 2 Protocol that is present in the SMM Services Table.
The dependency on the UEFI Boot Services Table Library has also been removed so the gBS, gST, and gImageHandle symbols will not be automatically linked into an SMM Driver that uses this library.
mdkinney [Sat, 13 Feb 2010 01:57:22 +0000 (01:57 +0000)]
Update DXE Core to be compatible with PI 1.2 SMM Drivers.
PI 1.2 SMM Drivers are allowed to call UEFI/DXE services and Protocols from the entry point of the PI 1.2 SMM Driver. These UEFI/DXE services and Protocols may directly or indirectly calls the UEFI Boot Services RaiseTPL() and RestoreTPL(). These UEFI Boot Services use the CPU Architectural Protocol to enable interrupts if the TPL level is below TPL_HIGH_LEVEL and enable interrupts of the TPL is at TPL_HIGH_LEVEL. Interrupts should be masked while executing SMM drivers, so if a direct or indirect call to the UEFI Boot Service RestoreTPL() would enable interrupts, then an interrupt could be incorrectly delivered in SMM context.
The solution is for the DXE Core to register for the PI 1.2 SMM Base2 Protocol. If that protocol is present in the platform, then the DXE Core can use the SMM Base 2 Protocol's InSmm() function to determine if the platform is currently executing in SMM content. If the current context is in SMM, then do not allow any requests to be forwarded to the CPU Architecture Protocol to enable interrupts.
andrewfish [Thu, 11 Feb 2010 19:57:56 +0000 (19:57 +0000)]
Add support for Seeking on FV, and update the device syntax to support specifying which section of the FV file you want to operate on, previously the only option was to operate on the Raw file.
li-elvin [Thu, 11 Feb 2010 06:27:18 +0000 (06:27 +0000)]
The fix is for EFI Linux capsule test case can not run.
It should use runtime library EfiSetVariable, gRT is not converted to virtual address which cause SetVariable failure in EFI Linux.
klu2 [Thu, 11 Feb 2010 05:49:48 +0000 (05:49 +0000)]
Fix the issue that unknown format FV in Fvhob is installed for FvInfoPpi more than one time. The fixing is search dispatched Fv database and cached unknown Fv information for all Fv in FvHob, if Fv has been identified by PeiCore, then no need install FvInfoPpi for it again.
mdkinney [Thu, 11 Feb 2010 03:55:26 +0000 (03:55 +0000)]
Do not set gBS to NULL when the ExitBootServices event notification for the UEFI Runtime Lib is executed.
There is no guarantee that the ExitBootServices notification function from this lib will be the last ExitBootServices notification function registered by a module that uses the UEFI Runtime lib. If additional ExitBootServices notification functions require the use of gBS, then setting to NULL will break those additional ExitBootServices notification functions.
mdkinney [Thu, 11 Feb 2010 03:51:17 +0000 (03:51 +0000)]
Pass the correct TokenNumber into a CallbackOnSet notification function. The value being passed in was off by 1.
This would not normally cause an issue because the correct notification function was being called. There is only an issue if the same notification function is being used for multiple tokens, and the notification function needs to use the TokenNumber parameter to determine which token setting caused the callback function to be called.
Update the logic so the CallbackOnSet notification functions are not called with the internal PCD database lock in the acquired state. This allows other PCD Get/Set operations to be performed from within a CallbackOnSet notification.
Update logic so the PCD database lock is not left in the acquired state when SetWorker() returns EFI_INVALID_PARAMETER.
mdkinney [Thu, 11 Feb 2010 03:47:40 +0000 (03:47 +0000)]
Pass the correct TokenNumber into a CallbackOnSet notification function. The value being passed in was off by 1.
This would not normally cause an issue because the correct notification function was being called. There is only an issue if the same notification function is being used for multiple tokens, and the notification function needs to use the TokenNumber parameter to determine which token setting caused the callback function to be called.
erictian [Thu, 11 Feb 2010 02:47:10 +0000 (02:47 +0000)]
1. free those inserted NsKeyNode resource when releasing SetKeyBoardLayout event.
2. cleanup HiiDataBaseDxe to directly use gEfiHiiKeyBoardLayoutGuid which is used as the guid of event group.
rsun3 [Wed, 10 Feb 2010 08:30:51 +0000 (08:30 +0000)]
Per Framework SMM CIS spec, SMM Base Protocol.Communicate() is availabe in runtime. In SmmBaseOnSmmBase2Thunk driver, implementation of Communicate() uses SMM Communication Protocol. The thunk driver caches a pointer to SMM Communication Protocol. This pointer needs to be converted on Virtual Address Change Event.
jchen20 [Wed, 10 Feb 2010 06:10:53 +0000 (06:10 +0000)]
revise the debug message to add 0x in front of the HEX number for consistency
replace FixedPcdGetXX with PcdGetXX to access PcdLoadModuleAtFixAddressEnable