summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Application/HelloWorld/HelloWorld.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Application/HelloWorld/HelloWorld.c')
-rw-r--r--MdeModulePkg/Application/HelloWorld/HelloWorld.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.c b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
index 4106753..b1d16f7 100644
--- a/MdeModulePkg/Application/HelloWorld/HelloWorld.c
+++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
@@ -13,6 +13,7 @@
**/
#include <Uefi.h>
+#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
@@ -37,10 +38,19 @@ UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-
{
+ UINT32 Index;
+
+ Index = 0;
- Print ((CHAR16 *)L"UEFI Hello World!\n");
+ //
+ // Three PCD type (FeatureFlag, UINT32 and String) are used as the sample.
+ //
+ if (FeaturePcdGet (PcdHelloWorldPrintEnable)) {
+ for (Index = 0; Index < PcdGet32 (PcdHelloWorldPrintTimes); Index ++) {
+ Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString));
+ }
+ }
return EFI_SUCCESS;
}