XU XUv0.16.0

#core/uefi

import: #core/uefi

counts: 31 functions, 0 methods, 14 types, 9 constants, 0 method sets

Standard library package `#core/uefi`.

const EFI_SYSTEM_TABLE_SIGNATURE

XuAPI
pub const EFI_SYSTEM_TABLE_SIGNATURE = 0x5453595320494249u64

Purpose

Constant EFI_SYSTEM_TABLE_SIGNATURE, defining protocol or algorithm parameters.

const EFI_RESET_COLD

XuAPI
pub const EFI_RESET_COLD = 0

Purpose

Constant EFI_RESET_COLD, defining protocol or algorithm parameters.

const EFI_RESET_WARM

XuAPI
pub const EFI_RESET_WARM = 1

Purpose

Constant EFI_RESET_WARM, defining protocol or algorithm parameters.

const EFI_RESET_SHUTDOWN

XuAPI
pub const EFI_RESET_SHUTDOWN = 2

Purpose

Constant EFI_RESET_SHUTDOWN, defining protocol or algorithm parameters.

const EFI_LOADER_DATA

XuAPI
pub const EFI_LOADER_DATA = 2

Purpose

Constant EFI_LOADER_DATA, defining protocol or algorithm parameters.

const EFI_ALLOCATE_ANY_PAGES

XuAPI
pub const EFI_ALLOCATE_ANY_PAGES = 0

Purpose

Constant EFI_ALLOCATE_ANY_PAGES, defining protocol or algorithm parameters.

const EFI_ALLOCATE_MAX_ADDRESS

XuAPI
pub const EFI_ALLOCATE_MAX_ADDRESS = 1

Purpose

Constant EFI_ALLOCATE_MAX_ADDRESS, defining protocol or algorithm parameters.

const EFI_ALLOCATE_ADDRESS

XuAPI
pub const EFI_ALLOCATE_ADDRESS = 2

Purpose

Constant EFI_ALLOCATE_ADDRESS, defining protocol or algorithm parameters.

const EFI_FILE_MODE_READ

XuAPI
pub const EFI_FILE_MODE_READ = 1

Purpose

Constant EFI_FILE_MODE_READ, defining protocol or algorithm parameters.

struct EfiGuid

XuAPI
pub struct EfiGuid {
    pub data1 u32
    pub data2 u16
    pub data3 u16
    pub data4 [8]u8
}

Purpose

Structure encapsulating data1, data2, data3, data4.

Public fields

data1 u32
field (u32)
data2 u16
field (u16)
data3 u16
field (u16)
data4 [8]u8
field ([8]u8)

struct EfiConfigurationTable

XuAPI
pub struct EfiConfigurationTable {
    pub vendor_guid EfiGuid
    pub vendor_table u64
}

Purpose

Structure encapsulating vendor_guid, vendor_table.

Public fields

vendor_guid EfiGuid
field (EfiGuid)
vendor_table u64
field (u64)

struct EfiTableHeader

XuAPI
pub struct EfiTableHeader {
    pub signature u64
    pub revision u32
    pub header_size u32
    pub crc32 u32
    pub reserved u32
}

Purpose

Uefi Metadata header descriptor structure.

Public fields

signature u64
field (u64)
revision u32
field (u32)
header_size u32
field (u32)
crc32 u32
field (u32)
reserved u32
field (u32)

struct EfiSimpleTextOutputProtocol

XuAPI
pub struct EfiSimpleTextOutputProtocol {
    pub reset u64
    pub output_string u64
    pub test_string u64
    pub query_mode u64
    pub set_mode u64
    pub set_attribute u64
    pub clear_screen u64
    pub set_cursor_position u64
    pub enable_cursor u64
    pub mode u64
}

Purpose

Structure encapsulating reset, output_string, test_string, query_mode, set_mode.

Public fields

reset u64
field (u64)
output_string u64
field (u64)
test_string u64
field (u64)
query_mode u64
field (u64)
set_mode u64
field (u64)
set_attribute u64
field (u64)
clear_screen u64
field (u64)
set_cursor_position u64
field (u64)
enable_cursor u64
field (u64)
mode u64
mode

struct EfiGopModeInfo

XuAPI
pub struct EfiGopModeInfo {
    pub version u32
    pub horizontal_resolution u32
    pub vertical_resolution u32
    pub pixel_format u32
    pub red_mask u32
    pub green_mask u32
    pub blue_mask u32
    pub reserved_mask u32
    pub pixels_per_scan_line u32
}

