2006-04-22 00:54:32 +02:00
|
|
|
/** @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
|
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
//
|
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-05-24 10:16:20 +02:00
|
|
|
//
|
2006-05-26 13:00:44 +02:00
|
|
|
#define PCD_DXE_SERVICE_DRIVER_VERSION 1
|
2006-05-24 10:16:20 +02:00
|
|
|
|
|
|
|
//
|
2006-05-26 13:00:44 +02:00
|
|
|
// PCD_DXE_DATABASE_GENTOOL_VERSION is defined in Autogen.h
|
|
|
|
// and generated by PCD Database generation tool.
|
2006-05-24 10:16:20 +02:00
|
|
|
//
|
2006-05-26 13:00:44 +02:00
|
|
|
#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"
|
2006-05-24 10:16:20 +02:00
|
|
|
#endif
|
|
|
|
|
2006-05-29 03:48:32 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LIST_ENTRY Node;
|
|
|
|
PCD_PROTOCOL_CALLBACK CallbackFn;
|
|
|
|
} CALLBACK_FN_ENTRY;
|
|
|
|
|
|
|
|
#define CR_FNENTRY_FROM_LISTNODE(Record, Type, Field) _CR(Record, Type, Field)
|
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
//
|
|
|
|
// Internal Functions
|
|
|
|
//
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
SetWorker (
|
2006-05-29 12:42:13 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
IN VOID *Data,
|
|
|
|
IN UINTN Size,
|
|
|
|
IN BOOLEAN PtrType
|
2006-05-24 10:16:20 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
ExSetWorker (
|
2006-05-29 12:42:13 +02:00
|
|
|
IN PCD_TOKEN_NUMBER ExTokenNumber,
|
2006-05-24 10:16:20 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
VOID *Data,
|
|
|
|
UINTN Size,
|
|
|
|
BOOLEAN PtrType
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
GetWorker (
|
2006-05-29 14:56:03 +02:00
|
|
|
PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
UINTN GetSize
|
2006-05-24 10:16:20 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
ExGetWorker (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-29 12:42:13 +02:00
|
|
|
IN PCD_TOKEN_NUMBER ExTokenNumber,
|
2006-05-24 10:16:20 +02:00
|
|
|
IN UINTN GetSize
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
GetSkuEnabledTokenNumber (
|
|
|
|
UINT32 LocalTokenNumber,
|
|
|
|
UINTN Size,
|
|
|
|
BOOLEAN IsPeiDb
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
GetHiiVariable (
|
|
|
|
IN EFI_GUID *VariableGuid,
|
|
|
|
IN UINT16 *VariableName,
|
2006-05-29 12:42:13 +02:00
|
|
|
OUT VOID **VariableData,
|
2006-05-24 10:16:20 +02:00
|
|
|
OUT UINTN *VariableSize
|
|
|
|
)
|
|
|
|
;
|
2006-04-22 00:54:32 +02:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
DxeRegisterCallBackWorker (
|
2006-05-29 12:42:13 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-05-29 03:48:32 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
|
|
|
IN PCD_PROTOCOL_CALLBACK CallBackFunction
|
2006-04-22 00:54:32 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
EFI_STATUS
|
2006-05-29 03:48:32 +02:00
|
|
|
DxeUnRegisterCallBackWorker (
|
2006-05-29 12:42:13 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-05-29 03:48:32 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
|
|
|
IN PCD_PROTOCOL_CALLBACK CallBackFunction
|
|
|
|
);
|
2006-04-22 00:54:32 +02:00
|
|
|
|
|
|
|
VOID
|
2006-05-24 10:16:20 +02:00
|
|
|
BuildPcdDxeDataBase (
|
2006-04-22 00:54:32 +02:00
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
|
2006-05-29 14:56:03 +02:00
|
|
|
PCD_TOKEN_NUMBER
|
|
|
|
GetExPcdTokenNumber (
|
2006-05-24 10:16:20 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-29 14:56:03 +02:00
|
|
|
IN PCD_TOKEN_NUMBER ExTokenNumber
|
2006-05-24 10:16:20 +02:00
|
|
|
)
|
|
|
|
;
|
2006-04-22 00:54:32 +02:00
|
|
|
//
|
|
|
|
// Protocol Interface function declaration.
|
|
|
|
//
|
2006-05-26 03:09:00 +02:00
|
|
|
VOID
|
2006-04-22 00:54:32 +02:00
|
|
|
EFIAPI
|
|
|
|
DxePcdSetSku (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN SKU_ID SkuId
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT8
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet8 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT16
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet16 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet32 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT64
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet64 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetPtr (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetBool (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetSize (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT8
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet8Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT16
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet16Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet32Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UINT64
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGet64Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VOID *
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetPtrEx (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetBoolEx (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetSizeEx (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet8 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT8 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet16 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT16 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet32 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT32 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet64 (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT64 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSetPtr (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
IN UINTN SizeOfBuffer,
|
|
|
|
IN VOID *Buffer
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSetBool (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN BOOLEAN Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet8Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT8 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet16Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT16 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet32Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT32 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSet64Ex (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN UINT64 Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSetPtrEx (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
IN UINTN SizeOfBuffer,
|
|
|
|
IN VOID *Buffer
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdSetBoolEx (
|
2006-05-29 03:48:32 +02:00
|
|
|
IN CONST EFI_GUID *Guid,
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-04-22 00:54:32 +02:00
|
|
|
IN BOOLEAN Value
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
2006-05-29 03:48:32 +02:00
|
|
|
DxeRegisterCallBackOnSet (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
2006-05-29 03:48:32 +02:00
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-04-22 00:54:32 +02:00
|
|
|
IN PCD_PROTOCOL_CALLBACK CallBackFunction
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
2006-05-29 03:48:32 +02:00
|
|
|
DxeUnRegisterCallBackOnSet (
|
2006-05-26 03:09:00 +02:00
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-04-22 00:54:32 +02:00
|
|
|
IN PCD_PROTOCOL_CALLBACK CallBackFunction
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
DxePcdGetNextToken (
|
|
|
|
IN CONST EFI_GUID *Guid, OPTIONAL
|
2006-05-26 03:09:00 +02:00
|
|
|
IN OUT PCD_TOKEN_NUMBER *TokenNumber
|
2006-04-22 00:54:32 +02:00
|
|
|
)
|
|
|
|
;
|
|
|
|
|
2006-05-29 03:48:32 +02:00
|
|
|
PCD_TOKEN_NUMBER
|
|
|
|
ExGetNextTokeNumber (
|
|
|
|
IN CONST EFI_GUID *Guid,
|
|
|
|
IN PCD_TOKEN_NUMBER TokenNumber,
|
|
|
|
IN EFI_GUID *GuidTable,
|
|
|
|
IN UINTN SizeOfGuidTable,
|
|
|
|
IN DYNAMICEX_MAPPING *ExMapTable,
|
|
|
|
IN UINTN SizeOfExMapTable
|
|
|
|
)
|
|
|
|
;
|
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
extern EFI_GUID gPcdDataBaseHobGuid;
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-05-29 03:48:32 +02:00
|
|
|
extern PCD_DATABASE * mPcdDatabase;
|
2006-04-22 00:54:32 +02:00
|
|
|
|
2006-05-24 10:16:20 +02:00
|
|
|
extern DXE_PCD_DATABASE_INIT gDXEPcdDbInit;
|
2006-04-22 00:54:32 +02:00
|
|
|
|
|
|
|
#endif
|