audk/EdkModulePkg/Universal/PCD/Dxe/Service.h

419 lines
6.8 KiB
C

/** @file
Private functions used by PCD DXE driver.
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
//
// Please make sure the PCD Serivce PEIM Version is consistent with
// the version of PCD Database generation tool
//
#define PCD_DXE_SERVICE_DRIVER_VERSION 1
//
// PCD_DXE_DATABASE_GENTOOL_VERSION is defined in Autogen.h
// and generated by PCD Database generation tool.
//
#if (PCD_DXE_SERVICE_PEIM_VERSION != PCD_DXE_DATABASE_GENTOOL_VERSION)
#error "Please make sure the version of PCD Service DXE Driver and PCD DXE Database Generation Tool matches"
#endif
//
// Internal Functions
//
EFI_STATUS
SetWorker (
UINTN TokenNumber,
VOID *Data,
UINTN Size,
BOOLEAN PtrType
)
;
EFI_STATUS
ExSetWorker (
IN UINT32 ExTokenNumber,
IN CONST EFI_GUID *Guid,
VOID *Data,
UINTN Size,
BOOLEAN PtrType
)
;
VOID *
GetWorker (
UINTN TokenNumber
)
;
VOID *
ExGetWorker (
IN CONST EFI_GUID *Guid,
IN UINTN ExTokenNumber,
IN UINTN GetSize
)
;
UINT32
GetSkuEnabledTokenNumber (
UINT32 LocalTokenNumber,
UINTN Size,
BOOLEAN IsPeiDb
)
;
EFI_STATUS
GetHiiVariable (
IN EFI_GUID *VariableGuid,
IN UINT16 *VariableName,
OUT VOID ** VariableData,
OUT UINTN *VariableSize
)
;
EFI_STATUS
DxeRegisterCallBackWorker (
IN UINTN TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction,
IN BOOLEAN Reigster
);
EFI_STATUS
DxeGetNextTokenWorker (
IN OUT UINTN *Token,
IN CONST EFI_GUID *Guid OPTIONAL
);
VOID
BuildPcdDxeDataBase (
VOID
);
typedef struct {
UINTN TokenNumber;
UINTN Size;
UINT32 LocalTokenNumberAlias;
BOOLEAN IsPeiDb;
} EX_PCD_ENTRY_ATTRIBUTE;
VOID
GetExPcdTokenAttributes (
IN CONST EFI_GUID *Guid,
IN UINT32 ExTokenNumber,
OUT EX_PCD_ENTRY_ATTRIBUTE *ExAttr
)
;
//
// Protocol Interface function declaration.
//
VOID
EFIAPI
DxePcdSetSku (
IN SKU_ID SkuId
)
;
UINT8
EFIAPI
DxePcdGet8 (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT16
EFIAPI
DxePcdGet16 (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT32
EFIAPI
DxePcdGet32 (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT64
EFIAPI
DxePcdGet64 (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
VOID *
EFIAPI
DxePcdGetPtr (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
BOOLEAN
EFIAPI
DxePcdGetBool (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINTN
EFIAPI
DxePcdGetSize (
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT8
EFIAPI
DxePcdGet8Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT16
EFIAPI
DxePcdGet16Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT32
EFIAPI
DxePcdGet32Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINT64
EFIAPI
DxePcdGet64Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
VOID *
EFIAPI
DxePcdGetPtrEx (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
BOOLEAN
EFIAPI
DxePcdGetBoolEx (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
UINTN
EFIAPI
DxePcdGetSizeEx (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber
)
;
EFI_STATUS
EFIAPI
DxePcdSet8 (
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet16 (
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet32 (
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet64 (
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSetPtr (
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
;
EFI_STATUS
EFIAPI
DxePcdSetBool (
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet8Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet16Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet32Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSet64Ex (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
;
EFI_STATUS
EFIAPI
DxePcdSetPtrEx (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
;
EFI_STATUS
EFIAPI
DxePcdSetBoolEx (
IN CONST EFI_GUID *Guid,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
;
EFI_STATUS
EFIAPI
PcdRegisterCallBackOnSet (
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
)
;
EFI_STATUS
EFIAPI
PcdUnRegisterCallBackOnSet (
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
)
;
EFI_STATUS
EFIAPI
DxePcdGetNextToken (
IN CONST EFI_GUID *Guid, OPTIONAL
IN OUT PCD_TOKEN_NUMBER *TokenNumber
)
;
EFI_STATUS
SetWorkerByLocalTokenNumber (
UINT32 LocalTokenNumber,
VOID *Data,
UINTN Size,
BOOLEAN PtrType,
BOOLEAN IsPeiDb
)
;
extern EFI_GUID gPcdDataBaseHobGuid;
extern PCD_DATABASE * gPcdDatabase;
extern DXE_PCD_DATABASE_INIT gDXEPcdDbInit;
#endif