Beispiel #1
0
EFIAPI
LibPcdSetPtr (
  IN        UINTN             TokenNumber,
  IN OUT    UINTN             *SizeOfBuffer,
  IN CONST  VOID              *Buffer
  )
{
  EFI_STATUS Status;
  UINTN      InputSizeOfBuffer;

  ASSERT (SizeOfBuffer != NULL);

  if (*SizeOfBuffer > 0) {
    ASSERT (Buffer != NULL);
  }

  InputSizeOfBuffer = *SizeOfBuffer;
  Status = GetPcdProtocol()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer);
  if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) {
    return NULL;
  }
  ASSERT_EFI_ERROR (Status);

  return (VOID *)Buffer;
}
Beispiel #2
0
EFIAPI
LibPcdGetPtr (
  IN UINTN             TokenNumber
  )
{
  return GetPcdProtocol()->GetPtr (TokenNumber);
}
Beispiel #3
0
/**
  This function provides a means by which to retrieve a value for a given PCD token.
  
  Returns the Boolean value of the token specified by TokenNumber. 

  @param[in]  TokenNumber The PCD token number to retrieve a current value for.

  @return Returns the Boolean value of the token specified by TokenNumber. 

**/
BOOLEAN 
EFIAPI
LibPcdGetBool (
  IN UINTN             TokenNumber
  )
{
  return GetPcdProtocol()->GetBool (TokenNumber);
}
Beispiel #4
0
/**
  This function provides a means by which to set a value for a given PCD token.

  Sets the 64-bit value for the token specified by TokenNumber
  to the value specified by Value.

  @param[in] TokenNumber    The PCD token number to set a current value for.
  @param[in] Value          The 64-bit value to set.

  @return The status of the set operation.

**/
RETURN_STATUS
EFIAPI
LibPcdSet64S (
  IN UINTN          TokenNumber,
  IN UINT64         Value
  )
{
  return GetPcdProtocol()->Set64 (TokenNumber, Value);
}
Beispiel #5
0
/**
  This function provides a means by which to set a value for a given PCD token.

  Sets the boolean value for the token specified by TokenNumber
  to the value specified by Value.

  @param[in] TokenNumber    The PCD token number to set a current value for.
  @param[in] Value          The boolean value to set.

  @return The status of the set operation.

**/
RETURN_STATUS
EFIAPI
LibPcdSetBoolS (
  IN UINTN          TokenNumber,
  IN BOOLEAN        Value
  )
{
  return GetPcdProtocol()->SetBool (TokenNumber, Value);
}
Beispiel #6
0
/**
  This function provides a means by which SKU support can be established in the PCD infrastructure.

  Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.

  @param  SkuId   The SKU value that will be used when the PCD service retrieves and sets values
                  associated with a PCD token.

  @return  Return the SKU ID that just be set.

**/
UINTN
EFIAPI
LibPcdSetSku (
  IN UINTN   SkuId
  )
{
  GetPcdProtocol()->SetSku (SkuId);

  return SkuId;
}
Beispiel #7
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the Boolean value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.

  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The boolean value to set.

  @return Return the value that was set.

**/
BOOLEAN
EFIAPI
LibPcdSetBool (
  IN UINTN             TokenNumber,
  IN BOOLEAN           Value
  )
{
  GetPcdProtocol()->SetBool (TokenNumber, Value);

  return Value;
}
Beispiel #8
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the 64-bit value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.
  
  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The 64-bit value to set.

  @return Return the value that was set.

**/
UINT64
EFIAPI
LibPcdSet64 (
  IN UINTN             TokenNumber,
  IN UINT64            Value
  )
{
  GetPcdProtocol()->Set64 (TokenNumber, Value);

  return Value;
}
Beispiel #9
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the 32-bit value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.

  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The 32-bit value to set.

  @return Return the value that was set.

**/
UINT32
EFIAPI
LibPcdSet32 (
  IN UINTN             TokenNumber,
  IN UINT32            Value
  )
{
  GetPcdProtocol()->Set32 (TokenNumber, Value);

  return Value;
}
Beispiel #10
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the 16-bit value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.

  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The 16-bit value to set.

  @return Return the value that was set.

**/
UINT16
EFIAPI
LibPcdSet16 (
  IN UINTN             TokenNumber,
  IN UINT16            Value
  )
{
  GetPcdProtocol()->Set16 (TokenNumber, Value);
  
  return Value;
}
Beispiel #11
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the 8-bit value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.

  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The 8-bit value to set.

  @return Return the value that was set.

**/
UINT8
EFIAPI
LibPcdSet8 (
  IN UINTN             TokenNumber,
  IN UINT8             Value
  )
{
  GetPcdProtocol()->Set8 (TokenNumber, Value);
  
  return Value;
}
Beispiel #12
0
/**
  This function provides a means by which SKU support can be established in the PCD infrastructure.

  Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.
  If SkuId >= PCD_MAX_SKU_ID, then ASSERT(). 

  @param  SkuId   The SKU value that will be used when the PCD service retrieves and sets values
                  associated with a PCD token.

  @return  Return the SKU ID that just be set.

**/
UINTN
EFIAPI
LibPcdSetSku (
  IN UINTN   SkuId
  )
{
  ASSERT (SkuId < PCD_MAX_SKU_ID);

  GetPcdProtocol()->SetSku (SkuId);

  return SkuId;
}
Beispiel #13
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the Boolean value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.
  
  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The boolean value to set.

  @return Return the value that was set.

**/
BOOLEAN
EFIAPI
LibPcdSetBool (
  IN UINTN             TokenNumber,
  IN BOOLEAN           Value
  )
{
  EFI_STATUS Status;

  Status = GetPcdProtocol()->SetBool (TokenNumber, Value);
  ASSERT_EFI_ERROR (Status);

  return Value;
}
Beispiel #14
0
/**
  This function provides a means by which to set a value for a given PCD token.
  
  Sets the 64-bit value for the token specified by TokenNumber 
  to the value specified by Value.  Value is returned.
  
  @param[in]  TokenNumber   The PCD token number to set a current value for.
  @param[in]  Value         The 64-bit value to set.

  @return Return the value that was set.

**/
UINT64
EFIAPI
LibPcdSet64 (
  IN UINTN             TokenNumber,
  IN UINT64            Value
  )
{
  EFI_STATUS Status;

  Status = GetPcdProtocol()->Set64 (TokenNumber, Value);
  ASSERT_EFI_ERROR (Status);

  return Value;
}
Beispiel #15
0
/**
  This function provides a means by which to set a value for a given PCD token.

  Sets a buffer for the token specified by TokenNumber to the value specified
  by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size
  support by TokenNumber, then set SizeOfBuffer to the maximum size supported by
  TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation
  was not actually performed.

  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
  maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned.

  If SizeOfBuffer is NULL, then ASSERT().
  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().

  @param[in]      TokenNumber   The PCD token number to set a current value for.
  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.
  @param[in]      Buffer        A pointer to the buffer to set.

  @return The status of the set operation.

**/
RETURN_STATUS
EFIAPI
LibPcdSetPtrS (
  IN       UINTN    TokenNumber,
  IN OUT   UINTN    *SizeOfBuffer,
  IN CONST VOID     *Buffer
  )
{
  ASSERT (SizeOfBuffer != NULL);

  if (*SizeOfBuffer > 0) {
    ASSERT (Buffer != NULL);
  }

  return GetPcdProtocol()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer);
}