跳转到内容

std.os.uefi.tables.system_table

标准库Zig 0.17.0官方原文
源码std/os/uefi/tables/system_table.zig

第 1 行

std.os.uefi.tables.system_table.BootServices

别名

第 2 行

别名目标 std.os.uefi.tables.BootServices

std.os.uefi.tables.system_table.ConfigurationTable

别名

第 3 行

别名目标 std.os.uefi.tables.ConfigurationTable

std.os.uefi.tables.system_table.Handle

别名

第 4 行

别名目标 std.os.uefi.Handle

std.os.uefi.tables.system_table.RuntimeServices

别名

第 5 行

别名目标 std.os.uefi.tables.RuntimeServices

std.os.uefi.tables.system_table.SimpleTextInputProtocol

别名

第 6 行

别名目标 std.os.uefi.protocol.SimpleTextInput

std.os.uefi.tables.system_table.SimpleTextOutputProtocol

别名

第 7 行

别名目标 std.os.uefi.protocol.SimpleTextOutput

std.os.uefi.tables.system_table.SystemTable

容器

第 18 行

EFI 系统表包含指向运行时服务表和引导服务表的指针。

system_table 可能随 UEFI 新版本扩展,因此务必检查 hdr.header_size。

成功调用 boot_services.exitBootServices 后,应将 console_in_handle、 con_in、console_out_handle、con_out、standard_error_handle、std_err 和 boot_services 设为 null。将这些属性设为 null 后, 必须重新计算 hdr.crc32。

字段

hdr: TableHeader
firmware_vendor: [*:0]u16

以空字符结尾的字符串,标识生产平台系统固件的厂商。

firmware_revision: u32
console_in_handle: ?Handle
con_in: ?*SimpleTextInputProtocol
console_out_handle: ?Handle
con_out: ?*SimpleTextOutputProtocol
standard_error_handle: ?Handle
std_err: ?*SimpleTextOutputProtocol
runtime_services: *RuntimeServices
boot_services: ?*BootServices
number_of_table_entries: usize
configuration_table: [*]ConfigurationTable

std.os.uefi.tables.system_table.SystemTable.revision_1_02

常量

第 36 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_1_10

常量

第 37 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_00

常量

第 38 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_10

常量

第 39 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_100

常量

第 49 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_110

常量

第 50 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_20

常量

第 40 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_30

常量

第 41 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_31

常量

第 42 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_40

常量

第 43 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_50

常量

第 44 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_60

常量

第 45 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_70

常量

第 46 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_80

常量

第 47 行

u32

std.os.uefi.tables.system_table.SystemTable.revision_2_90

常量

第 48 行

u32

std.os.uefi.tables.system_table.SystemTable.signature

常量

第 35 行

u64

std.os.uefi.tables.system_table.TableHeader

别名

第 8 行

别名目标 std.os.uefi.tables.TableHeader

std.os.uefi.tables.system_table.uefi

别名

第 1 行

别名目标 std.os.uefi

源码

std/os/uefi/tables/system_table.zig

const uefi = @import("std").os.uefi;
const BootServices = uefi.tables.BootServices;
const ConfigurationTable = uefi.tables.ConfigurationTable;
const Handle = uefi.Handle;
const RuntimeServices = uefi.tables.RuntimeServices;
const SimpleTextInputProtocol = uefi.protocol.SimpleTextInput;
const SimpleTextOutputProtocol = uefi.protocol.SimpleTextOutput;
const TableHeader = uefi.tables.TableHeader;

/// EFI 系统表包含指向运行时服务表和引导服务表的指针。
///
/// system_table 可能随 UEFI 新版本扩展,因此务必检查 hdr.header_size。
///
/// 成功调用 boot_services.exitBootServices 后,应将 console_in_handle、
/// con_in、console_out_handle、con_out、standard_error_handle、std_err 和
/// boot_services 设为 null。将这些属性设为 null 后,
/// 必须重新计算 hdr.crc32。
pub const SystemTable = extern struct {
    hdr: TableHeader,

    /// 以空字符结尾的字符串,标识生产平台系统固件的厂商。
    firmware_vendor: [*:0]u16,
    firmware_revision: u32,
    console_in_handle: ?Handle,
    con_in: ?*SimpleTextInputProtocol,
    console_out_handle: ?Handle,
    con_out: ?*SimpleTextOutputProtocol,
    standard_error_handle: ?Handle,
    std_err: ?*SimpleTextOutputProtocol,
    runtime_services: *RuntimeServices,
    boot_services: ?*BootServices,
    number_of_table_entries: usize,
    configuration_table: [*]ConfigurationTable,

    pub const signature: u64 = 0x5453595320494249;
    pub const revision_1_02: u32 = (1 << 16) | 2;
    pub const revision_1_10: u32 = (1 << 16) | 10;
    pub const revision_2_00: u32 = (2 << 16);
    pub const revision_2_10: u32 = (2 << 16) | 10;
    pub const revision_2_20: u32 = (2 << 16) | 20;
    pub const revision_2_30: u32 = (2 << 16) | 30;
    pub const revision_2_31: u32 = (2 << 16) | 31;
    pub const revision_2_40: u32 = (2 << 16) | 40;
    pub const revision_2_50: u32 = (2 << 16) | 50;
    pub const revision_2_60: u32 = (2 << 16) | 60;
    pub const revision_2_70: u32 = (2 << 16) | 70;
    pub const revision_2_80: u32 = (2 << 16) | 80;
    pub const revision_2_90: u32 = (2 << 16) | 90;
    pub const revision_2_100: u32 = (2 << 16) | 100;
    pub const revision_2_110: u32 = (2 << 16) | 110;
};