Purpose

Structure encapsulating version, horizontal_resolution, vertical_resolution, pixel_format, red_mask.

Public fields

version u32
field (u32)
horizontal_resolution u32
field (u32)
vertical_resolution u32
field (u32)
pixel_format u32
field (u32)
red_mask u32
field (u32)
green_mask u32
field (u32)
blue_mask u32
field (u32)
reserved_mask u32
field (u32)
pixels_per_scan_line u32
field (u32)

struct EfiGopMode

XuAPI
pub struct EfiGopMode {
    pub max_mode u32
    pub mode u32
    pub info *raw EfiGopModeInfo
    pub size_of_info u64
    pub frame_buffer_base u64
    pub frame_buffer_size u64
}

Purpose

Structure encapsulating max_mode, mode, info, size_of_info, frame_buffer_base.

Public fields

max_mode u32
field (u32)
mode u32
mode
info *raw EfiGopModeInfo
field (*raw EfiGopModeInfo)
size_of_info u64
field (u64)
frame_buffer_base u64
field (u64)
frame_buffer_size u64
field (u64)

struct EfiGraphicsOutputProtocol

XuAPI
pub struct EfiGraphicsOutputProtocol {
    pub query_mode u64
    pub set_mode u64
    pub blt u64
    pub mode *raw EfiGopMode
}

Purpose

Structure encapsulating query_mode, set_mode, blt, mode.

Public fields

query_mode u64
field (u64)
set_mode u64
field (u64)
blt u64
field (u64)
mode *raw EfiGopMode
mode

struct EfiRuntimeServices

XuAPI
pub struct EfiRuntimeServices {
    pub hdr EfiTableHeader
    pub get_time u64
    pub set_time u64
    pub get_wakeup_time u64
    pub set_wakeup_time u64
    pub set_virtual_address_map u64
    pub convert_pointer u64
    pub get_variable u64
    pub get_next_variable_name u64
    pub set_variable u64
    pub get_next_high_mono_count u64
    pub reset_system u64
}

Purpose

Structure encapsulating hdr, get_time, set_time, get_wakeup_time, set_wakeup_time.

Public fields

hdr EfiTableHeader
field (EfiTableHeader)
get_time u64
field (u64)
set_time u64
field (u64)
get_wakeup_time u64
field (u64)
set_wakeup_time u64
field (u64)
set_virtual_address_map u64
field (u64)
convert_pointer u64
field (u64)
get_variable u64
field (u64)
get_next_variable_name u64
field (u64)
set_variable u64
field (u64)
get_next_high_mono_count u64
field (u64)
reset_system u64
field (u64)

struct EfiBootServices

XuAPI
pub struct EfiBootServices {
    pub hdr EfiTableHeader
    pub raise_tpl u64
    pub restore_tpl u64
    pub allocate_pages u64
    pub free_pages u64
    pub get_memory_map u64
    pub allocate_pool u64
    pub free_pool u64
    pub create_event u64
    pub set_timer u64
    pub wait_for_event u64
    pub signal_event u64
    pub close_event u64
    pub check_event u64
    pub install_protocol_interface u64
    pub reinstall_protocol_interface u64
    pub uninstall_protocol_interface u64
    pub handle_protocol u64
    pub reserved u64
    pub register_protocol_notify u64
    pub locate_handle u64
    pub locate_device_path u64
    pub install_configuration_table u64
    pub load_image u64
    pub start_image u64
    pub exit u64
    pub unload_image u64
    pub exit_boot_services u64
    pub get_next_monotonic_count u64
    pub stall u64
    pub set_watchdog_timer u64
    pub connect_controller u64
    pub disconnect_controller u64
    pub open_protocol u64
    pub close_protocol u64
    pub open_protocol_information u64
    pub protocols_per_handle u64
    pub locate_handle_buffer u64
    pub locate_protocol u64
}

Purpose

Structure encapsulating hdr, raise_tpl, restore_tpl, allocate_pages, free_pages.

Public fields

