$ vi UefiLessonsPkg/PCDLesson/PCDLesson.c
---
Print(L"PcdFeatureFlag=%d\n", FeaturePcdGet(PcdFeatureFlag));
Print(L"PcdFeatureFlag=%d\n", PcdGetBool(PcdFeatureFlag));
빌드를 하기 이전에 AutoGen.h 모듈을 체크해보면 다음과 같은 코드를 확인할 수 있다.
#define _PCD_TOKEN_PcdFeatureFlag 0U
#define _PCD_SIZE_PcdFeatureFlag 1
#define _PCD_GET_MODE_SIZE_PcdFeatureFlag _PCD_SIZE_PcdFeatureFlag
#define _PCD_VALUE_PcdFeatureFlag ((BOOLEAN)1U)
extern const BOOLEAN _gPcd_FixedAtBuild_PcdFeatureFlag;
#define _PCD_GET_MODE_BOOL_PcdFeatureFlag _gPcd_FixedAtBuild_PcdFeatureFlag
//#define _PCD_SET_MODE_BOOL_PcdFeatureFlag ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD
$ cat Build/UefiLessonsPkg/RELEASE_GCC5/X64/UefiLessonsPkg/PCDLesson/PCDLesson/DEBUG/AutoGen.h
---
#define _PCD_TOKEN_PcdBool 0U
#define _PCD_SIZE_PcdBool 1
#define _PCD_GET_MODE_SIZE_PcdBool _PCD_SIZE_PcdBool
#define _PCD_VALUE_PcdBool 1U
extern const BOOLEAN _gPcd_FixedAtBuild_PcdBool;
#define _PCD_GET_MODE_BOOL_PcdBool _gPcd_FixedAtBuild_PcdBool
//#define _PCD_SET_MODE_BOOL_PcdBool ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD
#define _PCD_TOKEN_PcdFeatureFlag 0U
#define _PCD_SIZE_PcdFeatureFlag 1
#define _PCD_GET_MODE_SIZE_PcdFeatureFlag _PCD_SIZE_PcdFeatureFlag
#define _PCD_VALUE_PcdFeatureFlag ((BOOLEAN)1U)
extern const BOOLEAN _gPcd_FixedAtBuild_PcdFeatureFlag;
#define _PCD_GET_MODE_BOOL_PcdFeatureFlag _gPcd_FixedAtBuild_PcdFeatureFlag
//#define _PCD_SET_MODE_BOOL_PcdFeatureFlag ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD
보다시피 차이점은 미묘하다. 따라서 FeaturePcd는 단순히 부울 FixedAtBuild PCD의 구문에 대한 일종의 '조미료'이다.