Specifications
152
4
Example Code
4.1 Example of a Dummy EFI SMM Child Driver
User defined areas are highlighted like this in yellow.
/*++
Module Name:
UnitTestChild.c
Abstract:
This is a generic template for a child of the IchSmm driver.
--*/
#include "Efi.h"
#include "EfiRuntimeLib.h"
#include "GetFvImage.h"
#include EFI_PROTOCOL_CONSUMER(SmmBase)
#include EFI_PROTOCOL_CONSUMER(FirmwareVolume)
#include EFI_PROTOCOL_CONSUMER(SmmSwDispatch)
EFI_SMM_BASE_PROTOCOL *mSmmBase;
EFI_SMM_SYSTEM_TABLE *mSmst;
EFI_SMM_SW_DISPATCH_PROTOCOL *mSwDispatch;
// GUID for the FV file that this source file gets compiled into
EFI_GUID mChildFileGuid = { your guid here };
////////////////////////////////////////////
// Callback function prototypes
VOID
SwCallback (
IN EFI_HANDLE DispatchHandle,
IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext
);
////////////////////////////////////////////










