• XSS.stack #1 – первый литературный журнал от юзеров форума

UEFI con Part 1.1

RtlGBI

CD-диск
Пользователь
Регистрация
01.12.2022
Сообщения
13
Реакции
2
the "UEFI" describes a programmatic interface to plstforn the platform includes the motherboard, some chipset & CPU and other components dosen't metter now the UEFI will be allow pre-os pre-oprating system and pre-os agents are os loaders & diagnostics system needs for application to execute and interoperate, including uefi drv and applications. UEFI

[+] Objects managed by UEFI

1-manage system state
2-including I/O devices
3- memory
4- events
[+] UEFI System Table(UST)
1 - Data structure with data information tables
2 - functions to interface the systems
[+] Handle database and protocols : which callable interfaces are registered

[+] UEFI Images : the executable content format by which code is deployed

[+] Events : which software can be signaled in response to s0me other activity


[+] Device paths - a data structure that describes the hardware location of an entity such as
1-bus
2-spindle
3-partition
4- and file name of a UEFI image on a formatted disk.


**Objects Managed by UEFI**
//C for edk2
Objects of several differing types are managed through the services provided by UEFI. The following figure shows the various object types. The most important objects for UEFI drivers are the following:

UEFI system table

memory
handle
images
events

Some UEFI drivers may need to access environment variables, but most do not.
Rarely do UEFI drivers require the use of a monotonic counter, watchdog timer or realtime clock.
The UEFI system table provides access to all services provided by UEFI. The system table also provides access to all the additional data structures that describe the configuration of the platform. Each of these object types, and the services that provide access to them, are introduced in the following sections.
image1.jpg


**UEFI System Table**
[+pointer+] most important data structure why ? becuase passed into each driver and application as part of its entry-point from this data structure can gain access to system conf information &
rich collection of uefi service include
UEFI BOOT SERVICE
UEFI RUNTIME SERVICE
PROTOCOL SERVICES


the UEFI BOOT SERVICE and UEFI RUNTIME SERVICE are accessed through the uefi boot service table and the UEFI Runtime Services Table

Both of these tables are data fields in the UEFI System Table


Protocol services are groups of related functions and data fields that are named by (GUID) protocol services are used to provide software abstractions for devices such as consoles, disks, and networks, but they can be used to extend the number of generic services that are available in the platform Specification defines over 30 different protocols, and various implementations
of UEFI firmware and UEFI drivers may produce additional protocols to
extend the functionality of a platform.

**Handle Database**
handle database is composed of objects called handles and protocols
handles are collection 1 or 1+ protocols & protocols are data structure named by GUID
1 - data structure protocol can be empty
2 - can contain data fields
3 - can contain services
when UEFI initialization 1-UEFI Drivers 2- system firmware 3- UEFI applications create handles and attach 1 or 1+ protocols to the handle Information in the handle database is global and can be accessed by
any executable UEFI image
The handle database is the central repository for the objects that are maintained by UEFI-based firmware. The handle database is a list of UEFI
handles, and each UEFI handle is identified by a unique handle number that is maintained by the system firmware. A handle number provides a database "key” to an entry in the handle database. Each entry in the handle database
is a collection of one or more protocols. The types of protocols, named by a GUID, that are attached to a UEFI handle determine the handle type. A UEFI
handle may represent components such as the following:

Executable images such as UEFI drivers and UEFI applications
Devices such as network controllers and hard drive partitions
UEFI services such as UEFI Decompression and the EBC Virtual
Machine

Screenshot 2022-12-06 072215.png

The image on the top is the different types of handles that can be found in the handles database and the relationships between the different types of handles All handles reside in the same handle database and the types of protocols that
are associated with each handle differentiate the handle type Like file system handles in an operating system context handles are unique for the session, but the values can be arbitrary. Also, like the handle returned from an fopen function in a C library, the value does not necessarily serve a useful purpose in a different process or during a subsequent restart in the same process. The handle
is just a transitory value to manage state.

credit : thx so match for my old notes and edk2

i apologize if I made a mistake in a specific point and please correct it and add extra information if you have it because I did not put all the information for several reasons
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх