I was supposed to have updated my blog last night. As a result, half of my blog posts have crashed! I wrote it in chrome but it is not saved. This hit my confidence by more than half, so I went on without feeling down. I couldn't sleep this morning. I got up and thought I had to stand up for myself. Continue to write ~~ But I want to change to another topic. I was going to write an introduction to EDK, but I was afraid that I was writing something about it. Write it for beginners. Today's topic is "UEFI Standard Guide ".
UEFI specifications
This document is the biggest difference between UEFI and legacy. The UEFI specification describes what the system firmware should be, what components should be included, software interfaces, driver interfaces required by the firmware, and so on. UEFI specifications can be said to be a big collection of things that fall into different categories. You can understand the UEFI specifications and use the UEFI specifications will be of great help to your future work.
UEFI specifications are developed by UEFI. The latest UEFI organization-approved specification can be downloaded from the http://www.uefi.org/specs/, and the latest published specification version is 2.2. However, I do not recommend that you use the 2.2 specification directly, because the popular versions are 2.0 and 2.1. If it is developed for compatibility purposes, it is better to use version 2.0 as the reference application source.
To read the UEFI specification, you must first know what it includes and then learn it in a targeted manner. If you look at the text on thousands of pages, you will surely feel that you have no choice. To do one thing, you must first have a plan. This is also true for read Specifications.
UEFI specification Chapter 1 Introduction
This chapter provides an overview of UEFI's design philosophy and mentions the design objectives of UEFI specifications. This section describes the usage of some terms in the specifications and the arrangement of texts. It also briefly introduces the compatibility of the legacy system. This chapter is a general description. I strongly recommend that you read this chapter first.
UEFI specification Chapter 2 Overview
This chapter introduces some basic components of UEFI bios and some basic concepts (such as handle and Protocol. It also specifies the minimum conditions for a UEFI system firmware. These are basic knowledge and must be mastered. This chapter must be carefully studied and cannot be skipped. Otherwise, many of the concepts mentioned below are unknown.
UEFI specification Chapter 3 Boot manager
This chapter is also important. UEFI is a system firmware standard. First of all, we need to detail how to start the OS. A new startup method is also defined, that is, how UEFI boot is implemented. The implementation methods are defined. Some storage methods for parameters used in the startup process are specified. We should read this chapter and try to understand its information as much as possible.
UEFI specification Chapter 4 system table
This chapter provides a detailed definition of the most important data structure system table in the UEFI system. And carefully defines the meaning of each data item. Because system table will pass every driver's entry function as a parameter, in other words, the content of this chapter isCodeClosely related. Therefore, the content of this chapter must be familiar with the chest.
UEFI specification Chapter 5 GPT Partition
This chapter can be ignored by the brothers who are doing BIOS porting. However, you must read this information for the operating system loader and firmware kernel. This chapter mainly defines a new partition format, because UEFI boot is a file system-based Boot Method, and UEFI firmware only supports FAT32 partitions, therefore, a partition on the hard disk must be FAT32 to store the OS loader. Of course, you can install the entire OS in this partition. At the same time, this partition has also made some technical innovations, such as the use of 64-bit LBA, which are useful information.
UEFI specifications Chapter 6 & Chapter 7 boot services & runtime services
The contents of these two chapters are similar. These two chapters are the most important part of code writing. Specify the basic software interfaces required by the firmware. There are two types: boot services, which can only be used in the startup phase. The other type is runtime, which can be used in the startup phase and UEFI native OS. Both chapters must be fully read and thoroughly understood!
UEFI specifications can be seen here! All the chapters below use the knowledge described above to define protocol. In other words, it appears as a reference below. When we need a protocol when writing code, we can refer to the related definitions to understand what interfaces this protocol can provide.
However, if you are a firmware implementer, you should take a closer look at the interface you want to implement. Some interfaces, If You Do BIOS porting, must be implemented as required. You have to check the corresponding chapters according to the situation.
Read the full text
Category:View comments on EFI