efi.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. UEFI subsystem
  3. ==============
  4. Lauching UEFI images
  5. --------------------
  6. Bootefi command
  7. ~~~~~~~~~~~~~~~
  8. The bootefi command is used to start UEFI applications or to install UEFI
  9. drivers. It takes two parameters
  10. bootefi <image address> [fdt address]
  11. * image address - the memory address of the UEFI binary
  12. * fdt address - the memory address of the flattened device tree
  13. The environment variable 'bootargs' is passed as load options in the UEFI system
  14. table. The Linux kernel EFI stub uses the load options as command line
  15. arguments.
  16. .. kernel-doc:: cmd/bootefi.c
  17. :internal:
  18. Boot manager
  19. ~~~~~~~~~~~~
  20. The UEFI specification foresees to define boot entries and boot sequence via UEFI
  21. variables. Booting according to these variables is possible via
  22. bootefi bootmgr [fdt address]
  23. * fdt address - the memory address of the flattened device tree
  24. The relevant variables are:
  25. * Boot0000-BootFFFF define boot entries
  26. * BootNext specifies next boot option to be booted
  27. * BootOrder specifies in which sequence the boot options shall be tried if
  28. BootNext is not defined or booting via BootNext fails
  29. .. kernel-doc:: lib/efi_loader/efi_bootmgr.c
  30. :internal:
  31. Efidebug command
  32. ~~~~~~~~~~~~~~~~
  33. The efidebug command is used to set and display boot options as well as to
  34. display information about internal data of the UEFI subsystem (devices,
  35. drivers, handles, loaded images, and the memory map).
  36. .. kernel-doc:: cmd/efidebug.c
  37. :internal:
  38. Initialization of the UEFI sub-system
  39. -------------------------------------
  40. .. kernel-doc:: lib/efi_loader/efi_setup.c
  41. :internal:
  42. Boot services
  43. -------------
  44. .. kernel-doc:: lib/efi_loader/efi_boottime.c
  45. :internal:
  46. Image relocation
  47. ~~~~~~~~~~~~~~~~
  48. .. kernel-doc:: lib/efi_loader/efi_image_loader.c
  49. :internal:
  50. Memory services
  51. ~~~~~~~~~~~~~~~
  52. .. kernel-doc:: lib/efi_loader/efi_memory.c
  53. :internal:
  54. SetWatchdogTimer service
  55. ~~~~~~~~~~~~~~~~~~~~~~~~
  56. .. kernel-doc:: lib/efi_loader/efi_watchdog.c
  57. :internal:
  58. Runtime services
  59. ----------------
  60. .. kernel-doc:: lib/efi_loader/efi_runtime.c
  61. :internal:
  62. Variable services
  63. ~~~~~~~~~~~~~~~~~
  64. .. kernel-doc:: include/efi_variable.h
  65. :internal:
  66. .. kernel-doc:: lib/efi_loader/efi_variable.c
  67. :internal:
  68. UEFI drivers
  69. ------------
  70. UEFI driver uclass
  71. ~~~~~~~~~~~~~~~~~~
  72. .. kernel-doc:: lib/efi_driver/efi_uclass.c
  73. :internal:
  74. Block device driver
  75. ~~~~~~~~~~~~~~~~~~~
  76. .. kernel-doc:: lib/efi_driver/efi_block_device.c
  77. :internal:
  78. Protocols
  79. ---------
  80. Block IO protocol
  81. ~~~~~~~~~~~~~~~~~
  82. .. kernel-doc:: lib/efi_loader/efi_disk.c
  83. :internal:
  84. File protocol
  85. ~~~~~~~~~~~~~
  86. .. kernel-doc:: lib/efi_loader/efi_file.c
  87. :internal:
  88. Graphical output protocol
  89. ~~~~~~~~~~~~~~~~~~~~~~~~~
  90. .. kernel-doc:: lib/efi_loader/efi_gop.c
  91. :internal:
  92. Load file 2 protocol
  93. ~~~~~~~~~~~~~~~~~~~~
  94. The load file 2 protocol can be used by the Linux kernel to load the initial
  95. RAM disk. U-Boot can be configured to provide an implementation.
  96. .. kernel-doc:: lib/efi_loader/efi_load_initrd.c
  97. :internal:
  98. Network protocols
  99. ~~~~~~~~~~~~~~~~~
  100. .. kernel-doc:: lib/efi_loader/efi_net.c
  101. :internal:
  102. Random number generator protocol
  103. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104. .. kernel-doc:: lib/efi_loader/efi_rng.c
  105. :internal:
  106. Text IO protocols
  107. ~~~~~~~~~~~~~~~~~
  108. .. kernel-doc:: lib/efi_loader/efi_console.c
  109. :internal:
  110. Unicode Collation protocol
  111. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  112. .. kernel-doc:: lib/efi_loader/efi_unicode_collation.c
  113. :internal:
  114. Unit testing
  115. ------------
  116. The following library functions are provided to support writing UEFI unit tests.
  117. The should not be used elsewhere.
  118. .. kernel-doc:: include/efi_selftest.h
  119. :internal: