X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=MdeModulePkg%2FApplication%2FHelloWorld%2FHelloWorld.c;h=1821b2dd7642a85b6839ecc21e1f132120b225a1;hb=0677cc4925d580f7016ac092dc591be0ebe03495;hp=4106753492a2bd91fe30b269e7a4fe78c08a3844;hpb=b9575d60301f0e2d1cb10b7bce04242c32f5b0bc;p=mirror_edk2.git
diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.c b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
index 4106753492..1821b2dd76 100644
--- a/MdeModulePkg/Application/HelloWorld/HelloWorld.c
+++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
@@ -1,8 +1,9 @@
/** @file
- This simple application just print a "UEFI Hello World!" to the UEFI Console.
-
- Copyright (c) 2006 - 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ This sample application bases on HelloWorld PCD setting
+ to print "UEFI Hello World!" to the UEFI Console.
+
+ Copyright (c) 2006 - 2008, 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
@@ -13,16 +14,14 @@
**/
#include
-#include
+#include
#include
#include
-#include
/**
The user Entry Point for Application. The user code starts with this function
- as the real entry point for the image goes into a library that calls this
- function.
+ as the real entry point for the application.
@param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
@@ -37,10 +36,22 @@ 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 ++) {
+ //
+ // Use UefiLib Print API to print string to UEFI console
+ //
+ Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString));
+ }
+ }
return EFI_SUCCESS;
}