summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe
diff options
context:
space:
mode:
authordavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-23 06:51:36 +0000
committerdavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-23 06:51:36 +0000
commit202c32790fb65187a3f5dfc546d611b5f3b1f10b (patch)
tree69360796d71ced87ca72b2ba6930dd3bd5d57a6f /MdeModulePkg/Core/Dxe
parentb7c5912af1b21abba963fe1a3904d80ecaa41505 (diff)
downloadedk2-platforms-202c32790fb65187a3f5dfc546d611b5f3b1f10b.tar.xz
PI 1.1 SMM Feature Check-in
1. Update DxeMain to support COMBINED_DXE_SMM driver dispatch. 2. Add ReportStatusCodeRouter SMM part. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r--MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c47
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.inf2
-rw-r--r--MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c6
3 files changed, 51 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
index 6a18fe909e..5fbb2d442d 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
@@ -26,7 +26,7 @@
Depex - Dependency Expresion.
SOR - Schedule On Request - Don't schedule if this bit is set.
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -78,6 +78,7 @@ VOID *mFwVolEventRegistration;
//
EFI_FV_FILETYPE mDxeFileTypes[] = {
EFI_FV_FILETYPE_DRIVER,
+ EFI_FV_FILETYPE_COMBINED_SMM_DXE,
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,
EFI_FV_FILETYPE_DXE_CORE,
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE
@@ -386,6 +387,23 @@ CoreTrust (
}
+/**
+ An empty function to pass error checking of CreateEventEx ().
+
+ @param Event Event whose notification function is being invoked.
+ @param Context Pointer to the notification function's context,
+ which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EmptyFuntion (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+ return;
+}
/**
This is the main Dispatcher for DXE and it exits when there are no more
@@ -412,6 +430,8 @@ CoreDispatcher (
LIST_ENTRY *Link;
EFI_CORE_DRIVER_ENTRY *DriverEntry;
BOOLEAN ReadyToRun;
+ EFI_EVENT DxeDispatchEvent;
+
if (gDispatcherRunning) {
//
@@ -422,6 +442,17 @@ CoreDispatcher (
gDispatcherRunning = TRUE;
+ Status = CoreCreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
+ EmptyFuntion,
+ NULL,
+ &gEfiEventDxeDispatchGuid,
+ &DxeDispatchEvent
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
ReturnStatus = EFI_NOT_FOUND;
do {
@@ -534,8 +565,22 @@ CoreDispatcher (
}
}
}
+
+ //
+ // Now DXE Dispatcher finished one round of dispatch, signal an event group
+ // so that SMM Dispatcher get chance to dispatch SMM Drivers which depend
+ // on UEFI protocols
+ //
+ if (!EFI_ERROR (ReturnStatus)) {
+ CoreSignalEvent (DxeDispatchEvent);
+ }
} while (ReadyToRun);
+ //
+ // Close DXE dispatch Event
+ //
+ CoreCloseEvent (DxeDispatchEvent);
+
gDispatcherRunning = FALSE;
return ReturnStatus;
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf
index 3c711400e3..d94e864b40 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.inf
+++ b/MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -102,6 +102,8 @@
gEfiHobListGuid ## CONSUMES ## GUID
gEfiDxeServicesTableGuid ## CONSUMES ## GUID
gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
+ gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
+
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
index e7cac455ff..3936b466b2 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
@@ -1,7 +1,7 @@
/** @file
Implements functions to read firmware file
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -135,9 +135,9 @@ FvGetNextFile (
return EFI_ACCESS_DENIED;
}
- if (*FileType > EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {
+ if (*FileType > EFI_FV_FILETYPE_SMM_CORE) {
//
- // File type needs to be in 0 - 0x0B
+ // File type needs to be in 0 - 0x0D
//
return EFI_NOT_FOUND;
}