hdr EfiTableHeader
field (EfiTableHeader)
raise_tpl u64
field (u64)
restore_tpl u64
field (u64)
allocate_pages u64
field (u64)
free_pages u64
field (u64)
get_memory_map u64
field (u64)
allocate_pool u64
field (u64)
free_pool u64
field (u64)
create_event u64
field (u64)
set_timer u64
field (u64)
wait_for_event u64
field (u64)
signal_event u64
field (u64)
close_event u64
field (u64)
check_event u64
field (u64)
install_protocol_interface u64
field (u64)
reinstall_protocol_interface u64
field (u64)
uninstall_protocol_interface u64
field (u64)
handle_protocol u64
field (u64)
reserved u64
field (u64)
register_protocol_notify u64
field (u64)
locate_handle u64
field (u64)
locate_device_path u64
field (u64)
install_configuration_table u64
field (u64)
load_image u64
field (u64)
start_image u64
field (u64)
exit u64
field (u64)
unload_image u64
field (u64)
exit_boot_services u64
field (u64)
get_next_monotonic_count u64
field (u64)
stall u64
field (u64)
set_watchdog_timer u64
field (u64)
connect_controller u64
field (u64)
disconnect_controller u64
field (u64)
open_protocol u64
field (u64)
close_protocol u64
field (u64)
open_protocol_information u64
field (u64)
protocols_per_handle u64
field (u64)
locate_handle_buffer u64
field (u64)
locate_protocol u64
field (u64)

struct EfiSystemTable

XuAPI
pub struct EfiSystemTable {
    pub hdr EfiTableHeader
    pub firmware_vendor u64
    pub firmware_revision u32
    pub _pad_fw u32
    pub console_in_handle u64
    pub con_in u64
    pub console_out_handle u64
    pub con_out *raw EfiSimpleTextOutputProtocol
    pub standard_error_handle u64
    pub std_err u64
    pub runtime_services *raw EfiRuntimeServices
    pub boot_services *raw EfiBootServices
    pub number_of_table_entries u64
    pub configuration_table u64
}

Purpose

Structure encapsulating hdr, firmware_vendor, firmware_revision, _pad_fw, console_in_handle.

Public fields

hdr EfiTableHeader
field (EfiTableHeader)
firmware_vendor u64
field (u64)
firmware_revision u32
field (u32)
_pad_fw u32
field (u32)
console_in_handle u64
field (u64)
con_in u64
field (u64)
console_out_handle u64
field (u64)
con_out *raw EfiSimpleTextOutputProtocol
field (*raw EfiSimpleTextOutputProtocol)
standard_error_handle u64
field (u64)
std_err u64
field (u64)
runtime_services *raw EfiRuntimeServices
field (*raw EfiRuntimeServices)
boot_services *raw EfiBootServices
field (*raw EfiBootServices)
number_of_table_entries u64
field (u64)
configuration_table u64
field (u64)

struct EfiMemoryDescriptor

XuAPI
pub struct EfiMemoryDescriptor {
    pub mem_type u32
    pub pad u32
    pub physical_start u64
    pub virtual_start u64
    pub number_of_pages u64
    pub attribute u64
}

Purpose

Structure encapsulating mem_type, pad, physical_start, virtual_start, number_of_pages.

Public fields

mem_type u32
field (u32)
pad u32
field (u32)
physical_start u64
field (u64)
virtual_start u64
field (u64)
number_of_pages u64
field (u64)
attribute u64
field (u64)

struct EfiLoadedImageProtocol

XuAPI
pub struct EfiLoadedImageProtocol {
    pub revision u32
    pub pad0 u32
    pub parent_handle u64
    pub system_table u64
    pub device_handle u64
    pub file_path u64
    pub reserved u64
    pub load_options_size u32
    pub pad1 u32
    pub load_options u64
    pub image_base u64
    pub image_size u64
    pub image_code_type u32
    pub image_data_type u32
    pub unload u64
}

Purpose

Structure encapsulating revision, pad0, parent_handle, system_table, device_handle.

Public fields

revision u32
field (u32)
pad0 u32
field (u32)
parent_handle u64
field (u64)
system_table u64
field (u64)
device_handle u64
field (u64)
file_path u64
field (u64)
reserved u64
field (u64)
load_options_size u32
field (u32)
pad1 u32
field (u32)
load_options u64
field (u64)
image_base u64
field (u64)
image_size u64
field (u64)
image_code_type u32
field (u32)
image_data_type u32
field (u32)
unload u64
field (u64)

struct EfiSimpleFileSystemProtocol

XuAPI
pub struct EfiSimpleFileSystemProtocol {
    pub revision u64
    pub open_volume u64
}

Purpose

Structure encapsulating revision, open_volume.

Public fields

revision u64
field (u64)
open_volume u64
field (u64)

struct EfiFileProtocol

