Re-defined PCD_INVALID_TOKEN_NUMBER in header files of PCD Ppi&Protocol, since it will be added into PCD Spec. Removed PCD_INVALID_TOKEN_NUMBER from Pcd Library class, since it wasn't defined in MDE Spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6164 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h
index 6298ce8..13d574f 100644
--- a/MdePkg/Include/Library/PcdLib.h
+++ b/MdePkg/Include/Library/PcdLib.h
@@ -23,7 +23,6 @@
#ifndef __PCD_LIB_H__
#define __PCD_LIB_H__
-#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)
#define PCD_MAX_SKU_ID 0x100
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
diff --git a/MdePkg/Include/Ppi/Pcd.h b/MdePkg/Include/Ppi/Pcd.h
index 18c047b..73f027b 100644
--- a/MdePkg/Include/Ppi/Pcd.h
+++ b/MdePkg/Include/Ppi/Pcd.h
@@ -18,6 +18,8 @@
#define PCD_PPI_GUID \
{ 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }
+#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)
+
/**
Sets the SKU value for subsequent calls to set or get PCD token values.
@@ -205,7 +207,7 @@
UINT8
(EFIAPI *PCD_PPI_GET_EX_8)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -228,7 +230,7 @@
UINT16
(EFIAPI *PCD_PPI_GET_EX_16)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -251,7 +253,7 @@
UINT32
(EFIAPI *PCD_PPI_GET_EX_32)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -274,7 +276,7 @@
UINT64
(EFIAPI *PCD_PPI_GET_EX_64)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -297,7 +299,7 @@
VOID *
(EFIAPI *PCD_PPI_GET_EX_POINTER)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -320,7 +322,7 @@
BOOLEAN
(EFIAPI *PCD_PPI_GET_EX_BOOLEAN)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -341,7 +343,7 @@
UINTN
(EFIAPI *PCD_PPI_GET_EX_SIZE)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
@@ -448,9 +450,6 @@
IN UINT64 Value
);
-
-
-
/**
Sets a value of a specified size for a given PCD token.
@@ -459,7 +458,7 @@
If it is not, an error will be returned.
@param[in] TokenNumber The PCD token number.
- @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
+ @param[in, out] SizeOfValue A pointer to the length of the value being set for the PCD token.
On input, if the SizeOfValue is greater than the maximum size supported
for this TokenNumber then the output value of SizeOfValue will reflect
the maximum size supported for this TokenNumber.
@@ -476,17 +475,9 @@
EFI_STATUS
(EFIAPI *PCD_PPI_SET_POINTER)(
IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
+ IN OUT UINTN *SizeOfValue,
IN VOID *Buffer
);
-///EFI_STATUS
-///(EFIAPI *PCD_PPI_SET_POINTER) (
-///IN PCD_TOKEN_NUMBER TokenNumber,
-///IN UINTN SizeOfValue,
-///IN VOID *Buffer
-/// );
-
-
/**
Sets an Boolean value for a given PCD token.
@@ -536,8 +527,8 @@
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_8)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT8 Value
+ IN UINTN TokenNumber,
+ IN UINT8 Value
);
@@ -564,8 +555,8 @@
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_16)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT16 Value
+ IN UINTN TokenNumber,
+ IN UINT16 Value
);
@@ -592,8 +583,8 @@
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_32)(
IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT32 Value
+ IN UINTN TokenNumber,
+ IN UINT32 Value
);
@@ -619,9 +610,9 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_64)(
- IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT64 Value
+ IN CONST EFI_GUID *Guid,
+ IN UINTN TokenNumber,
+ IN UINT64 Value
);
@@ -635,7 +626,7 @@
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
- @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
+ @param[in, out] SizeOfValue A pointer to the length of the value being set for the PCD token.
On input, if the SizeOfValue is greater than the maximum size supported
for this TokenNumber then the output value of SizeOfValue will reflect
the maximum size supported for this TokenNumber.
@@ -651,21 +642,11 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_POINTER)(
- IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN VOID *Buffer
+ IN CONST EFI_GUID *Guid,
+ IN UINTN TokenNumber,
+ IN OUT UINTN *SizeOfValue,
+ IN VOID *Buffer
);
-/// different with PCD Spec 0.54
-///EFI_STATUS
-///(EFIAPI *PCD_PPI_SET_EX_POINTER) (
-/// IN CONST EFI_GUID *Guid,
-/// IN PCD_TOKEN_NUMBER TokenNumber,
-/// IN UINTN SizeOfValue,
-/// IN VOID *Buffer
-/// );
-///
-
/**
Sets an Boolean value for a given PCD token.
@@ -688,9 +669,9 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_BOOLEAN)(
- IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN BOOLEAN Value
+ IN CONST EFI_GUID *Guid,
+ IN UINTN TokenNumber,
+ IN BOOLEAN Value
);
@@ -716,10 +697,10 @@
typedef
VOID
(EFIAPI *PCD_PPI_CALLBACK)(
- IN CONST EFI_GUID *CallBackGuid, OPTIONAL
- IN UINTN CallBackToken,
- IN OUT VOID *TokenData,
- IN UINTN TokenDataSize
+ IN CONST EFI_GUID *CallBackGuid, OPTIONAL
+ IN UINTN CallBackToken,
+ IN OUT VOID *TokenData,
+ IN UINTN TokenDataSize
);
@@ -739,9 +720,9 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_CALLBACK_ONSET)(
- IN CONST EFI_GUID *Guid, OPTIONAL
- IN UINTN TokenNumber,
- IN PCD_PPI_CALLBACK CallBackFunction
+ IN CONST EFI_GUID *Guid, OPTIONAL
+ IN UINTN TokenNumber,
+ IN PCD_PPI_CALLBACK CallBackFunction
);
@@ -761,9 +742,9 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_CANCEL_CALLBACK)(
- IN CONST EFI_GUID *Guid, OPTIONAL
- IN UINTN TokenNumber,
- IN PCD_PPI_CALLBACK CallBackFunction
+ IN CONST EFI_GUID *Guid, OPTIONAL
+ IN UINTN TokenNumber,
+ IN PCD_PPI_CALLBACK CallBackFunction
);
@@ -793,7 +774,7 @@
EFI_STATUS
(EFIAPI *PCD_PPI_GET_NEXT_TOKEN)(
IN CONST EFI_GUID *Guid, OPTIONAL
- IN OUT UINTN *TokenNumber
+ IN OUT UINTN *TokenNumber
);
diff --git a/MdePkg/Include/Protocol/Pcd.h b/MdePkg/Include/Protocol/Pcd.h
index aa67dd5..40e4364 100644
--- a/MdePkg/Include/Protocol/Pcd.h
+++ b/MdePkg/Include/Protocol/Pcd.h
@@ -20,6 +20,9 @@
#define PCD_PROTOCOL_GUID \
{ 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7 } }
+#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)
+
+
/**
Sets the SKU value for subsequent calls to set or get PCD token values.
@@ -645,10 +648,10 @@
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_POINTER)(
- IN CONST EFI_GUID *Guid,
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN VOID *Buffer
+ IN CONST EFI_GUID *Guid,
+ IN UINTN TokenNumber,
+ IN OUT UINTN *SizeOfBuffer,
+ IN VOID *Buffer
);
@@ -703,10 +706,10 @@
typedef
VOID
(EFIAPI *PCD_PROTOCOL_CALLBACK)(
- IN CONST EFI_GUID *CallBackGuid, OPTIONAL
- IN UINTN CallBackToken,
- IN OUT VOID *TokenData,
- IN UINTN TokenDataSize
+ IN CONST EFI_GUID *CallBackGuid, OPTIONAL
+ IN UINTN CallBackToken,
+ IN OUT VOID *TokenData,
+ IN UINTN TokenDataSize
);