summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Include/Library/SmmRelocationLib.h
blob: 999a5b46d17f2587f251c1b39cc329d1eda379eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/** @file
  Header file for SMM Relocation Library.

  The SmmRelocationLib class provides the SmmRelocationInit()
  interface for platform to do the smbase relocation, which
  shall provide below 2 functionalities:
  1. Relocate SmBases for each processor.
  2. Create the SmBase HOB (gSmmBaseHobGuid).

  With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at a later phase)
  shall:
  1. Consume the gSmmBaseHobGuid for the relocated smbase for each Processor.
  2. Execute early SMM init.

  Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#ifndef SMM_RELOCATION_LIB_H_
#define SMM_RELOCATION_LIB_H_

#include <Ppi/MpServices2.h>

/**
  CPU SmmBase Relocation Init.

  This function is to relocate CPU SmmBase.

  @param[in] MpServices2        Pointer to this instance of the MpServices.

  @retval EFI_SUCCESS           CPU SmmBase Relocated successfully.
  @retval Others                CPU SmmBase Relocation failed.

**/
EFI_STATUS
EFIAPI
SmmRelocationInit (
  IN EDKII_PEI_MP_SERVICES2_PPI  *MpServices2
  );

#endif