Retiring the ANT/JAVA build and removing the older EDK II files that were required...
[mirror_edk2.git] / MdeModulePkg / Application / HelloWorld / HelloWorld.c
CommitLineData
b7d286b6 1/** @file\r
2 This simple application just print a "UEFI Hello World!" to the UEFI Console.\r
3 \r
4 Copyright (c) 2006 - 2007, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
ab9140c8 15#include <Uefi.h>\r
223c22d8 16#include <Library/PcdLib.h>\r
ab9140c8
A
17#include <Library/UefiLib.h>\r
18#include <Library/UefiApplicationEntryPoint.h>\r
b7d286b6 19\r
b9575d60
A
20\r
21/**\r
22 The user Entry Point for Application. The user code starts with this function\r
23 as the real entry point for the image goes into a library that calls this \r
24 function.\r
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
49 Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString));\r
50 }\r
51 }\r
b7d286b6 52\r
53 return EFI_SUCCESS;\r
54}\r