fixed offset in notes
[efitest3] / NOTES
1 UEFI notes
2 ==========
3
4 /efi/boot/bootx64.efi
5
6 rcx: efi handle
7 rdx: efi system table pointer
8 rsp: return address?
9
10 after loading call EFI_BOOT_SERVICES.ExitBootServices()
11
12 struct EFI_TABLE_HEADER {
13         uint64_t signature;
14         uint32_t revision;
15         uint32_t header_size;
16         uint32_t crc32;
17         uint32_t rsvd;
18 };
19
20 EFI_SYSTEM_TABLE signature: 0x5453595320494249
21 0       EFI_TABLE_HEADER
22 24      wchar_t *firmware_vendor
23 32      uint32_t firmware_revision
24 36      padding
25 40      void *console_in_handle
26 48      EFI_SIMPLE_TEXT_INPUT_PROTOCOL*
27 56      void *console_out_handle
28 64      EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*
29 72      void *stderr_handle
30 80      EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*
31 88      EFI_RUNTIME_SERVICES *runtime_services;
32 96      EFI_BOOT_SERVICES *boot_services;
33         uint64_t num_of_table_entries;
34         EFI_CONFIGURATION_TABLE *cfg_table;
35
36 EFI_BOOT_SERVICES signature: 0x56524553544f4f42
37 0       EFI_TABLE_HEADER
38 24      EFI_RAISE_TPL
39 32      EFI_RESTORE_TPL
40 40      EFI_ALLOCATE_PAGES
41 48      EFI_FREE_PAGES
42 56      EFI_GET_MEMORY_MAP
43 64      EFI_ALLOCATE_POOL
44 72      EFI_FREE_POOL
45 80      EFI_CREATE_EVENT
46 88      EFI_SET_TIMER
47 96      EFI_WAIT_FOR_EVENT
48 104     EFI_SIGNAL_EVENT
49 112     EFI_CLOSE_EVENT
50 120     EFI_CHECK_EVENT
51 128     EFI_INSTALL_PROTOCOL_INTERFACE
52 136     EFI_REINSTALL_PROTOCOL_INTERFACE
53 144     EFI_UNINSTALL_PROTOCOL_INTERFACE
54 152     EFI_HANDLE_PROTOCOL
55 160     void *rsvd
56 168     EFI_REGISTER_PROTOCOL_NOTIFY
57 176     EFI_LOCATE_HANDLE
58 184     EFI_LOCATE_DEVICE_PATH
59 192     EFI_INSTALL_CONFIGURATION_TABLE
60 200     EFI_IMAGE_LOAD
61 208     EFI_IMAGE_START
62 216     EFI_EXIT
63 224     EFI_IMAGE_UNLOAD
64 232     EFI_EXIT_BOOT_SERVICES
65         ... more ...
66
67 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
68 0       EFI_TEXT_RESET
69 8       EFI_TEXT_STRING
70 16      EFI_TEXT_TEST_STRING
71 24      EFI_TEXT_QUERY_MODE
72 32      EFI_TEXT_SET_MODE
73 40      EFI_TEXT_SET_ATTRIBUTE
74 48      EFI_TEXT_CLEAR_SCREEN
75 56      EFI_TEXT_SET_CURSOR_POSITION
76 64      EFI_TEXT_ENABLE_CURSOR
77 72      SIMPLE_TEXT_OUPUT_MODE *mode;
78 };