XuAPI
pub struct EfiFileProtocol {
    pub revision u64
    pub open u64
    pub close u64
    pub delete u64
    pub read u64
    pub write u64
    pub get_position u64
    pub set_position u64
    pub get_info u64
    pub set_info u64
    pub flush u64
}

Purpose

Structure encapsulating revision, open, close, delete, read.

Public fields

revision u64
field (u64)
open u64
field (u64)
close u64
field (u64)
delete u64
field (u64)
read u64
field (u64)
write u64
field (u64)
get_position u64
field (u64)
set_position u64
field (u64)
get_info u64
field (u64)
set_info u64
field (u64)
flush u64
field (u64)

acpi_20_guid

XuAPI
pub fn acpi_20_guid() EfiGuid

Purpose

Acpi 20 guid.

Parameters

No arguments are required.

Returns

EfiGuid — a value of this type

acpi_10_guid

XuAPI
pub fn acpi_10_guid() EfiGuid

Purpose

Acpi 10 guid.

Parameters

No arguments are required.

Returns

EfiGuid — a value of this type

gop_guid

XuAPI
pub fn gop_guid() EfiGuid

Purpose

Gop guid.

Parameters

No arguments are required.

Returns

EfiGuid — a value of this type

loaded_image_guid

XuAPI
pub fn loaded_image_guid() EfiGuid

Purpose

Loaded image guid.

Parameters

No arguments are required.

Returns

EfiGuid — a value of this type

simple_fs_guid

XuAPI
pub fn simple_fs_guid() EfiGuid

Purpose

Simple fs guid.

Parameters

No arguments are required.

Returns

EfiGuid — a value of this type

guid_eq

XuAPI
pub fn guid_eq(a *raw EfiGuid, b *raw EfiGuid) bool

Purpose

Guid eq.

Parameters

a *raw EfiGuid
value (*raw EfiGuid)
b *raw EfiGuid
b (*raw EfiGuid)

Returns

bool — true or false

image_handle

XuAPI
pub fn image_handle() u64

Purpose

Image handle.

Parameters

No arguments are required.

Returns

u64 — a value of this type

system_table

XuAPI
pub fn system_table() *raw EfiSystemTable

Purpose

System table.

Parameters

No arguments are required.

Returns

*raw EfiSystemTable — a value of this type

con_out_clear

XuAPI
pub fn con_out_clear(st *raw EfiSystemTable) u64

Purpose

Con out clear.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)

Returns

u64 — a value of this type

con_out_puts

XuAPI
pub fn con_out_puts(st *raw EfiSystemTable, s string) u64

Purpose

Con out puts.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
s string
source string (string)

Returns

u64 — a value of this type

con_out_puts_ref

XuAPI
pub fn con_out_puts_ref(st *raw EfiSystemTable, s &string) u64

Purpose

Con out puts ref.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
s &string
source string (read-only borrow; caller keeps the original; type &string)

Returns

u64 — a value of this type

con_out_put_u64

XuAPI
pub fn con_out_put_u64(st *raw EfiSystemTable, v u64)

Purpose

Con out put u64.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
v u64
value (u64)

Returns

This call does not return a value.

con_out_put_hex

XuAPI
pub fn con_out_put_hex(st *raw EfiSystemTable, v u64)

Purpose

Con out put hex.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
v u64
value (u64)

Returns

This call does not return a value.

find_config_table

XuAPI
pub fn find_config_table(st *raw EfiSystemTable, target_guid *raw EfiGuid) u64

Purpose

Find config table.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
target_guid *raw EfiGuid
target_guid (*raw EfiGuid)

Returns

u64 — a value of this type

find_acpi_rsdp

XuAPI
pub fn find_acpi_rsdp(st *raw EfiSystemTable) u64

Purpose

Find acpi rsdp.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)

Returns

u64 — a value of this type

get_memory_map

XuAPI
pub fn get_memory_map(st *raw EfiSystemTable, map_size *raw u64, buf *raw u8, map_key *raw u64, desc_size *raw u64, desc_ver *raw u32) u64

Purpose

Read memory map.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
map_size *raw u64
map_size (*raw u64)
buf *raw u8
buffer (*raw u8)
map_key *raw u64
map_key (*raw u64)
desc_size *raw u64
desc_size (*raw u64)
desc_ver *raw u32
desc_ver (*raw u32)

Returns

u64 — a value of this type

allocate_pool

XuAPI
pub fn allocate_pool(st *raw EfiSystemTable, pool_type u32, size u64, out_buf *raw u64) u64

