X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FPiSmmCpuDxeSmm.h;h=e3c7cff81cc232053a537493e29d466f3ffa390d;hb=4436f72220aa59eda7f811abb5ca926efc269f16;hp=ef32f17676658ecae614bf6c03743e69626c0336;hpb=827330ccd1d0983fe4d059fee518bf42c70ef31e;p=mirror_edk2.git
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index ef32f17676..e3c7cff81c 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -1,7 +1,7 @@
/** @file
Agent Module to load other modules to deploy SMM Entry Vector for X86 CPU.
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials
@@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
+#include
#include
#include
@@ -45,6 +46,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
+#include
#include
#include
#include
@@ -295,23 +297,14 @@ WriteSaveStateRegister (
IN CONST VOID *Buffer
);
-//
-//
-//
-typedef struct {
- UINT32 Offset;
- UINT16 Segment;
- UINT16 Reserved;
-} IA32_FAR_ADDRESS;
-
-extern IA32_FAR_ADDRESS gSmmJmpAddr;
-
extern CONST UINT8 gcSmmInitTemplate[];
extern CONST UINT16 gcSmmInitSize;
-extern UINT32 gSmmCr0;
-extern UINT32 gSmmCr3;
-extern UINT32 gSmmCr4;
-extern UINTN gSmmInitStack;
+X86_ASSEMBLY_PATCH_LABEL gPatchSmmCr0;
+extern UINT32 mSmmCr0;
+X86_ASSEMBLY_PATCH_LABEL gPatchSmmCr3;
+extern UINT32 mSmmCr4;
+X86_ASSEMBLY_PATCH_LABEL gPatchSmmCr4;
+X86_ASSEMBLY_PATCH_LABEL gPatchSmmInitStack;
/**
Semaphore operation for all processor relocate SMMBase.
@@ -509,14 +502,6 @@ InitGdt (
OUT UINTN *GdtStepSize
);
-/**
- This function sets GDT/IDT buffer to be RO and XP.
-**/
-VOID
-PatchGdtIdtMap (
- VOID
- );
-
/**
Register the SMM Foundation entry point.
@@ -1087,7 +1072,7 @@ TransferApToSafeState (
@retval EFI_UNSUPPORTED The processor does not support one or more
bytes of the memory resource range specified
by BaseAddress and Length.
- The bit mask of attributes is not support for
+ The bit mask of attributes is not supported for
the memory resource range specified by
BaseAddress and Length.
@@ -1109,17 +1094,17 @@ EdkiiSmmSetMemoryAttributes (
@param BaseAddress The physical address that is the start address of
a memory region.
@param Length The size in bytes of the memory region.
- @param Attributes The bit mask of attributes to set for the memory
+ @param Attributes The bit mask of attributes to clear for the memory
region.
- @retval EFI_SUCCESS The attributes were set for the memory region.
+ @retval EFI_SUCCESS The attributes were cleared for the memory region.
@retval EFI_INVALID_PARAMETER Length is zero.
Attributes specified an illegal combination of
- attributes that cannot be set together.
+ attributes that cannot be cleared together.
@retval EFI_UNSUPPORTED The processor does not support one or more
bytes of the memory resource range specified
by BaseAddress and Length.
- The bit mask of attributes is not support for
+ The bit mask of attributes is not supported for
the memory resource range specified by
BaseAddress and Length.
@@ -1134,7 +1119,7 @@ EdkiiSmmClearMemoryAttributes (
);
/**
- This function retrieve the attributes of the memory region specified by
+ This function retrieves the attributes of the memory region specified by
BaseAddress and Length. If different attributes are got from different part
of the memory region, EFI_NO_MAPPING will be returned.
@@ -1152,9 +1137,6 @@ EdkiiSmmClearMemoryAttributes (
@retval EFI_UNSUPPORTED The processor does not support one or more
bytes of the memory resource range specified
by BaseAddress and Length.
- The bit mask of attributes is not support for
- the memory resource range specified by
- BaseAddress and Length.
**/
EFI_STATUS
@@ -1166,4 +1148,22 @@ EdkiiSmmGetMemoryAttributes (
IN UINT64 *Attributes
);
+/**
+ This function fixes up the address of the global variable or function
+ referred in SmmInit assembly files to be the absoute address.
+**/
+VOID
+EFIAPI
+PiSmmCpuSmmInitFixupAddress (
+ );
+
+/**
+ This function fixes up the address of the global variable or function
+ referred in SmiEntry assembly files to be the absoute address.
+**/
+VOID
+EFIAPI
+PiSmmCpuSmiEntryFixupAddress (
+ );
+
#endif