2006-04-22 00:54:32 +02:00
|
|
|
/** @file
|
|
|
|
Private functions used by PCD PEIM.
|
|
|
|
|
|
|
|
Copyright (c) 2006, Intel Corporation
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
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: Service.h
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _SERVICE_H
|
|
|
|
#define _SERVICE_H
|
|
|
|
|
2006-05-26 13:00:44 +02:00
|
|
|
//
|
|
|
|
// Please make sure the PCD Serivce PEIM Version is consistent with
|
|
|
|
// the version of PCD Database generation tool
|
|
|
|
//
|
2006-06-23 06:30:23 +02:00
|
|
|
#define PCD_PEI_SERVICE_DRIVER_VERSION 2
|
2006-05-26 13:00:44 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h
|
|
|
|
// and generated by PCD Database generation tool.
|
|
|
|
//
|
|
|
|
#if (PCD_PEI_SERVICE_PEIM_VERSION != PCD_PEI_DATABASE_GENTOOL_VERSION)
|
|
|
|
#error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"
|
|
|
|
#endif
|
|
|
|
|
2006-04-22 00:54:32 +02:00
|
|
|
//
|
|
|
|
// PPI Interface Implementation Declaration.
|
|
|
|
//
|
2006-05-26 03:09:00 +02:00
|
|
|
VOID
|
2006-04-22 00:54:32 +02:00
|
|
|
EFIAPI
|
|
|
|
PeiPcdSetSku (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN SkuId
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT8
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet8 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT16
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet16 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet32 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT64
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet64 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetPtr (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetBool (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetSize (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT8
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet8Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT16
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet16Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet32Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT64
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGet64Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetPtrEx (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetBoolEx (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetSizeEx (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet8 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT8 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet16 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT16 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet32 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT32 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet64 (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT64 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSetPtr (
|
2006-07-06 08:10:20 +02:00
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN OUT UINTN *SizeOfBuffer,
|
|
|
|
IN VOID *Buffer
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSetBool (
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN BOOLEAN Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet8Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT8 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet16Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT16 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet32Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT32 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSet64Ex (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT64 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSetPtrEx (
|
2006-07-06 08:10:20 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN OUT UINTN *SizeOfBuffer,
|
|
|
|
IN VOID *Buffer
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdSetBoolEx (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-06-07 14:31:33 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN BOOLEAN Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
2006-05-29 03:48:32 +02:00
|
|
|
PeiRegisterCallBackOnSet (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-07-19 07:18:47 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_PPI_CALLBACK CallBackFunction
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PcdUnRegisterCallBackOnSet (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-07-19 07:18:47 +02:00
|
|
|
IN UINTN TokenNumber,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_PPI_CALLBACK CallBackFunction
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetNextToken (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-06-07 14:31:33 +02:00
|
|
|
IN OUT UINTN *TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
2006-05-24 10:16:20 +02:00
|
|
|
|
2006-06-23 16:41:16 +02:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PeiPcdGetNextTokenSpace (
|
|
|
|
IN CONST EFI_GUID **Guid
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
2006-07-06 13:42:25 +02:00
|
|
|
|
|
|
|
/* Internal Function definitions */
|
|
|
|
|
|
|
|
PEI_PCD_DATABASE *
|
|
|
|
GetPcdDatabase (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
SetValueWorker (
|
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN VOID *Data,
|
|
|
|
IN UINTN Size
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
SetWorker (
|
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN VOID *Data,
|
|
|
|
IN OUT UINTN *Size,
|
|
|
|
IN BOOLEAN PtrType
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
ExSetValueWorker (
|
|
|
|
IN UINTN ExTokenNumber,
|
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN VOID *Data,
|
|
|
|
IN UINTN Size
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
ExSetWorker (
|
|
|
|
IN UINTN ExTokenNumber,
|
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN VOID *Data,
|
|
|
|
IN OUT UINTN *Size,
|
|
|
|
IN BOOLEAN PtrType
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
GetWorker (
|
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN UINTN GetSize
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
ExGetWorker (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN UINTN ExTokenNumber,
|
|
|
|
IN UINTN GetSize
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINTN TokenNumber;
|
|
|
|
UINTN Size;
|
|
|
|
UINT32 LocalTokenNumberAlias;
|
|
|
|
} EX_PCD_ENTRY_ATTRIBUTE;
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
GetExPcdTokenNumber (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN UINTN ExTokenNumber
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
PeiRegisterCallBackWorker (
|
|
|
|
IN UINTN TokenNumber,
|
|
|
|
IN CONST GUID *Guid, OPTIONAL
|
|
|
|
IN PCD_PPI_CALLBACK CallBackFunction,
|
|
|
|
IN BOOLEAN Register
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VOID
|
|
|
|
BuildPcdDatabase (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
GetPtrTypeSize (
|
|
|
|
IN UINTN LocalTokenNumberTableIdx,
|
|
|
|
OUT UINTN *MaxSize,
|
|
|
|
IN PEI_PCD_DATABASE *Database
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
SetPtrTypeSize (
|
|
|
|
IN UINTN LocalTokenNumberTableIdx,
|
|
|
|
IN OUT UINTN *CurrentSize,
|
|
|
|
IN PEI_PCD_DATABASE *Database
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
extern EFI_GUID gPcdDataBaseHobGuid;
|
|
|
|
|
|
|
|
extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;
|
|
|
|
|
|
|
|
extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
|
|
|
|
2006-04-22 00:54:32 +02:00
|
|
|
#endif
|