summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/CpuHotplugSmm/Smbase.h
blob: e73730d199260e47ccf68ec57a94f2c85504cdb3 (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
43
44
45
46
/** @file
  SMBASE relocation for hot-plugged CPUs.

  Copyright (c) 2020, Red Hat, Inc.

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

#ifndef SMBASE_H_
#define SMBASE_H_

#include <Uefi/UefiBaseType.h> // EFI_STATUS
#include <Uefi/UefiSpec.h>     // EFI_BOOT_SERVICES

#include "ApicId.h"            // APIC_ID

EFI_STATUS
SmbaseAllocatePostSmmPen (
  OUT UINT32                  *PenAddress,
  IN  CONST EFI_BOOT_SERVICES *BootServices
  );

VOID
SmbaseReinstallPostSmmPen (
  IN UINT32 PenAddress
  );

VOID
SmbaseReleasePostSmmPen (
  IN UINT32                  PenAddress,
  IN CONST EFI_BOOT_SERVICES *BootServices
  );

VOID
SmbaseInstallFirstSmiHandler (
  VOID
  );

EFI_STATUS
SmbaseRelocate (
  IN APIC_ID ApicId,
  IN UINTN   Smbase,
  IN UINT32  PenAddress
  );

#endif // SMBASE_H_