Change the order of parameters in comments to match the order in code, in PeiSmmAccessLib.c. Add the attribute "out" for parameters. This is to fix issues reported by ECC.
Cc: Ray Ni <ray...@intel.com> Cc: Rangasai V Chaganty <rangasai.v.chaga...@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zh...@intel.com> --- .../SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c | 6 +++--- .../Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.c | 4 ++-- .../Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c index 2310e611..76b1b23b 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c @@ -46,9 +46,9 @@ typedef struct { The use of "open" means that the memory is visible from all PEIM and SMM agents. + @param[in] PeiServices - General purpose services available to every PEIM. @param[in] This - Pointer to the SMM Access Interface. @param[in] DescriptorIndex - Region of SMRAM to Open. - @param[in] PeiServices - General purpose services available to every PEIM. @retval EFI_SUCCESS - The region was successfully opened. @retval EFI_DEVICE_ERROR - The region could not be opened because locked by @@ -195,9 +195,9 @@ Lock ( @param[in] PeiServices - General purpose services available to every PEIM. @param[in] This - Pointer to the SMRAM Access Interface. - @param[in] SmramMapSize - Pointer to the variable containing size of the + @param[in,out] SmramMapSize - Pointer to the variable containing size of the buffer to contain the description information. - @param[in] SmramMap - Buffer containing the data describing the Smram + @param[in,out] SmramMap - Buffer containing the data describing the Smram region descriptors. @retval EFI_BUFFER_TOO_SMALL - The user did not provide a sufficient buffer. diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.c b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.c index bdcacac5..253d8015 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.c @@ -229,9 +229,9 @@ Lock ( memory controller capabilities. @param[in] This - Pointer to the SMRAM Access Interface. - @param[in] SmramMapSize - Pointer to the variable containing size of the + @param[in,out] SmramMapSize - Pointer to the variable containing size of the buffer to contain the description information. - @param[in] SmramMap - Buffer containing the data describing the Smram + @param[in,out] SmramMap - Buffer containing the data describing the Smram region descriptors. @retval EFI_BUFFER_TOO_SMALL - The user did not provide a sufficient buffer. diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.h b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.h index 647b3a07..c4d881be 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.h +++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccessDriver.h @@ -140,9 +140,9 @@ Lock ( memory controller capabilities. @param[in] This - Pointer to the SMRAM Access Interface. - @param[in] SmramMapSize - Pointer to the variable containing size of the + @param[in,out] SmramMapSize - Pointer to the variable containing size of the buffer to contain the description information. - @param[in] SmramMap - Buffer containing the data describing the Smram + @param[in,out] SmramMap - Buffer containing the data describing the Smram region descriptors. @retval EFI_BUFFER_TOO_SMALL - The user did not provide a sufficient buffer. -- 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46970): https://edk2.groups.io/g/devel/message/46970 Mute This Topic: https://groups.io/mt/33164366/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-