annotate boot/bootx64.c @ 8:d390aa667e3c

program test.
author taiki
date Wed, 26 Dec 2012 14:40:17 +0900
parents c778c27450cc
children e6715e03b87a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <efi.h>
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <efilib.h>
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 EFI_STATUS
6
a394e109feeb new executable file
taiki
parents: 4
diff changeset
5 efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *system_table)
4
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 {
6
a394e109feeb new executable file
taiki
parents: 4
diff changeset
7 InitializeLib(image, system_table);
8
d390aa667e3c program test.
taiki
parents: 7
diff changeset
8 /*
d390aa667e3c program test.
taiki
parents: 7
diff changeset
9 EFI_LOADED_IMAGE *loaded_image = NULL;
d390aa667e3c program test.
taiki
parents: 7
diff changeset
10 EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
d390aa667e3c program test.
taiki
parents: 7
diff changeset
11 EFI_STATUS status;
d390aa667e3c program test.
taiki
parents: 7
diff changeset
12
d390aa667e3c program test.
taiki
parents: 7
diff changeset
13 uefi_call_wrapper(BS->SetWatchdogTimer, 4, 0, 0x0, 0, NULL);
d390aa667e3c program test.
taiki
parents: 7
diff changeset
14
d390aa667e3c program test.
taiki
parents: 7
diff changeset
15 status = uefi_call_wrapper(
d390aa667e3c program test.
taiki
parents: 7
diff changeset
16 system_table->BootServices->HandleProtocol,
d390aa667e3c program test.
taiki
parents: 7
diff changeset
17 3,
d390aa667e3c program test.
taiki
parents: 7
diff changeset
18 image,
d390aa667e3c program test.
taiki
parents: 7
diff changeset
19 &loaded_image_protocol,
d390aa667e3c program test.
taiki
parents: 7
diff changeset
20 (void **) &loaded_image);
d390aa667e3c program test.
taiki
parents: 7
diff changeset
21
d390aa667e3c program test.
taiki
parents: 7
diff changeset
22 if (EFI_ERROR(status)) {
d390aa667e3c program test.
taiki
parents: 7
diff changeset
23 Print(L"handleprotocol: %r\n", status);
d390aa667e3c program test.
taiki
parents: 7
diff changeset
24 }
d390aa667e3c program test.
taiki
parents: 7
diff changeset
25
d390aa667e3c program test.
taiki
parents: 7
diff changeset
26 Print(L"Image base: %lx\n", loaded_image->ImageBase);
d390aa667e3c program test.
taiki
parents: 7
diff changeset
27 Print(L"Image size: %lx\n", loaded_image->ImageSize);
d390aa667e3c program test.
taiki
parents: 7
diff changeset
28 Print(L"Image file: %s\n", DevicePathToStr(loaded_image->FilePath));
d390aa667e3c program test.
taiki
parents: 7
diff changeset
29 */
d390aa667e3c program test.
taiki
parents: 7
diff changeset
30 return EFI_SUCCESS;
4
cae91de64e26 gather boot file
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }