]>
Commit | Line | Data |
---|---|---|
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/DebugLib.h>\r |
18 | #include <Library/UefiLib.h>\r | |
19 | #include <Library/UefiApplicationEntryPoint.h>\r | |
20 | #include <Library/UefiBootServicesTableLib.h>\r | |
b7d286b6 | 21 | \r |
b9575d60 A |
22 | \r |
23 | /**\r | |
24 | The user Entry Point for Application. The user code starts with this function\r | |
25 | as the real entry point for the image goes into a library that calls this \r | |
26 | function.\r | |
27 | \r | |
28 | @param[in] ImageHandle The firmware allocated handle for the EFI image. \r | |
29 | @param[in] SystemTable A pointer to the EFI System Table.\r | |
30 | \r | |
31 | @retval EFI_SUCCESS The entry point is executed successfully.\r | |
32 | @retval other Some error occurs when executing this entry point.\r | |
33 | \r | |
34 | **/\r | |
b7d286b6 | 35 | EFI_STATUS\r |
36 | EFIAPI\r | |
37 | UefiMain (\r | |
38 | IN EFI_HANDLE ImageHandle,\r | |
39 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
40 | )\r | |
b7d286b6 | 41 | {\r |
223c22d8 LG |
42 | UINT32 Index;\r |
43 | \r | |
44 | Index = 0;\r | |
b7d286b6 | 45 | \r |
223c22d8 LG |
46 | //\r |
47 | // Three PCD type (FeatureFlag, UINT32 and String) are used as the sample.\r | |
48 | //\r | |
49 | if (FeaturePcdGet (PcdHelloWorldPrintEnable)) {\r | |
50 | for (Index = 0; Index < PcdGet32 (PcdHelloWorldPrintTimes); Index ++) {\r | |
51 | Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString));\r | |
52 | }\r | |
53 | }\r | |
b7d286b6 | 54 | \r |
55 | return EFI_SUCCESS;\r | |
56 | }\r |