]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Application/HelloWorld/HelloWorld.c
MdePkg: Convert all .uni files to utf-8
[mirror_edk2.git] / MdeModulePkg / Application / HelloWorld / HelloWorld.c
CommitLineData
b7d286b6 1/** @file\r
109e9a61
LG
2 This sample application bases on HelloWorld PCD setting \r
3 to print "UEFI Hello World!" to the UEFI Console.\r
4\r
cd5ebaa0
HT
5 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
6 This program and the accompanying materials \r
b7d286b6 7 are licensed and made available under the terms and conditions of the BSD License \r
8 which accompanies this distribution. The full text of the license may be found at \r
9 http://opensource.org/licenses/bsd-license.php \r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
14**/\r
15\r
ab9140c8 16#include <Uefi.h>\r
223c22d8 17#include <Library/PcdLib.h>\r
ab9140c8
A
18#include <Library/UefiLib.h>\r
19#include <Library/UefiApplicationEntryPoint.h>\r
b7d286b6 20\r
b9575d60
A
21\r
22/**\r
23 The user Entry Point for Application. The user code starts with this function\r
109e9a61 24 as the real entry point for the application.\r
b9575d60
A
25\r
26 @param[in] ImageHandle The firmware allocated handle for the EFI image. \r
27 @param[in] SystemTable A pointer to the EFI System Table.\r
28 \r
29 @retval EFI_SUCCESS The entry point is executed successfully.\r
30 @retval other Some error occurs when executing this entry point.\r
31\r
32**/\r
b7d286b6 33EFI_STATUS\r
34EFIAPI\r
35UefiMain (\r
36 IN EFI_HANDLE ImageHandle,\r
37 IN EFI_SYSTEM_TABLE *SystemTable\r
38 )\r
b7d286b6 39{\r
223c22d8
LG
40 UINT32 Index;\r
41 \r
42 Index = 0;\r
b7d286b6 43 \r
223c22d8
LG
44 //\r
45 // Three PCD type (FeatureFlag, UINT32 and String) are used as the sample.\r
46 //\r
47 if (FeaturePcdGet (PcdHelloWorldPrintEnable)) {\r
48 for (Index = 0; Index < PcdGet32 (PcdHelloWorldPrintTimes); Index ++) {\r
109e9a61
LG
49 //\r
50 // Use UefiLib Print API to print string to UEFI console\r
51 //\r
223c22d8
LG
52 Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString));\r
53 }\r
54 }\r
b7d286b6 55\r
56 return EFI_SUCCESS;\r
57}\r