iPXE
|
ACPI support functions. More...
#include <errno.h>
#include <byteswap.h>
#include <ipxe/uaccess.h>
#include <ipxe/acpi.h>
#include <ipxe/interface.h>
Go to the source code of this file.
Macros | |
#define | colour FADT_SIGNATURE |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
typeof (acpi_finder=acpi_find) | |
ACPI table finder. More... | |
void | acpi_fix_checksum (struct acpi_header *acpi) |
Fix up ACPI table checksum. More... | |
userptr_t | acpi_table (uint32_t signature, unsigned int index) |
Locate ACPI table. More... | |
userptr_t | acpi_find_via_rsdt (uint32_t signature, unsigned int index) |
Locate ACPI table via RSDT. More... | |
static int | acpi_zsdt (userptr_t zsdt, uint32_t signature, void *data, int(*extract)(userptr_t zsdt, size_t len, size_t offset, void *data)) |
Extract value from DSDT/SSDT. More... | |
int | acpi_extract (uint32_t signature, void *data, int(*extract)(userptr_t zsdt, size_t len, size_t offset, void *data)) |
Extract value from DSDT/SSDT. More... | |
void | acpi_add (struct acpi_descriptor *desc) |
Add ACPI descriptor. More... | |
void | acpi_del (struct acpi_descriptor *desc) |
Remove ACPI descriptor. More... | |
struct acpi_descriptor * | acpi_describe (struct interface *intf) |
Get object's ACPI descriptor. More... | |
int | acpi_install (int(*install)(struct acpi_header *acpi)) |
Install ACPI tables. More... | |
ACPI support functions.
Definition in file acpi.c.
#define colour FADT_SIGNATURE |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
typeof | ( | acpi_finder = | acpi_find | ) |
ACPI table finder.
May be overridden at link time to inject tables for testing.Compute ACPI table checksum
table | Any ACPI table |
checksum | 0 if checksum is good |
Definition at line 45 of file acpi.c.
References acpi, copy_from_user(), data, le32_to_cpu, length, and offsetof.
Referenced by acpi_find_via_rsdt(), aes_entry_column(), ar9002_hw_proc_txdesc(), ar9003_hw_proc_txdesc(), arbel_create_recv_wq(), arbel_fill_mlx_send_wqe(), arbel_fill_rc_send_wqe(), arbel_fill_ud_send_wqe(), asn1_bit_string(), asn1_built(), dhcpv6_iaaddr(), dhcpv6_rx(), dns_question(), dns_resolv(), dns_xfer_deliver(), draw_setting_row(), efi_ifr_string(), efi_nullify_pxe(), efi_nullify_snp(), efi_path_uri(), efi_pxe_ip_filter(), efi_pxe_ip_sockaddr(), exanic_poll_rx(), exanic_transmit(), fc_fill_sockaddr(), fcoe_deliver(), fcoe_fip_rx_els_response(), gve_poll_rx(), hash_df(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), hv_wait_for_message(), ib_sbft_install(), ibft_install(), int13_extended_rw(), int13_get_extended_parameters(), int13_load_eltorito(), interrupt_dump(), ipv6conf_rx_router_advertisement(), jme_poll(), list_test_exec(), md4_final(), md5_final(), meme820(), natsemi_create_ring(), ncm_in_complete(), ncm_out_transmit(), ndp_rx_neighbour(), ndp_rx_neighbour_advertisement_ll_target(), ndp_rx_neighbour_solicitation_ll_source(), ndp_rx_router_advertisement(), ndp_rx_router_advertisement_ll_source(), ntlm_response(), peerblk_parse_block(), peerblk_parse_useless(), peerblk_retrieval_open(), peerdist_info_v1_block(), pxebs_list(), select_setting_row(), sha1_final(), sha256_final(), sha512_final(), tls_client_hello(), tls_send_certificate(), tls_send_client_key_exchange_dhe(), usb_describe(), and usb_get_mtu().
void acpi_fix_checksum | ( | struct acpi_header * | acpi | ) |
Fix up ACPI table checksum.
acpi | ACPI table header |
Definition at line 85 of file acpi.c.
References acpi, and virt_to_user().
Referenced by efi_block_install(), and int13_install().
Locate ACPI table.
signature | Requested table signature |
index | Requested index of table with this signature |
table | Table, or UNULL if not found |
Definition at line 98 of file acpi.c.
References acpi_finder, index, and signature.
Referenced by acpi_extract(), acpi_poweroff(), acpi_settings_fetch(), acpi_timer_probe(), and ecam_find().
Locate ACPI table via RSDT.
signature | Requested table signature |
index | Requested index of table with this signature |
table | Table, or UNULL if not found |
Definition at line 110 of file acpi.c.
References acpi, acpi_rsdt::acpi, acpi_find_rsdt(), acpi_name(), colour, copy_from_user(), count, cpu_to_le32, DBG, DBGC, DBGC_HDA, acpi_rsdt::entry, index, le32_to_cpu, len, offsetof, phys_to_user(), RSDT_SIGNATURE, signature, typeof(), UNULL, and user_to_phys().
Referenced by acpi_find().
|
static |
Extract value from DSDT/SSDT.
zsdt | DSDT or SSDT |
signature | Signature (e.g. "_S5_") |
data | Data buffer |
extract | Extraction method |
rc | Return status code |
Definition at line 198 of file acpi.c.
References acpi, acpi_name(), copy_from_user(), cpu_to_le32, data, DBGC, ENOENT, le32_to_cpu, len, offset, rc, signature, and user_to_phys().
Referenced by acpi_extract().
int acpi_extract | ( | uint32_t | signature, |
void * | data, | ||
int(*)(userptr_t zsdt, size_t len, size_t offset, void *data) | extract | ||
) |
Extract value from DSDT/SSDT.
signature | Signature (e.g. "_S5_") |
data | Data buffer |
extract | Extraction method |
rc | Return status code |
Definition at line 240 of file acpi.c.
References acpi_name(), acpi_table(), acpi_zsdt(), colour, copy_from_user(), data, DBGC, acpi_fadt::dsdt, ENOENT, FADT_SIGNATURE, phys_to_user(), rc, signature, and SSDT_SIGNATURE.
Referenced by acpi_mac(), and acpi_poweroff().
void acpi_add | ( | struct acpi_descriptor * | desc | ) |
Add ACPI descriptor.
desc | ACPI descriptor |
Definition at line 287 of file acpi.c.
References desc, list_add_tail, and ref_get.
Referenced by sanpath_open().
void acpi_del | ( | struct acpi_descriptor * | desc | ) |
Remove ACPI descriptor.
desc | ACPI descriptor |
Definition at line 299 of file acpi.c.
References desc, list_check_contains_entry, list_del, and ref_put.
Referenced by sandev_undescribe(), and sanpath_open().
struct acpi_descriptor* acpi_describe | ( | struct interface * | intf | ) |
Get object's ACPI descriptor.
intf | Interface |
desc | ACPI descriptor, or NULL |
Definition at line 313 of file acpi.c.
References acpi_describe(), acpi_describe_TYPE, desc, dest, interface::intf, intf_get_dest_op, intf_object(), intf_put(), NULL, and op.
Referenced by acpi_describe(), and sanpath_open().
int acpi_install | ( | int(*)(struct acpi_header *acpi) | install | ) |
Install ACPI tables.
install | Table installation method |
rc | Return status code |
Definition at line 336 of file acpi.c.
References ACPI_MODELS, for_each_table_entry, acpi_model::install, and rc.
Referenced by dummy_san_describe(), efi_block_describe(), and int13_describe().