TianoCore EDK2 master
Loading...
Searching...
No Matches
ClearCache.c File Reference

Go to the source code of this file.

Functions

STATIC VOID EFIAPI ClearCache (IN OUT VOID *WorkSpace)
 
STATIC EFI_STATUS EFIAPI ClearCacheOnMpServicesAvailable (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
 
VOID InstallClearCacheCallback (VOID)
 

Variables

STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mMpServicesNotify
 

Detailed Description

Install a callback to clear cache on all processors. This is for conformance with the TCG "Platform Reset Attack Mitigation Specification". Because clearing the CPU caches at boot doesn't impact performance significantly, do it unconditionally, for simplicity's sake.

Copyright (C) 2018, Red Hat, Inc. Copyright (c) 2019, Citrix Systems, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ClearCache.c.

Function Documentation

◆ ClearCache()

STATIC VOID EFIAPI ClearCache ( IN OUT VOID *  WorkSpace)

Invalidate data & instruction caches. All APs execute this function in parallel. The BSP executes the function separately.

Parameters
[in,out]WorkSpacePointer to the input/output argument workspace shared by all processors.

Definition at line 32 of file ClearCache.c.

◆ ClearCacheOnMpServicesAvailable()

STATIC EFI_STATUS EFIAPI ClearCacheOnMpServicesAvailable ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor,
IN VOID *  Ppi 
)

Notification function called when EFI_PEI_MP_SERVICES_PPI becomes available.

Parameters
[in]PeiServicesIndirect reference to the PEI Services Table.
[in]NotifyDescriptorAddress of the notification descriptor data structure.
[in]PpiAddress of the PPI that was installed.
Returns
Status of the notification. The status code returned from this function is ignored.

Definition at line 54 of file ClearCache.c.

◆ InstallClearCacheCallback()

VOID InstallClearCacheCallback ( VOID  )

Definition at line 101 of file ClearCache.c.

Variable Documentation

◆ mMpServicesNotify

Initial value:
= {
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
&gEfiPeiMpServicesPpiGuid,
}
STATIC EFI_STATUS EFIAPI ClearCacheOnMpServicesAvailable(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
Definition: ClearCache.c:53

Definition at line 93 of file ClearCache.c.