X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=UefiCpuPkg%2FPiSmmCpuDxeSmm%2FPiSmmCpuDxeSmm.h;h=cbaa513244d5a78d7a3b6b87c7115ab691001c4d;hb=6e601a4109d4a998596986718653048ae23de0a6;hp=a2d5f55045b19d7eb143e892c33bd645c525f7bb;hpb=af4f4b3468aa239c61418ff899bfd239eae57b2d;p=mirror_edk2.git diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h index a2d5f55045..cbaa513244 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 @@ -25,7 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include +#include #include #include @@ -509,14 +509,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. @@ -1069,101 +1061,101 @@ TransferApToSafeState ( IN UINTN NumberToFinishAddress ); -/** - This function set given attributes of the memory region specified by - BaseAddress and Length. - - @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. - @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 - region. - - @retval EFI_SUCCESS The attributes were set for the memory region. - @retval EFI_INVALID_PARAMETER Length is zero. - Attributes specified an illegal combination of - attributes that cannot be set 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 memory resource range specified by - BaseAddress and Length. - -**/ -EFI_STATUS -EFIAPI -EdkiiSmmSetMemoryAttributes ( - IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT64 Attributes - ); - -/** - This function clears given attributes of the memory region specified by - BaseAddress and Length. - - @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. - @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 - region. - - @retval EFI_SUCCESS The attributes were set for the memory region. - @retval EFI_INVALID_PARAMETER Length is zero. - Attributes specified an illegal combination of - attributes that cannot be set 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 memory resource range specified by - BaseAddress and Length. - -**/ -EFI_STATUS -EFIAPI -EdkiiSmmClearMemoryAttributes ( - IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT64 Attributes - ); - -/** - This function retrieve 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. - - @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. - @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 Pointer to attributes returned. - - @retval EFI_SUCCESS The attributes got for the memory region. - @retval EFI_INVALID_PARAMETER Length is zero. - Attributes is NULL. - @retval EFI_NO_MAPPING Attributes are not consistent cross the memory - region. - @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 -EFIAPI -EdkiiSmmGetMemoryAttributes ( - IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT64 *Attributes - ); - +/** + This function set given attributes of the memory region specified by + BaseAddress and Length. + + @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. + @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 + region. + + @retval EFI_SUCCESS The attributes were set for the memory region. + @retval EFI_INVALID_PARAMETER Length is zero. + Attributes specified an illegal combination of + attributes that cannot be set 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 memory resource range specified by + BaseAddress and Length. + +**/ +EFI_STATUS +EFIAPI +EdkiiSmmSetMemoryAttributes ( + IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT64 Attributes + ); + +/** + This function clears given attributes of the memory region specified by + BaseAddress and Length. + + @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. + @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 + region. + + @retval EFI_SUCCESS The attributes were set for the memory region. + @retval EFI_INVALID_PARAMETER Length is zero. + Attributes specified an illegal combination of + attributes that cannot be set 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 memory resource range specified by + BaseAddress and Length. + +**/ +EFI_STATUS +EFIAPI +EdkiiSmmClearMemoryAttributes ( + IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT64 Attributes + ); + +/** + This function retrieve 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. + + @param This The EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL instance. + @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 Pointer to attributes returned. + + @retval EFI_SUCCESS The attributes got for the memory region. + @retval EFI_INVALID_PARAMETER Length is zero. + Attributes is NULL. + @retval EFI_NO_MAPPING Attributes are not consistent cross the memory + region. + @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 +EFIAPI +EdkiiSmmGetMemoryAttributes ( + IN EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL *This, + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT64 *Attributes + ); + #endif