DxeProtocolNotify.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
This file deals with Architecture Protocol (AP) registration in
the Dxe Core. The mArchProtocols[] array represents a list of
events that represent the Architectural Protocols.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "DxeMain.h"
//
// DXE Core Global Variables for all of the Architectural Protocols.
// If a protocol is installed mArchProtocols[].Present will be TRUE.
//
// CoreNotifyOnArchProtocolInstallation () fills in mArchProtocols[].Event
// and mArchProtocols[].Registration as it creates events for every array
// entry.
//
};
//
// Optional protocols that the DXE Core will use if they are present
//
};
//
// Following is needed to display missing architectural protocols in debug builds
//
typedef struct {
{ &gEfiSecurityArchProtocolGuid, "Security" },
{ &gEfiCpuArchProtocolGuid, "CPU" },
{ &gEfiMetronomeArchProtocolGuid, "Metronome" },
{ &gEfiTimerArchProtocolGuid, "Timer" },
{ &gEfiBdsArchProtocolGuid, "Bds" },
{ &gEfiWatchdogTimerArchProtocolGuid, "Watchdog Timer" },
{ &gEfiRuntimeArchProtocolGuid, "Runtime" },
{ &gEfiVariableArchProtocolGuid, "Variable" },
{ &gEfiVariableWriteArchProtocolGuid, "Variable Write" },
{ &gEfiCapsuleArchProtocolGuid, "Capsule" },
{ &gEfiMonotonicCounterArchProtocolGuid, "Monotonic Counter" },
{ &gEfiResetArchProtocolGuid, "Reset" },
{ &gEfiRealTimeClockArchProtocolGuid, "Real Time Clock" },
{ NULL, "" }
};
/**
Return TRUE if all AP services are availible.
@retval EFI_SUCCESS All AP services are available
@retval EFI_NOT_FOUND At least one AP service is not available
**/
)
{
return EFI_NOT_FOUND;
}
}
return EFI_SUCCESS;
}
/**
Notification event handler registered by CoreNotifyOnArchProtocolInstallation ().
This notify function is registered for every architectural protocol. This handler
updates mArchProtocol[] array entry with protocol instance data and sets it's
present flag to TRUE. If any constructor is required it is executed. The EFI
System Table headers are updated.
@param Event The Event that is being processed, not used.
@param Context Event Context, not used.
**/
)
{
//
// Get Entry from Context
//
//
// See if the expected protocol is present in the handle database
//
return;
}
//
// Mark the protocol as present
//
//
// Update protocol global variable if one exists. Entry->Protocol points to a global variable
// if one exists in the DXE core for this Architectural Protocol
//
}
//
// Do special operations for Architectural Protocols
//
//
// Register the Core timer tick handler with the Timer AP
//
}
//
// When runtime architectural protocol is available, updates CRC32 in the Debug Table
//
//
// Update the Runtime Architectural protocol with the template that the core was
// using so there would not need to be a dependency on the Runtime AP
//
//
// Copy all the registered Image to new gRuntime protocol
//
for (Link = gRuntimeTemplate.ImageHead.ForwardLink; Link != &gRuntimeTemplate.ImageHead; Link = TempLinkNode.ForwardLink) {
}
//
// Copy all the registered Event to new gRuntime protocol
//
for (Link = gRuntimeTemplate.EventHead.ForwardLink; Link != &gRuntimeTemplate.EventHead; Link = TempLinkNode.ForwardLink) {
}
//
// Clean up gRuntimeTemplate
//
}
//
// It's over kill to do them all every time, but it saves a lot of code.
//
}
/**
Creates an event for each entry in a table that is fired everytime a Protocol
of a specific type is installed.
@param Entry Pointer to EFI_CORE_PROTOCOL_NOTIFY_ENTRY.
**/
)
{
//
// Create the event
//
);
//
// Register for protocol notifactions on this event
//
);
}
}
/**
Creates an events for the Architectural Protocols and the optional protocols
that are fired everytime a Protocol of a specific type is installed.
**/
)
{
}
/**
Displays Architectural protocols that were not loaded and are required for DXE
core to function. Only used in Debug Builds.
**/
)
{
break;
}
}
}
}
}