Purpose

Allocate pool.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
pool_type u32
pool_type (u32)
size u64
size (u64)
out_buf *raw u64
out_buf (*raw u64)

Returns

u64 — a value of this type

free_pool

XuAPI
pub fn free_pool(st *raw EfiSystemTable, buf u64) u64

Purpose

Free pool.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
buf u64
buffer (u64)

Returns

u64 — a value of this type

allocate_pages

XuAPI
pub fn allocate_pages(st *raw EfiSystemTable, alloc_type u32, mem_type u32, pages u64, addr_io *raw u64) u64

Purpose

Allocate pages.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
alloc_type u32
alloc_type (u32)
mem_type u32
mem_type (u32)
pages u64
pages (u64)
addr_io *raw u64
addr_io (*raw u64)

Returns

u64 — a value of this type

free_pages

XuAPI
pub fn free_pages(st *raw EfiSystemTable, addr u64, pages u64) u64

Purpose

Free pages.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
addr u64
address (u64)
pages u64
pages (u64)

Returns

u64 — a value of this type

set_watchdog_timer

XuAPI
pub fn set_watchdog_timer(st *raw EfiSystemTable, timeout u64) u64

Purpose

Set watchdog timer.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
timeout u64
timeout (u64)

Returns

u64 — a value of this type

handle_protocol

XuAPI
pub fn handle_protocol(st *raw EfiSystemTable, handle u64, guid *raw EfiGuid, out_iface *raw u64) u64

Purpose

Handle protocol.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
handle u64
handle (u64)
guid *raw EfiGuid
guid (*raw EfiGuid)
out_iface *raw u64
out_iface (*raw u64)

Returns

u64 — a value of this type

open_root_volume

XuAPI
pub fn open_root_volume(st *raw EfiSystemTable, img_handle u64, out_root *raw *raw EfiFileProtocol) u64

Purpose

Open root volume.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
img_handle u64
img_handle (u64)
out_root *raw *raw EfiFileProtocol
out_root (*raw *raw EfiFileProtocol)

Returns

u64 — a value of this type

file_open

XuAPI
pub fn file_open(dir *raw EfiFileProtocol, name_ascii string, out_file *raw *raw EfiFileProtocol) u64

Purpose

File open.

Parameters

dir *raw EfiFileProtocol
directory (*raw EfiFileProtocol)
name_ascii string
name_ascii (string)
out_file *raw *raw EfiFileProtocol
out_file (*raw *raw EfiFileProtocol)

Returns

u64 — a value of this type

file_read

XuAPI
pub fn file_read(file *raw EfiFileProtocol, buf *raw u8, size_io *raw u64) u64

Purpose

File read.

Parameters

file *raw EfiFileProtocol
file (*raw EfiFileProtocol)
buf *raw u8
buffer (*raw u8)
size_io *raw u64
size_io (*raw u64)

Returns

u64 — a value of this type

file_close

XuAPI
pub fn file_close(file *raw EfiFileProtocol) u64

Purpose

File close.

Parameters

file *raw EfiFileProtocol
file (*raw EfiFileProtocol)

Returns

u64 — a value of this type

locate_protocol

XuAPI
pub fn locate_protocol(st *raw EfiSystemTable, guid *raw EfiGuid, out_iface *raw u64) u64

Purpose

Locate protocol.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
guid *raw EfiGuid
guid (*raw EfiGuid)
out_iface *raw u64
out_iface (*raw u64)

Returns

u64 — a value of this type

locate_gop

XuAPI
pub fn locate_gop(st *raw EfiSystemTable) *raw EfiGraphicsOutputProtocol

Purpose

Locate gop.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)

Returns

*raw EfiGraphicsOutputProtocol — a value of this type

exit_boot_services

XuAPI
pub fn exit_boot_services(st *raw EfiSystemTable, img u64, map_key u64) u64

Purpose

Exit boot services.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
img u64
img (u64)
map_key u64
map_key (u64)

Returns

u64 — a value of this type

stall

XuAPI
pub fn stall(st *raw EfiSystemTable, microseconds u64) u64

Purpose

Execute stall.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)
microseconds u64
microseconds (u64)

Returns

u64 — a value of this type

shutdown

XuAPI
pub fn shutdown(st *raw EfiSystemTable)

Purpose

Execute shutdown.

Parameters

st *raw EfiSystemTable
st (*raw EfiSystemTable)

Returns

This call does not return a value.