* [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable()
@ 2017-06-21 9:49 Star Zeng
2017-06-21 9:49 ` [PATCH 1/2] MdePkg: " Star Zeng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Star Zeng @ 2017-06-21 9:49 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng
They are to follow PI 1.5 spec.
Star Zeng (2):
MdePkg: Minor update to the Data parameter for PEI GetVariable()
MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
MdeModulePkg/Universal/Variable/Pei/Variable.c | 5 +++--
MdePkg/Include/Ppi/ReadOnlyVariable2.h | 7 ++++---
2 files changed, 7 insertions(+), 5 deletions(-)
--
2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] MdePkg: Minor update to the Data parameter for PEI GetVariable()
2017-06-21 9:49 [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable() Star Zeng
@ 2017-06-21 9:49 ` Star Zeng
2017-06-21 9:49 ` [PATCH 2/2] MdeModulePkg: " Star Zeng
2017-06-21 12:11 ` [PATCH 0/2] " Gao, Liming
2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2017-06-21 9:49 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Liming Gao
PI 1.5 spec has minor update to the Data parameter for PEI
GetVariable(), and no real functional behavior change.
The modifier of Data parameter:
OUT VOID *Data
->
OUT VOID *Data OPTIONAL
The comments of Data parameter:
Data Points to the buffer which will hold the returned variable value.
->
Data Points to the buffer which will hold the returned variable value.
May be NULL with a zero DataSize in order to determine the size of the buffer needed.
The patch is to follow the spec to update the definition.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
MdePkg/Include/Ppi/ReadOnlyVariable2.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/MdePkg/Include/Ppi/ReadOnlyVariable2.h b/MdePkg/Include/Ppi/ReadOnlyVariable2.h
index 6a2cd50136b3..6d8ea603811f 100644
--- a/MdePkg/Include/Ppi/ReadOnlyVariable2.h
+++ b/MdePkg/Include/Ppi/ReadOnlyVariable2.h
@@ -2,7 +2,7 @@
This file declares Read-only Variable Service2 PPI.
This ppi permits read-only access to the UEFI variable store during the PEI phase.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -41,9 +41,10 @@ typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI
@param DataSize On entry, points to the size in bytes of the Data buffer.
On return, points to the size of the data returned in Data.
@param Data Points to the buffer which will hold the returned variable value.
+ May be NULL with a zero DataSize in order to determine the size of the buffer needed.
@retval EFI_SUCCESS The variable was read successfully.
- @retval EFI_NOT_FOUND The variable could not be found.
+ @retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data.
DataSize is updated with the size required for
the specified variable.
@@ -59,7 +60,7 @@ EFI_STATUS
IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes,
IN OUT UINTN *DataSize,
- OUT VOID *Data
+ OUT VOID *Data OPTIONAL
);
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
2017-06-21 9:49 [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable() Star Zeng
2017-06-21 9:49 ` [PATCH 1/2] MdePkg: " Star Zeng
@ 2017-06-21 9:49 ` Star Zeng
2017-06-21 12:11 ` [PATCH 0/2] " Gao, Liming
2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2017-06-21 9:49 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Liming Gao
PI 1.5 spec has minor update to the Data parameter for PEI
GetVariable(), and no real functional behavior change.
The modifier of Data parameter:
OUT VOID *Data
->
OUT VOID *Data OPTIONAL
The comments of Data parameter:
Data Points to the buffer which will hold the returned variable value.
->
Data Points to the buffer which will hold the returned variable value.
May be NULL with a zero DataSize in order to determine the size of the buffer needed.
The patch is to follow the spec to update the implementation.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
MdeModulePkg/Universal/Variable/Pei/Variable.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index a072c31e60e7..4060f4711dd0 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -947,9 +947,10 @@ FindVariable (
@param DataSize On entry, points to the size in bytes of the Data buffer.
On return, points to the size of the data returned in Data.
@param Data Points to the buffer which will hold the returned variable value.
+ May be NULL with a zero DataSize in order to determine the size of the buffer needed.
@retval EFI_SUCCESS The variable was read successfully.
- @retval EFI_NOT_FOUND The variable could not be found.
+ @retval EFI_NOT_FOUND The variable was be found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data.
DataSize is updated with the size required for
the specified variable.
@@ -965,7 +966,7 @@ PeiGetVariable (
IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes,
IN OUT UINTN *DataSize,
- OUT VOID *Data
+ OUT VOID *Data OPTIONAL
)
{
VARIABLE_POINTER_TRACK Variable;
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable()
2017-06-21 9:49 [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable() Star Zeng
2017-06-21 9:49 ` [PATCH 1/2] MdePkg: " Star Zeng
2017-06-21 9:49 ` [PATCH 2/2] MdeModulePkg: " Star Zeng
@ 2017-06-21 12:11 ` Gao, Liming
2 siblings, 0 replies; 4+ messages in thread
From: Gao, Liming @ 2017-06-21 12:11 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Zeng, Star
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star Zeng
> Sent: Wednesday, June 21, 2017 5:49 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable()
>
> They are to follow PI 1.5 spec.
>
> Star Zeng (2):
> MdePkg: Minor update to the Data parameter for PEI GetVariable()
> MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
>
> MdeModulePkg/Universal/Variable/Pei/Variable.c | 5 +++--
> MdePkg/Include/Ppi/ReadOnlyVariable2.h | 7 ++++---
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> --
> 2.7.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-21 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 9:49 [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable() Star Zeng
2017-06-21 9:49 ` [PATCH 1/2] MdePkg: " Star Zeng
2017-06-21 9:49 ` [PATCH 2/2] MdeModulePkg: " Star Zeng
2017-06-21 12:11 ` [PATCH 0/2] " Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox