-/**\r
- Software MMI handler that is called when a Legacy Boot event is signaled. The MM\r
- Core uses this signal to know that a Legacy Boot has been performed and that\r
- gMmCorePrivate that is shared between the UEFI and MM execution environments can\r
- not be accessed from MM anymore since that structure is considered free memory by\r
- a legacy OS.\r
-\r
- @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister().\r
- @param Context Points to an optional handler context which was specified when the handler was registered.\r
- @param CommBuffer A pointer to a collection of data in memory that will\r
- be conveyed from a non-MM environment into an MM environment.\r
- @param CommBufferSize The size of the CommBuffer.\r
-\r
- @return Status Code\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-MmLegacyBootHandler (\r
- IN EFI_HANDLE DispatchHandle,\r
- IN CONST VOID *Context, OPTIONAL\r
- IN OUT VOID *CommBuffer, OPTIONAL\r
- IN OUT UINTN *CommBufferSize OPTIONAL\r
- )\r
-{\r
- EFI_HANDLE MmHandle;\r
- EFI_STATUS Status = EFI_SUCCESS;\r
-\r
- if (!mInLegacyBoot) {\r
- MmHandle = NULL;\r
- Status = MmInstallProtocolInterface (\r
- &MmHandle,\r
- &gEfiEventLegacyBootGuid,\r
- EFI_NATIVE_INTERFACE,\r
- NULL\r
- );\r
- }\r
- mInLegacyBoot = TRUE;\r
- return Status;\r
-}\r
-\r