aboutsummaryrefslogtreecommitdiffstats
path: root/UefiLessonsPkg/HelloWorld/HelloWorld.c
blob: fa8b9912b25e00e04a40c9632ed4b6b5805f6ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
 *
 * SPDX-License-Identifier: MIT
 */

#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>

EFI_STATUS
EFIAPI
UefiMain (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )
{
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Hello World!\n");
  gST->ConOut->OutputString(gST->ConOut, L"Hello again!\n");
  Print(L"Bye!\n");

  UINTN Index;
  gBS->WaitForEvent(1, &(gST->ConIn->WaitForKey), &Index);
  gST->ConIn->Reset(gST->ConIn, FALSE);
  return EFI_SUCCESS;
}