title: How does UEFI boot mode boot flows?
body: <p>The expression of this question is same as <a href="https://stackoverflow.com/questions/47749160/what-is-uefis-boot-sequence">What is UEFI&#39;s boot sequence?</a>, but it doesn't seem what I want. I'd like to know UEFI sequence in instruction perspective.</p>
  
  <p>For example, in case of BIOS boot mode, in simplified fashion,</p>
  
  <ul>
  <li>Computer power is on.</li>
  <li>Content of BIOS chip attached to motherboard performs the POST(Power On Self Test) process.</li>
  <li>BIOS searches for MBR(Master Boot Record)s, which has boot signature in preset boot device order.</li>
  <li>If MBR with boot signature is found, load the first sector (512 bytes) of the device to DRAM, address 0x7C00. This loaded sector (512 bytes) becomes the "first stage bootloader".</li>
  <li>BIOS transfers control to this first stage bootloader. In other words, opcode located at physical memory address 0x7C00 in DRAM is executed.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/QIzyq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QIzyq.png" alt="Image"></a></p>
  
  <p>Related article:
  <a href="https://neosmart.net/wiki/mbr-boot-process/" rel="noreferrer">https://neosmart.net/wiki/mbr-boot-process/</a></p>
  
  <p>But,</p>
  
  <p>in case of UEFI, I'm having trouble grasping this sequence.</p>
  
  <p>I've already glanced UEFI spec documentation and OS Dev UEFI part.</p>
  
  <p>UEFI:
  <a href="https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf" rel="noreferrer">https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf</a></p>
  
  <p>OS Dev:
  <a href="https://wiki.osdev.org/UEFI" rel="noreferrer">https://wiki.osdev.org/UEFI</a></p>
  
  <p>It seems this efi_main() function works as the point equivalent to 0x7C00 in BIOS mode. But how?</p>
  
  <p>Is UEFI firmware doing something like</p>
  
  <p><code>jmp efi_main</code></p>
  
  <p>after performing a series of jobs?</p>
  
  <p><strong>Q1. How is UEFI boot mode flows?</strong></p>
  
  <p><strong>Q2. Is there a good UEFI example or tutorial like brokenthorn that of BIOS based?</strong></p>
  
  <p>P.S.</p>
  
  <p>I've seen the news (which years have passed already) that Intel removes BIOS support by 2020.</p>
  
  <p><a href="https://www.anandtech.com/show/12068/intel-to-remove-bios-support-from-uefi-by-2020" rel="noreferrer">https://www.anandtech.com/show/12068/intel-to-remove-bios-support-from-uefi-by-2020</a></p>
  
  <p>It says</p>
  
  <p><code>Once CSM is removed, the new platforms will be unable to run 32-bit operating systems, unable to use related software (at least natively), and unable to use older hardware, such as RAID HBAs (and therefore older hard drives that are connected to those HBAs), network cards, and even graphics cards that lack UEFI-compatible vBIOS (launched before 2012 – 2013)</code></p>
  
  <p><strong>Q3. Doesn't it mean that everything related to BIOS booting (first stage bootloader at 0x7C00 and BIOS interrupts and etc) becomes deprecated?</strong></p>