Depex - Dependency Expresion.\r
SOR - Schedule On Request - Don't schedule if this bit is set.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
//\r
// List of file types supported by dispatcher\r
//\r
-static EFI_FV_FILETYPE mDxeFileTypes[] = { \r
+EFI_FV_FILETYPE mDxeFileTypes[] = { \r
EFI_FV_FILETYPE_DRIVER, \r
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER, \r
EFI_FV_FILETYPE_DXE_CORE,\r
@param InsertedDriverEntry The driver to insert on the ScheduledLink Queue\r
\r
**/\r
-STATIC\r
VOID\r
CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (\r
IN EFI_CORE_DRIVER_ENTRY *InsertedDriverEntry\r
@param Context Event Context, not used.\r
\r
**/\r
-STATIC\r
VOID\r
EFIAPI\r
CoreFwVolEventProtocolNotify (\r
);\r
\r
/**\r
- Convert FvHandle and DriverName into an EFI device path\r
+ Convert FvHandle and DriverName into an EFI device path.\r
\r
@param Fv Fv protocol, needed to read Depex info out of \r
FLASH. \r
@return Pointer to device path constructed from FvHandle and DriverName\r
\r
**/\r
-STATIC\r
EFI_DEVICE_PATH_PROTOCOL *\r
CoreFvToDevicePath (\r
IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,\r
time.\r
\r
**/\r
-STATIC \r
EFI_STATUS\r
CoreAddToDriverList (\r
- IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,\r
- IN EFI_HANDLE FvHandle,\r
- IN EFI_GUID *DriverName\r
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,\r
+ IN EFI_HANDLE FvHandle,\r
+ IN EFI_GUID *DriverName\r
);\r
\r
/**\r
@retval EFI_SUCCESS Function successfully returned.\r
\r
**/\r
-STATIC\r
EFI_STATUS \r
CoreProcessFvImageFile (\r
IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,\r
Enter critical section by gaining lock on mDispatcherLock.\r
\r
**/\r
-STATIC\r
VOID\r
CoreAcquireDispatcherLock (\r
VOID\r
Exit critical section by releasing lock on mDispatcherLock.\r
\r
**/\r
-STATIC\r
VOID\r
CoreReleaseDispatcherLock (\r
VOID\r
@retval Error DEPEX not found.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreGetDepexSectionAndPreProccess (\r
IN EFI_CORE_DRIVER_ENTRY *DriverEntry\r
not set. \r
\r
**/\r
-EFI_DXESERVICE\r
EFI_STATUS\r
EFIAPI\r
CoreSchedule (\r
\r
\r
/**\r
- Convert a driver from the Untrused back to the Scheduled state\r
+ Convert a driver from the Untrused back to the Scheduled state.\r
\r
@param FirmwareVolumeHandle The handle of the Firmware Volume that contains \r
the firmware file specified by DriverName. \r
@retval EFI_NOT_FOUND The file was not found in the untrusted state. \r
\r
**/\r
-EFI_DXESERVICE\r
EFI_STATUS\r
EFIAPI\r
CoreTrust (\r
will be called, and when the Bds() exits the Dispatcher will be called\r
again.\r
\r
- NONE\r
-\r
@retval EFI_ALREADY_STARTED The DXE Dispatcher is already running \r
@retval EFI_NOT_FOUND No DXE Drivers were dispatched \r
@retval EFI_SUCCESS One or more DXE Drivers were dispatched \r
\r
**/\r
-EFI_DXESERVICE\r
EFI_STATUS\r
EFIAPI\r
CoreDispatcher (\r
@param InsertedDriverEntry The driver to insert on the ScheduledLink Queue\r
\r
**/\r
-STATIC\r
VOID\r
CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (\r
IN EFI_CORE_DRIVER_ENTRY *InsertedDriverEntry\r
@param FvHandle The handle of a FV that's being tested \r
\r
@retval TRUE Fv protocol on FvHandle has been processed \r
- @retval FALSE Fv protocol on FvHandle has not yet been \r
- processed\r
+ @retval FALSE Fv protocol on FvHandle has not yet been processed\r
\r
**/\r
-STATIC\r
BOOLEAN\r
FvHasBeenProcessed (\r
IN EFI_HANDLE FvHandle\r
@param FvHandle The handle of a FV that has been processed\r
\r
**/\r
-STATIC\r
VOID\r
FvIsBeingProcesssed (\r
IN EFI_HANDLE FvHandle\r
@return Pointer to device path constructed from FvHandle and DriverName\r
\r
**/\r
-STATIC\r
EFI_DEVICE_PATH_PROTOCOL *\r
CoreFvToDevicePath (\r
IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,\r
\r
\r
\r
-\r
/**\r
Add an entry to the mDiscoveredList. Allocate memory to store the DriverEntry,\r
and initilize any state variables. Read the Depex from the FV and store it\r
ASSERT (DriverEntry != NULL);\r
\r
DriverEntry->Signature = EFI_CORE_DRIVER_ENTRY_SIGNATURE;\r
- CopyMem (&DriverEntry->FileName, DriverName, sizeof (EFI_GUID));\r
+ CopyGuid (&DriverEntry->FileName, DriverName);\r
DriverEntry->FvHandle = FvHandle;\r
DriverEntry->Fv = Fv;\r
DriverEntry->FvFileDevicePath = CoreFvToDevicePath (Fv, FvHandle, DriverName);\r
@retval FALSE Not found.\r
\r
**/\r
-STATIC\r
BOOLEAN\r
FvFoundInHobFv2 (\r
IN EFI_HANDLE FvHandle,\r
//\r
// Read the first (and only the first) firmware volume section\r
//\r
- SectionType = EFI_SECTION_FIRMWARE_VOLUME_IMAGE;\r
- FvHeader = NULL;\r
- FvAlignment = 0;\r
- Buffer = NULL;\r
- BufferSize = 0;\r
+ SectionType = EFI_SECTION_FIRMWARE_VOLUME_IMAGE;\r
+ FvHeader = NULL;\r
+ FvAlignment = 0;\r
+ Buffer = NULL;\r
+ BufferSize = 0;\r
AlignedBuffer = NULL;\r
Status = Fv->ReadSection (\r
- Fv, \r
- DriverName, \r
- SectionType, \r
- 0, \r
- &Buffer, \r
- &BufferSize,\r
- &AuthenticationStatus\r
- );\r
+ Fv, \r
+ DriverName, \r
+ SectionType, \r
+ 0, \r
+ &Buffer, \r
+ &BufferSize,\r
+ &AuthenticationStatus\r
+ );\r
if (!EFI_ERROR (Status)) {\r
//\r
// FvImage should be at its required alignment.\r
if (FvAlignment < 8) {\r
FvAlignment = 8;\r
}\r
+ //\r
+ // Allocate the aligned buffer for the FvImage.\r
+ //\r
AlignedBuffer = AllocateAlignedPages (EFI_SIZE_TO_PAGES (BufferSize), (UINTN) FvAlignment);\r
if (AlignedBuffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
@param Context Event Context, not used.\r
\r
**/\r
-STATIC\r
VOID\r
EFIAPI\r
CoreFwVolEventProtocolNotify (\r
while (TRUE) {\r
BufferSize = sizeof (EFI_HANDLE);\r
Status = CoreLocateHandle (\r
- ByRegisterNotify,\r
- NULL,\r
- mFwVolEventRegistration,\r
- &BufferSize,\r
- &FvHandle\r
- );\r
+ ByRegisterNotify,\r
+ NULL,\r
+ mFwVolEventRegistration,\r
+ &BufferSize,\r
+ &FvHandle\r
+ );\r
if (EFI_ERROR (Status)) {\r
//\r
// If no more notification events exit\r
//\r
FvIsBeingProcesssed (FvHandle);\r
\r
-\r
Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);\r
if (EFI_ERROR (Status)) {\r
//\r
// EFI_FV_FILETYPE_DXE_CORE is processed to produce a Loaded Image protocol for the core\r
// EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE is processed to create a Fvb\r
//\r
- for (Index = 0; Index < sizeof (mDxeFileTypes)/sizeof (EFI_FV_FILETYPE); Index++) {\r
+ for (Index = 0; Index < sizeof (mDxeFileTypes) / sizeof (EFI_FV_FILETYPE); Index++) {\r
//\r
// Initialize the search key\r
//\r
\r
/**\r
Initialize the dispatcher. Initialize the notification function that runs when\r
- a FV protocol is added to the system.\r
+ an FV2 protocol is added to the system.\r
\r
**/\r
VOID\r