X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FPpi%2FPcd.h;h=d5cc3b59dbcac3aae07d0dad07c2cd7c4f62f330;hb=11227adb144cd32be11d3e3064876ea1a8992665;hp=e2cde6878bc5f312e2f3de7c8afad435ee0be623;hpb=5879b8754ac3c2e7a141bac79f6b2391e6ac0441;p=mirror_edk2.git diff --git a/MdePkg/Include/Ppi/Pcd.h b/MdePkg/Include/Ppi/Pcd.h index e2cde6878b..d5cc3b59db 100644 --- a/MdePkg/Include/Ppi/Pcd.h +++ b/MdePkg/Include/Ppi/Pcd.h @@ -1,4 +1,4 @@ -/* @file +/** @file Platform Configuration Database (PCD) PPI Copyright (c) 2006 - 2007, Intel Corporation @@ -10,13 +10,12 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: Pcd.h - **/ #ifndef __PCD_PPI_H__ #define __PCD_PPI_H__ +#include #define PCD_PPI_GUID \ { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } } @@ -50,7 +49,7 @@ **/ typedef VOID -(EFIAPI *PCD_PPI_SET_SKU) ( +(EFIAPI *PCD_PPI_SET_SKU)( IN UINTN SkuId ); @@ -69,7 +68,7 @@ VOID **/ typedef UINT8 -(EFIAPI *PCD_PPI_GET8) ( +(EFIAPI *PCD_PPI_GET8)( IN UINTN TokenNumber ); @@ -88,7 +87,7 @@ UINT8 **/ typedef UINT16 -(EFIAPI *PCD_PPI_GET16) ( +(EFIAPI *PCD_PPI_GET16)( IN UINTN TokenNumber ); @@ -107,7 +106,7 @@ UINT16 **/ typedef UINT32 -(EFIAPI *PCD_PPI_GET32) ( +(EFIAPI *PCD_PPI_GET32)( IN UINTN TokenNumber ); @@ -126,7 +125,7 @@ UINT32 **/ typedef UINT64 -(EFIAPI *PCD_PPI_GET64) ( +(EFIAPI *PCD_PPI_GET64)( IN UINTN TokenNumber ); @@ -147,7 +146,7 @@ UINT64 **/ typedef VOID * -(EFIAPI *PCD_PPI_GET_POINTER) ( +(EFIAPI *PCD_PPI_GET_POINTER)( IN UINTN TokenNumber ); @@ -168,7 +167,7 @@ VOID * **/ typedef BOOLEAN -(EFIAPI *PCD_PPI_GET_BOOLEAN) ( +(EFIAPI *PCD_PPI_GET_BOOLEAN)( IN UINTN TokenNumber ); @@ -187,14 +186,14 @@ BOOLEAN **/ typedef UINTN -(EFIAPI *PCD_PPI_GET_SIZE) ( +(EFIAPI *PCD_PPI_GET_SIZE)( IN UINTN TokenNumber ); /** - Retrieves an 8-bit value for a given PCD token. + Retrieves an 8-bit value for a given PCD token and token space. Retrieves the 8-bit value of a particular PCD token. If the TokenNumber is invalid or the token space @@ -209,7 +208,7 @@ UINTN **/ typedef UINT8 -(EFIAPI *PCD_PPI_GET_EX_8) ( +(EFIAPI *PCD_PPI_GET_EX_8)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -217,7 +216,7 @@ UINT8 /** - Retrieves an 16-bit value for a given PCD token. + Retrieves an 16-bit value for a given PCD token and token space. Retrieves the 16-bit value of a particular PCD token. If the TokenNumber is invalid or the token space @@ -232,7 +231,7 @@ UINT8 **/ typedef UINT16 -(EFIAPI *PCD_PPI_GET_EX_16) ( +(EFIAPI *PCD_PPI_GET_EX_16)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -240,7 +239,7 @@ UINT16 /** - Retrieves an 32-bit value for a given PCD token. + Retrieves an 32-bit value for a given PCD token and token space. Retrieves the 32-bit value of a particular PCD token. If the TokenNumber is invalid or the token space @@ -255,7 +254,7 @@ UINT16 **/ typedef UINT32 -(EFIAPI *PCD_PPI_GET_EX_32) ( +(EFIAPI *PCD_PPI_GET_EX_32)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -263,7 +262,7 @@ UINT32 /** - Retrieves an 64-bit value for a given PCD token. + Retrieves an 64-bit value for a given PCD token and token space. Retrieves the 64-bit value of a particular PCD token. If the TokenNumber is invalid or the token space @@ -278,7 +277,7 @@ UINT32 **/ typedef UINT64 -(EFIAPI *PCD_PPI_GET_EX_64) ( +(EFIAPI *PCD_PPI_GET_EX_64)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -286,7 +285,7 @@ UINT64 /** - Retrieves a pointer to a value for a given PCD token. + Retrieves a pointer to a value for a given PCD token and token space. Retrieves the current pointer to the buffer for a PCD token number. Do not make any assumptions about the alignment of the pointer that @@ -301,7 +300,7 @@ UINT64 **/ typedef VOID * -(EFIAPI *PCD_PPI_GET_EX_POINTER) ( +(EFIAPI *PCD_PPI_GET_EX_POINTER)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -309,7 +308,7 @@ VOID * /** - Retrieves an Boolean value for a given PCD token. + Retrieves an Boolean value for a given PCD token and token space. Retrieves the Boolean value of a particular PCD token. If the TokenNumber is invalid or the token space @@ -324,7 +323,7 @@ VOID * **/ typedef BOOLEAN -(EFIAPI *PCD_PPI_GET_EX_BOOLEAN) ( +(EFIAPI *PCD_PPI_GET_EX_BOOLEAN)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -332,7 +331,7 @@ BOOLEAN /** - Retrieves the size of the value for a given PCD token. + Retrieves the size of the value for a given PCD token and token space. Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. @@ -345,7 +344,7 @@ BOOLEAN **/ typedef UINTN -(EFIAPI *PCD_PPI_GET_EX_SIZE) ( +(EFIAPI *PCD_PPI_GET_EX_SIZE)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber ); @@ -371,7 +370,7 @@ UINTN **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET8) ( +(EFIAPI *PCD_PPI_SET8)( IN UINTN TokenNumber, IN UINT8 Value ); @@ -397,7 +396,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET16) ( +(EFIAPI *PCD_PPI_SET16)( IN UINTN TokenNumber, IN UINT16 Value ); @@ -423,7 +422,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET32) ( +(EFIAPI *PCD_PPI_SET32)( IN UINTN TokenNumber, IN UINT32 Value ); @@ -449,7 +448,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET64) ( +(EFIAPI *PCD_PPI_SET64)( IN UINTN TokenNumber, IN UINT64 Value ); @@ -480,7 +479,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_POINTER) ( +(EFIAPI *PCD_PPI_SET_POINTER)( IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN VOID *Buffer @@ -507,7 +506,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_BOOLEAN) ( +(EFIAPI *PCD_PPI_SET_BOOLEAN)( IN UINTN TokenNumber, IN BOOLEAN Value ); @@ -534,7 +533,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_8) ( +(EFIAPI *PCD_PPI_SET_EX_8)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT8 Value @@ -562,7 +561,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_16) ( +(EFIAPI *PCD_PPI_SET_EX_16)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT16 Value @@ -590,7 +589,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_32) ( +(EFIAPI *PCD_PPI_SET_EX_32)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT32 Value @@ -618,7 +617,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_64) ( +(EFIAPI *PCD_PPI_SET_EX_64)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT64 Value @@ -650,7 +649,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_POINTER) ( +(EFIAPI *PCD_PPI_SET_EX_POINTER)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, @@ -679,7 +678,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_SET_EX_BOOLEAN) ( +(EFIAPI *PCD_PPI_SET_EX_BOOLEAN)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN BOOLEAN Value @@ -707,7 +706,7 @@ EFI_STATUS **/ typedef VOID -(EFIAPI *PCD_PPI_CALLBACK) ( +(EFIAPI *PCD_PPI_CALLBACK)( IN CONST EFI_GUID *CallBackGuid, OPTIONAL IN UINTN CallBackToken, IN OUT VOID *TokenData, @@ -730,7 +729,7 @@ VOID **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_CALLBACK_ONSET) ( +(EFIAPI *PCD_PPI_CALLBACK_ONSET)( IN CONST EFI_GUID *Guid, OPTIONAL IN UINTN TokenNumber, IN PCD_PPI_CALLBACK CallBackFunction @@ -752,7 +751,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_CANCEL_CALLBACK) ( +(EFIAPI *PCD_PPI_CANCEL_CALLBACK)( IN CONST EFI_GUID *Guid, OPTIONAL IN UINTN TokenNumber, IN PCD_PPI_CALLBACK CallBackFunction @@ -780,7 +779,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_GET_NEXT_TOKEN) ( +(EFIAPI *PCD_PPI_GET_NEXT_TOKEN)( IN CONST EFI_GUID *Guid, OPTIONAL IN OUT UINTN *TokenNumber ); @@ -811,7 +810,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE) ( +(EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE)( IN OUT CONST EFI_GUID **Guid ); @@ -820,6 +819,104 @@ EFI_STATUS // // Interface structure for the PCD PPI // +/** + @par Ppi Description: + This service abstracts the ability to set/get Platform Configuration Database (PCD). + + @param SetSku + Sets the SKU value for subsequent calls to set or get PCD token values. + + @param Get8 + Retrieves an 8-bit value for a given PCD token. + + @param Get16 + Retrieves an 16-bit value for a given PCD token. + + @param Get32 + Retrieves an 32-bit value for a given PCD token. + + @param Get64 + Retrieves an 64-bit value for a given PCD token. + + @param GetPtr + Retrieves a pointer to a value for a given PCD token. + + @param GetBool + Retrieves an Boolean value for a given PCD token. + + @param GetSize + Retrieves the size of the value for a given PCD token. + + @param Get8Ex + Retrieves an 8-bit value for a given PCD token and token space. + + @param Get16Ex + Retrieves an 16-bit value for a given PCD token and token space. + + @param Get32Ex + Retrieves an 32-bit value for a given PCD token and token space. + + @param Get64Ex + Retrieves an 64-bit value for a given PCD token and token space. + + @param GetPtrEx + Retrieves a pointer to a value for a given PCD token and token space. + + @param GetBoolEx + Retrieves an Boolean value for a given PCD token and token space. + + @param GetSizeEx + Retrieves the size of the value for a given PCD token and token space. + + @param Set8 + Sets an 8-bit value for a given PCD token. + + @param Set16 + Sets an 16-bit value for a given PCD token. + + @param Set32 + Sets an 32-bit value for a given PCD token. + + @param Set64 + Sets an 64-bit value for a given PCD token. + + @param SetPtr + Sets the buffer of a specified size for a given PCD token. + + @param SetBool + Sets an Boolean value for a given PCD token. + + @param Set8Ex + Sets an 8-bit value for a given PCD token and token space. + + @param Set16Ex + Sets an 16-bit value for a given PCD token and token space. + + @param Set32Ex + Sets an 32-bit value for a given PCD token and token space. + + @param Set64Ex + Sets an 64-bit value for a given PCD token and token space. + + @param SetPtrEx + Sets the buffer of a specified size for a given PCD token and token space. + + @param SetBoolEx + Sets an Boolean value for a given PCD token and token space. + + @param CallbackOnSet + Specifies a function to be called anytime the value of a designated token is changed. + + @param CancelCallback + Cancels a previously set callback function for a particular PCD token number. + + @param GetNextToken + Retrieves the next valid PCD token for a given namespace. + + @param GetNextTokenSpace + Retrieves the next valid PCD token namespace for a given namespace. + +**/ typedef struct { PCD_PPI_SET_SKU SetSku;