EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions | Variables

MdeModulePkg/Core/PiSmmCore/PiSmmCore.c File Reference

#include "PiSmmCore.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI SmmEfiNotAvailableYetArg5 (UINTN Arg1, UINTN Arg2, UINTN Arg3, UINTN Arg4, UINTN Arg5)
EFI_STATUS EFIAPI SmmLegacyBootHandler (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context, OPTIONAL IN OUT VOID *CommBuffer, OPTIONAL IN OUT UINTN *CommBufferSize OPTIONAL)
EFI_STATUS EFIAPI SmmReadyToLockHandler (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context, OPTIONAL IN OUT VOID *CommBuffer, OPTIONAL IN OUT UINTN *CommBufferSize OPTIONAL)
VOID EFIAPI SmmEntryPoint (IN CONST EFI_SMM_ENTRY_CONTEXT *SmmEntryContext)
EFI_STATUS EFIAPI SmmMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)

Variables

SMM_CORE_PRIVATE_DATAgSmmCorePrivate
EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst
BOOLEAN mInLegacyBoot = FALSE
SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers []

Detailed Description

SMM Core Main Entry Point

Copyright (c) 2009 - 2011, Intel Corporation. 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 http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file PiSmmCore.c.


Function Documentation

EFI_STATUS EFIAPI SmmEfiNotAvailableYetArg5 ( UINTN  Arg1,
UINTN  Arg2,
UINTN  Arg3,
UINTN  Arg4,
UINTN  Arg5 
)

Place holder function until all the SMM System Table Service are available.

Note: This function is only used by SMRAM invocation. It is never used by DXE invocation.

Parameters:
Arg1Undefined
Arg2Undefined
Arg3Undefined
Arg4Undefined
Arg5Undefined
Returns:
EFI_NOT_AVAILABLE_YET

Definition at line 100 of file PiSmmCore.c.

VOID EFIAPI SmmEntryPoint ( IN CONST EFI_SMM_ENTRY_CONTEXT SmmEntryContext)

The main entry point to SMM Foundation.

Note: This function is only used by SMRAM invocation. It is never used by DXE invocation.

Parameters:
SmmEntryContextProcessor information and functionality needed by SMM Foundation.

Definition at line 242 of file PiSmmCore.c.

EFI_STATUS EFIAPI SmmLegacyBootHandler ( IN EFI_HANDLE  DispatchHandle,
IN CONST VOID *  Context,
OPTIONAL IN OUT VOID *  CommBuffer,
OPTIONAL IN OUT UINTN *CommBufferSize  OPTIONAL 
)

Software SMI handler that is called when a Legacy Boot event is signalled. The SMM Core uses this signal to know that a Legacy Boot has been performed and that gSmmCorePrivate that is shared between the UEFI and SMM execution environments can not be accessed from SMM anymore since that structure is considered free memory by a legacy OS.

Parameters:
DispatchHandleThe unique handle assigned to this handler by SmiHandlerRegister().
ContextPoints to an optional handler context which was specified when the handler was registered.
CommBufferA pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment.
CommBufferSizeThe size of the CommBuffer.
Returns:
Status Code

Definition at line 133 of file PiSmmCore.c.

EFI_STATUS EFIAPI SmmMain ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The Entry Point for SMM Core

Install DXE Protocols and reload SMM Core into SMRAM and register SMM Core EntryPoint on the SMI vector.

Note: This function is called for both DXE invocation and SMRAM invocation.

Parameters:
ImageHandleThe firmware allocated handle for the EFI image.
SystemTableA pointer to the EFI System Table.
Return values:
EFI_SUCCESSThe entry point is executed successfully.
OtherSome error occurred when executing this entry point.

Definition at line 338 of file PiSmmCore.c.

EFI_STATUS EFIAPI SmmReadyToLockHandler ( IN EFI_HANDLE  DispatchHandle,
IN CONST VOID *  Context,
OPTIONAL IN OUT VOID *  CommBuffer,
OPTIONAL IN OUT UINTN *CommBufferSize  OPTIONAL 
)

Software SMI handler that is called when the DxeSmmReadyToLock protocol is added or if gEfiEventReadyToBootGuid is signalled. This function unregisters the Software SMIs that are nor required after SMRAM is locked and installs the SMM Ready To Lock Protocol so SMM Drivers are informed that SMRAM is about to be locked. It also verifies the the SMM CPU I/O 2 Protocol has been installed and NULLs gBS and gST because they can not longer be used after SMRAM is locked.

Parameters:
DispatchHandleThe unique handle assigned to this handler by SmiHandlerRegister().
ContextPoints to an optional handler context which was specified when the handler was registered.
CommBufferA pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment.
CommBufferSizeThe size of the CommBuffer.
Returns:
Status Code

Definition at line 163 of file PiSmmCore.c.


Variable Documentation

Definition at line 20 of file PiSmmCore.c.

Definition at line 25 of file PiSmmCore.c.

Definition at line 72 of file PiSmmCore.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines