2 SMM Core Main Entry Point
4 Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available
6 under the terms and conditions of the BSD License which accompanies this
7 distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "PiSmmCore.h"
18 // Physical pointer to private structure shared between SMM IPL and the SMM Core
20 SMM_CORE_PRIVATE_DATA
*gSmmCorePrivate
;
23 // SMM Core global variable for SMM System Table. Only accessed as a physical structure in SMRAM.
25 EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst
= {
28 EFI_SMM_SYSTEM_TABLE2_REVISION
,
29 sizeof (gSmmCoreSmst
.Hdr
)
31 NULL
, // SmmFirmwareVendor
32 0, // SmmFirmwareRevision
33 SmmInstallConfigurationTable
,
36 (EFI_SMM_CPU_IO2
) SmmEfiNotAvailableYetArg5
, // SmmMemRead
37 (EFI_SMM_CPU_IO2
) SmmEfiNotAvailableYetArg5
// SmmMemWrite
40 (EFI_SMM_CPU_IO2
) SmmEfiNotAvailableYetArg5
, // SmmIoRead
41 (EFI_SMM_CPU_IO2
) SmmEfiNotAvailableYetArg5
// SmmIoWrite
48 NULL
, // SmmStartupThisAp
49 0, // CurrentlyExecutingCpu
51 NULL
, // CpuSaveStateSize
53 0, // NumberOfTableEntries
54 NULL
, // SmmConfigurationTable
55 SmmInstallProtocolInterface
,
56 SmmUninstallProtocolInterface
,
58 SmmRegisterProtocolNotify
,
67 // Flag to determine if the platform has performed a legacy boot.
68 // If this flag is TRUE, then the runtime code and runtime data associated with the
69 // SMM IPL are converted to free memory, so the SMM Core must guarantee that is
70 // does not touch of the code/data associated with the SMM IPL if this flag is TRUE.
72 BOOLEAN mInLegacyBoot
= FALSE
;
75 // Table of SMI Handlers that are registered by the SMM Core when it is initialized
77 SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers
[] = {
78 { SmmDriverDispatchHandler
, &gEfiEventDxeDispatchGuid
, NULL
, TRUE
},
79 { SmmReadyToLockHandler
, &gEfiDxeSmmReadyToLockProtocolGuid
, NULL
, TRUE
},
80 { SmmLegacyBootHandler
, &gEfiEventLegacyBootGuid
, NULL
, FALSE
},
81 { SmmExitBootServicesHandler
, &gEfiEventExitBootServicesGuid
, NULL
, FALSE
},
82 { SmmReadyToBootHandler
, &gEfiEventReadyToBootGuid
, NULL
, FALSE
},
83 { SmmEndOfDxeHandler
, &gEfiEndOfDxeEventGroupGuid
, NULL
, TRUE
},
84 { SmmEndOfS3ResumeHandler
, &gEdkiiEndOfS3ResumeGuid
, NULL
, FALSE
},
85 { NULL
, NULL
, NULL
, FALSE
}
88 UINTN mFullSmramRangeCount
;
89 EFI_SMRAM_DESCRIPTOR
*mFullSmramRanges
;
91 EFI_SMM_DRIVER_ENTRY
*mSmmCoreDriverEntry
;
93 EFI_LOADED_IMAGE_PROTOCOL
*mSmmCoreLoadedImage
;
96 Place holder function until all the SMM System Table Service are available.
98 Note: This function is only used by SMRAM invocation. It is never used by DXE invocation.
100 @param Arg1 Undefined
101 @param Arg2 Undefined
102 @param Arg3 Undefined
103 @param Arg4 Undefined
104 @param Arg5 Undefined
106 @return EFI_NOT_AVAILABLE_YET
111 SmmEfiNotAvailableYetArg5 (
120 // This function should never be executed. If it does, then the architectural protocols
121 // have not been designed correctly.
123 return EFI_NOT_AVAILABLE_YET
;
127 Software SMI handler that is called when a Legacy Boot event is signalled. The SMM
128 Core uses this signal to know that a Legacy Boot has been performed and that
129 gSmmCorePrivate that is shared between the UEFI and SMM execution environments can
130 not be accessed from SMM anymore since that structure is considered free memory by
131 a legacy OS. Then the SMM Core also install SMM Legacy Boot protocol to notify SMM
132 driver that system enter legacy boot.
134 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
135 @param Context Points to an optional handler context which was specified when the handler was registered.
136 @param CommBuffer A pointer to a collection of data in memory that will
137 be conveyed from a non-SMM environment into an SMM environment.
138 @param CommBufferSize The size of the CommBuffer.
145 SmmLegacyBootHandler (
146 IN EFI_HANDLE DispatchHandle
,
147 IN CONST VOID
*Context
, OPTIONAL
148 IN OUT VOID
*CommBuffer
, OPTIONAL
149 IN OUT UINTN
*CommBufferSize OPTIONAL
153 EFI_HANDLE SmmHandle
;
156 // Install SMM Legacy Boot protocol.
159 Status
= SmmInstallProtocolInterface (
161 &gEdkiiSmmLegacyBootProtocolGuid
,
162 EFI_NATIVE_INTERFACE
,
166 mInLegacyBoot
= TRUE
;
168 SmiHandlerUnRegister (DispatchHandle
);
174 Software SMI handler that is called when an Exit Boot Services event is signalled.
175 Then the SMM Core also install SMM Exit Boot Services protocol to notify SMM driver
176 that system enter exit boot services.
178 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
179 @param Context Points to an optional handler context which was specified when the handler was registered.
180 @param CommBuffer A pointer to a collection of data in memory that will
181 be conveyed from a non-SMM environment into an SMM environment.
182 @param CommBufferSize The size of the CommBuffer.
189 SmmExitBootServicesHandler (
190 IN EFI_HANDLE DispatchHandle
,
191 IN CONST VOID
*Context
, OPTIONAL
192 IN OUT VOID
*CommBuffer
, OPTIONAL
193 IN OUT UINTN
*CommBufferSize OPTIONAL
197 EFI_HANDLE SmmHandle
;
200 // Install SMM Exit Boot Services protocol.
203 Status
= SmmInstallProtocolInterface (
205 &gEdkiiSmmExitBootServicesProtocolGuid
,
206 EFI_NATIVE_INTERFACE
,
210 SmiHandlerUnRegister (DispatchHandle
);
216 Software SMI handler that is called when an Ready To Boot event is signalled.
217 Then the SMM Core also install SMM Ready To Boot protocol to notify SMM driver
218 that system enter ready to boot.
220 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
221 @param Context Points to an optional handler context which was specified when the handler was registered.
222 @param CommBuffer A pointer to a collection of data in memory that will
223 be conveyed from a non-SMM environment into an SMM environment.
224 @param CommBufferSize The size of the CommBuffer.
231 SmmReadyToBootHandler (
232 IN EFI_HANDLE DispatchHandle
,
233 IN CONST VOID
*Context
, OPTIONAL
234 IN OUT VOID
*CommBuffer
, OPTIONAL
235 IN OUT UINTN
*CommBufferSize OPTIONAL
239 EFI_HANDLE SmmHandle
;
242 // Install SMM Ready To Boot protocol.
245 Status
= SmmInstallProtocolInterface (
247 &gEdkiiSmmReadyToBootProtocolGuid
,
248 EFI_NATIVE_INTERFACE
,
252 SmiHandlerUnRegister (DispatchHandle
);
258 Software SMI handler that is called when the DxeSmmReadyToLock protocol is added
259 or if gEfiEventReadyToBootGuid is signalled. This function unregisters the
260 Software SMIs that are nor required after SMRAM is locked and installs the
261 SMM Ready To Lock Protocol so SMM Drivers are informed that SMRAM is about
262 to be locked. It also verifies the SMM CPU I/O 2 Protocol has been installed
263 and NULLs gBS and gST because they can not longer be used after SMRAM is locked.
265 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
266 @param Context Points to an optional handler context which was specified when the handler was registered.
267 @param CommBuffer A pointer to a collection of data in memory that will
268 be conveyed from a non-SMM environment into an SMM environment.
269 @param CommBufferSize The size of the CommBuffer.
276 SmmReadyToLockHandler (
277 IN EFI_HANDLE DispatchHandle
,
278 IN CONST VOID
*Context
, OPTIONAL
279 IN OUT VOID
*CommBuffer
, OPTIONAL
280 IN OUT UINTN
*CommBufferSize OPTIONAL
285 EFI_HANDLE SmmHandle
;
289 // Unregister SMI Handlers that are no required after the SMM driver dispatch is stopped
291 for (Index
= 0; mSmmCoreSmiHandlers
[Index
].HandlerType
!= NULL
; Index
++) {
292 if (mSmmCoreSmiHandlers
[Index
].UnRegister
) {
293 SmiHandlerUnRegister (mSmmCoreSmiHandlers
[Index
].DispatchHandle
);
298 // Install SMM Ready to lock protocol
301 Status
= SmmInstallProtocolInterface (
303 &gEfiSmmReadyToLockProtocolGuid
,
304 EFI_NATIVE_INTERFACE
,
309 // Make sure SMM CPU I/O 2 Procol has been installed into the handle database
311 Status
= SmmLocateProtocol (&gEfiSmmCpuIo2ProtocolGuid
, NULL
, &Interface
);
314 // Print a message on a debug build if the SMM CPU I/O 2 Protocol is not installed
317 if (EFI_ERROR (Status
)) {
318 DEBUG ((DEBUG_ERROR
, "\nSMM: SmmCpuIo Arch Protocol not present!!\n"));
323 // Assert if the CPU I/O 2 Protocol is not installed
325 ASSERT_EFI_ERROR (Status
);
328 // Display any drivers that were not dispatched because dependency expression
329 // evaluated to false if this is a debug build
332 SmmDisplayDiscoveredNotDispatched ();
336 // Not allowed to use gST or gBS after lock
341 SmramProfileReadyToLock ();
347 Software SMI handler that is called when the EndOfDxe event is signalled.
348 This function installs the SMM EndOfDxe Protocol so SMM Drivers are informed that
349 platform code will invoke 3rd part code.
351 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
352 @param Context Points to an optional handler context which was specified when the handler was registered.
353 @param CommBuffer A pointer to a collection of data in memory that will
354 be conveyed from a non-SMM environment into an SMM environment.
355 @param CommBufferSize The size of the CommBuffer.
363 IN EFI_HANDLE DispatchHandle
,
364 IN CONST VOID
*Context
, OPTIONAL
365 IN OUT VOID
*CommBuffer
, OPTIONAL
366 IN OUT UINTN
*CommBufferSize OPTIONAL
370 EFI_HANDLE SmmHandle
;
372 DEBUG ((EFI_D_INFO
, "SmmEndOfDxeHandler\n"));
374 // Install SMM EndOfDxe protocol
377 Status
= SmmInstallProtocolInterface (
379 &gEfiSmmEndOfDxeProtocolGuid
,
380 EFI_NATIVE_INTERFACE
,
387 Software SMI handler that is called when the EndOfS3Resume signal is triggered.
388 This function installs the SMM EndOfS3Resume Protocol so SMM Drivers are informed that
389 S3 resume has finished.
391 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
392 @param Context Points to an optional handler context which was specified when the handler was registered.
393 @param CommBuffer A pointer to a collection of data in memory that will
394 be conveyed from a non-SMM environment into an SMM environment.
395 @param CommBufferSize The size of the CommBuffer.
402 SmmEndOfS3ResumeHandler (
403 IN EFI_HANDLE DispatchHandle
,
404 IN CONST VOID
*Context
, OPTIONAL
405 IN OUT VOID
*CommBuffer
, OPTIONAL
406 IN OUT UINTN
*CommBufferSize OPTIONAL
410 EFI_HANDLE SmmHandle
;
412 DEBUG ((EFI_D_INFO
, "SmmEndOfS3ResumeHandler\n"));
415 // Install SMM EndOfS3Resume protocol
418 Status
= SmmInstallProtocolInterface (
420 &gEdkiiEndOfS3ResumeGuid
,
421 EFI_NATIVE_INTERFACE
,
424 ASSERT_EFI_ERROR (Status
);
427 // Uninstall the protocol here because the comsumer just hook the
428 // installation event.
430 Status
= SmmUninstallProtocolInterface (
432 &gEdkiiEndOfS3ResumeGuid
,
435 ASSERT_EFI_ERROR (Status
);
441 Determine if two buffers overlap in memory.
443 @param[in] Buff1 Pointer to first buffer
444 @param[in] Size1 Size of Buff1
445 @param[in] Buff2 Pointer to second buffer
446 @param[in] Size2 Size of Buff2
448 @retval TRUE Buffers overlap in memory.
449 @retval FALSE Buffer doesn't overlap.
453 InternalIsBufferOverlapped (
461 // If buff1's end is less than the start of buff2, then it's ok.
462 // Also, if buff1's start is beyond buff2's end, then it's ok.
464 if (((Buff1
+ Size1
) <= Buff2
) || (Buff1
>= (Buff2
+ Size2
))) {
472 The main entry point to SMM Foundation.
474 Note: This function is only used by SMRAM invocation. It is never used by DXE invocation.
476 @param SmmEntryContext Processor information and functionality
477 needed by SMM Foundation.
483 IN CONST EFI_SMM_ENTRY_CONTEXT
*SmmEntryContext
487 EFI_SMM_COMMUNICATE_HEADER
*CommunicateHeader
;
488 BOOLEAN InLegacyBoot
;
489 BOOLEAN IsOverlapped
;
490 VOID
*CommunicationBuffer
;
493 PERF_START (NULL
, "SMM", NULL
, 0) ;
496 // Update SMST with contents of the SmmEntryContext structure
498 gSmmCoreSmst
.SmmStartupThisAp
= SmmEntryContext
->SmmStartupThisAp
;
499 gSmmCoreSmst
.CurrentlyExecutingCpu
= SmmEntryContext
->CurrentlyExecutingCpu
;
500 gSmmCoreSmst
.NumberOfCpus
= SmmEntryContext
->NumberOfCpus
;
501 gSmmCoreSmst
.CpuSaveStateSize
= SmmEntryContext
->CpuSaveStateSize
;
502 gSmmCoreSmst
.CpuSaveState
= SmmEntryContext
->CpuSaveState
;
505 // Call platform hook before Smm Dispatch
507 PlatformHookBeforeSmmDispatch ();
510 // Call memory management hook function
512 SmmEntryPointMemoryManagementHook ();
515 // If a legacy boot has occured, then make sure gSmmCorePrivate is not accessed
517 InLegacyBoot
= mInLegacyBoot
;
520 // Mark the InSmm flag as TRUE, it will be used by SmmBase2 protocol
522 gSmmCorePrivate
->InSmm
= TRUE
;
525 // Check to see if this is a Synchronous SMI sent through the SMM Communication
526 // Protocol or an Asynchronous SMI
528 CommunicationBuffer
= gSmmCorePrivate
->CommunicationBuffer
;
529 BufferSize
= gSmmCorePrivate
->BufferSize
;
530 if (CommunicationBuffer
!= NULL
) {
532 // Synchronous SMI for SMM Core or request from Communicate protocol
534 IsOverlapped
= InternalIsBufferOverlapped (
535 (UINT8
*) CommunicationBuffer
,
537 (UINT8
*) gSmmCorePrivate
,
538 sizeof (*gSmmCorePrivate
)
540 if (!SmmIsBufferOutsideSmmValid ((UINTN
)CommunicationBuffer
, BufferSize
) || IsOverlapped
) {
542 // If CommunicationBuffer is not in valid address scope,
543 // or there is overlap between gSmmCorePrivate and CommunicationBuffer,
544 // return EFI_INVALID_PARAMETER
546 gSmmCorePrivate
->CommunicationBuffer
= NULL
;
547 gSmmCorePrivate
->ReturnStatus
= EFI_ACCESS_DENIED
;
549 CommunicateHeader
= (EFI_SMM_COMMUNICATE_HEADER
*)CommunicationBuffer
;
550 BufferSize
-= OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER
, Data
);
552 &CommunicateHeader
->HeaderGuid
,
554 CommunicateHeader
->Data
,
558 // Update CommunicationBuffer, BufferSize and ReturnStatus
559 // Communicate service finished, reset the pointer to CommBuffer to NULL
561 gSmmCorePrivate
->BufferSize
= BufferSize
+ OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER
, Data
);
562 gSmmCorePrivate
->CommunicationBuffer
= NULL
;
563 gSmmCorePrivate
->ReturnStatus
= (Status
== EFI_SUCCESS
) ? EFI_SUCCESS
: EFI_NOT_FOUND
;
569 // Process Asynchronous SMI sources
571 SmiManage (NULL
, NULL
, NULL
, NULL
);
574 // Call platform hook after Smm Dispatch
576 PlatformHookAfterSmmDispatch ();
579 // If a legacy boot has occured, then make sure gSmmCorePrivate is not accessed
583 // Clear the InSmm flag as we are going to leave SMM
585 gSmmCorePrivate
->InSmm
= FALSE
;
588 PERF_END (NULL
, "SMM", NULL
, 0) ;
592 Install LoadedImage protocol for SMM Core.
595 SmmCoreInstallLoadedImage (
603 // Allocate a Loaded Image Protocol in EfiBootServicesData
605 Status
= gBS
->AllocatePool (EfiBootServicesData
, sizeof(EFI_LOADED_IMAGE_PROTOCOL
), (VOID
**)&mSmmCoreLoadedImage
);
606 ASSERT_EFI_ERROR (Status
);
608 ZeroMem (mSmmCoreLoadedImage
, sizeof (EFI_LOADED_IMAGE_PROTOCOL
));
610 // Fill in the remaining fields of the Loaded Image Protocol instance.
611 // Note: ImageBase is an SMRAM address that can not be accessed outside of SMRAM if SMRAM window is closed.
613 mSmmCoreLoadedImage
->Revision
= EFI_LOADED_IMAGE_PROTOCOL_REVISION
;
614 mSmmCoreLoadedImage
->ParentHandle
= gSmmCorePrivate
->SmmIplImageHandle
;
615 mSmmCoreLoadedImage
->SystemTable
= gST
;
617 mSmmCoreLoadedImage
->ImageBase
= (VOID
*)(UINTN
)gSmmCorePrivate
->PiSmmCoreImageBase
;
618 mSmmCoreLoadedImage
->ImageSize
= gSmmCorePrivate
->PiSmmCoreImageSize
;
619 mSmmCoreLoadedImage
->ImageCodeType
= EfiRuntimeServicesCode
;
620 mSmmCoreLoadedImage
->ImageDataType
= EfiRuntimeServicesData
;
623 // Create a new image handle in the UEFI handle database for the SMM Driver
626 Status
= gBS
->InstallMultipleProtocolInterfaces (
628 &gEfiLoadedImageProtocolGuid
, mSmmCoreLoadedImage
,
631 ASSERT_EFI_ERROR (Status
);
634 // Allocate a Loaded Image Protocol in SMM
636 Status
= SmmAllocatePool (EfiRuntimeServicesData
, sizeof(EFI_SMM_DRIVER_ENTRY
), (VOID
**)&mSmmCoreDriverEntry
);
637 ASSERT_EFI_ERROR(Status
);
639 ZeroMem (mSmmCoreDriverEntry
, sizeof(EFI_SMM_DRIVER_ENTRY
));
641 // Fill in the remaining fields of the Loaded Image Protocol instance.
643 mSmmCoreDriverEntry
->Signature
= EFI_SMM_DRIVER_ENTRY_SIGNATURE
;
644 mSmmCoreDriverEntry
->SmmLoadedImage
.Revision
= EFI_LOADED_IMAGE_PROTOCOL_REVISION
;
645 mSmmCoreDriverEntry
->SmmLoadedImage
.ParentHandle
= gSmmCorePrivate
->SmmIplImageHandle
;
646 mSmmCoreDriverEntry
->SmmLoadedImage
.SystemTable
= gST
;
648 mSmmCoreDriverEntry
->SmmLoadedImage
.ImageBase
= (VOID
*)(UINTN
)gSmmCorePrivate
->PiSmmCoreImageBase
;
649 mSmmCoreDriverEntry
->SmmLoadedImage
.ImageSize
= gSmmCorePrivate
->PiSmmCoreImageSize
;
650 mSmmCoreDriverEntry
->SmmLoadedImage
.ImageCodeType
= EfiRuntimeServicesCode
;
651 mSmmCoreDriverEntry
->SmmLoadedImage
.ImageDataType
= EfiRuntimeServicesData
;
653 mSmmCoreDriverEntry
->ImageEntryPoint
= gSmmCorePrivate
->PiSmmCoreEntryPoint
;
654 mSmmCoreDriverEntry
->ImageBuffer
= gSmmCorePrivate
->PiSmmCoreImageBase
;
655 mSmmCoreDriverEntry
->NumberOfPage
= EFI_SIZE_TO_PAGES((UINTN
)gSmmCorePrivate
->PiSmmCoreImageSize
);
658 // Create a new image handle in the SMM handle database for the SMM Driver
660 mSmmCoreDriverEntry
->SmmImageHandle
= NULL
;
661 Status
= SmmInstallProtocolInterface (
662 &mSmmCoreDriverEntry
->SmmImageHandle
,
663 &gEfiLoadedImageProtocolGuid
,
664 EFI_NATIVE_INTERFACE
,
665 &mSmmCoreDriverEntry
->SmmLoadedImage
667 ASSERT_EFI_ERROR(Status
);
673 The Entry Point for SMM Core
675 Install DXE Protocols and reload SMM Core into SMRAM and register SMM Core
676 EntryPoint on the SMI vector.
678 Note: This function is called for both DXE invocation and SMRAM invocation.
680 @param ImageHandle The firmware allocated handle for the EFI image.
681 @param SystemTable A pointer to the EFI System Table.
683 @retval EFI_SUCCESS The entry point is executed successfully.
684 @retval Other Some error occurred when executing this entry point.
690 IN EFI_HANDLE ImageHandle
,
691 IN EFI_SYSTEM_TABLE
*SystemTable
698 // Get SMM Core Private context passed in from SMM IPL in ImageHandle.
700 gSmmCorePrivate
= (SMM_CORE_PRIVATE_DATA
*)ImageHandle
;
703 // Fill in SMRAM physical address for the SMM Services Table and the SMM Entry Point.
705 gSmmCorePrivate
->Smst
= &gSmmCoreSmst
;
706 gSmmCorePrivate
->SmmEntryPoint
= SmmEntryPoint
;
709 // No need to initialize memory service.
710 // It is done in constructor of PiSmmCoreMemoryAllocationLib(),
711 // so that the library linked with PiSmmCore can use AllocatePool() in constuctor.
717 // Copy FullSmramRanges to SMRAM
719 mFullSmramRangeCount
= gSmmCorePrivate
->SmramRangeCount
;
720 mFullSmramRanges
= AllocatePool (mFullSmramRangeCount
* sizeof (EFI_SMRAM_DESCRIPTOR
));
721 ASSERT (mFullSmramRanges
!= NULL
);
722 CopyMem (mFullSmramRanges
, gSmmCorePrivate
->SmramRanges
, mFullSmramRangeCount
* sizeof (EFI_SMRAM_DESCRIPTOR
));
725 // Register all SMI Handlers required by the SMM Core
727 for (Index
= 0; mSmmCoreSmiHandlers
[Index
].HandlerType
!= NULL
; Index
++) {
728 Status
= SmiHandlerRegister (
729 mSmmCoreSmiHandlers
[Index
].Handler
,
730 mSmmCoreSmiHandlers
[Index
].HandlerType
,
731 &mSmmCoreSmiHandlers
[Index
].DispatchHandle
733 ASSERT_EFI_ERROR (Status
);
736 RegisterSmramProfileHandler ();
737 SmramProfileInstallProtocol ();
739 SmmCoreInstallLoadedImage ();
741 SmmCoreInitializeMemoryAttributesTable ();
743 SmmCoreInitializeSmiHandlerProfile ();