TianoCore EDK2 master
Microcode.c File Reference
#include "MpLib.h"

Go to the source code of this file.

Functions

VOID MicrocodeDetect (IN CPU_MP_DATA *CpuMpData, IN UINTN ProcessorNumber)
 
VOID ShadowMicrocodePatchWorker (IN OUT CPU_MP_DATA *CpuMpData, IN MICROCODE_PATCH_INFO *Patches, IN UINTN PatchCount, IN UINTN TotalLoadSize)
 
VOID ShadowMicrocodePatchByPcd (IN OUT CPU_MP_DATA *CpuMpData)
 
VOID ShadowMicrocodeUpdatePatch (IN OUT CPU_MP_DATA *CpuMpData)
 
BOOLEAN GetMicrocodePatchInfoFromHob (UINT64 *Address, UINT64 *RegionSize)
 

Detailed Description

Implementation of loading microcode on processors.

Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Microcode.c.

Function Documentation

◆ GetMicrocodePatchInfoFromHob()

BOOLEAN GetMicrocodePatchInfoFromHob ( UINT64 Address,
UINT64 RegionSize 
)

Get the cached microcode patch base address and size from the microcode patch information cache HOB.

Parameters
[out]AddressBase address of the microcode patches data. It will be updated if the microcode patch information cache HOB is found.
[out]RegionSizeSize of the microcode patches data. It will be updated if the microcode patch information cache HOB is found.
Return values
TRUEThe microcode patch information cache HOB is found.
FALSEThe microcode patch information cache HOB is not found.

Definition at line 358 of file Microcode.c.

◆ MicrocodeDetect()

VOID MicrocodeDetect ( IN CPU_MP_DATA CpuMpData,
IN UINTN  ProcessorNumber 
)

Detect whether specified processor can find matching microcode patch and load it.

Parameters
[in]CpuMpDataThe pointer to CPU MP Data structure.
[in]ProcessorNumberThe handle number of the processor. The range is from 0 to the total number of logical processors minus 1.

Definition at line 20 of file Microcode.c.

◆ ShadowMicrocodePatchByPcd()

VOID ShadowMicrocodePatchByPcd ( IN OUT CPU_MP_DATA CpuMpData)

Shadow the required microcode patches data into memory according to PCD PcdCpuMicrocodePatchAddress and PcdCpuMicrocodePatchRegionSize.

Parameters
[in,out]CpuMpDataThe pointer to CPU MP Data structure.

Definition at line 188 of file Microcode.c.

◆ ShadowMicrocodePatchWorker()

VOID ShadowMicrocodePatchWorker ( IN OUT CPU_MP_DATA CpuMpData,
IN MICROCODE_PATCH_INFO Patches,
IN UINTN  PatchCount,
IN UINTN  TotalLoadSize 
)

Actual worker function that shadows the required microcode patches into memory.

Parameters
[in,out]CpuMpDataThe pointer to CPU MP Data structure.
[in]PatchesThe pointer to an array of information on the microcode patches that will be loaded into memory.
[in]PatchCountThe number of microcode patches that will be loaded into memory.
[in]TotalLoadSizeThe total size of all the microcode patches to be loaded.

Definition at line 134 of file Microcode.c.

◆ ShadowMicrocodeUpdatePatch()

VOID ShadowMicrocodeUpdatePatch ( IN OUT CPU_MP_DATA CpuMpData)

Shadow the required microcode patches data into memory.

Parameters
[in,out]CpuMpDataThe pointer to CPU MP Data structure.

Definition at line 330 of file Microcode.c.