|
iPXE
|
ACPI support functions. More...
#include <string.h>#include <errno.h>#include <byteswap.h>#include <ipxe/uaccess.h>#include <ipxe/iomap.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... | |
| const struct acpi_header * | acpi_table (uint32_t signature, unsigned int index) |
| Locate ACPI table. More... | |
| const struct acpi_header * | acpi_find_via_rsdt (uint32_t signature, unsigned int index) |
| Locate ACPI table via RSDT. More... | |
| static int | acpi_zsdt (const struct acpi_header *zsdt, uint32_t signature, void *data, int(*extract)(const struct acpi_header *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)(const struct acpi_header *zsdt, size_t len, size_t offset, void *data)) |
| Extract value from DSDT/SSDT. More... | |
| void * | acpi_ioremap (struct acpi_address *address, size_t len) |
| Map an ACPI generic address. 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
| acpi | Any ACPI table header |
| checksum | 0 if checksum is good |
Definition at line 47 of file acpi.c.
References acpi, le32_to_cpu, and len.
Referenced by 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_built(), asn1_enter_bits(), dhcpv6_iaaddr(), dhcpv6_rx(), dns_question(), dns_resolv(), dns_xfer_deliver(), draw_setting_row(), ecam_find(), efi_ifr_string(), efi_nullify_pxe(), efi_nullify_snp(), efi_path_uri(), efi_pxe_ip_filter(), efi_pxe_ip_sockaddr(), efisig_asn1(), exanic_transmit(), fc_fill_sockaddr(), fcoe_deliver(), fcoe_fip_rx_els_response(), gve_describe(), 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(), spcr_console(), 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 79 of file acpi.c.
References acpi.
Referenced by efi_block_install(), and int13_install().
| const struct acpi_header* acpi_table | ( | uint32_t | signature, |
| unsigned int | index | ||
| ) |
Locate ACPI table.
| signature | Requested table signature |
| index | Requested index of table with this signature |
| table | Table, or NULL if not found |
Definition at line 92 of file acpi.c.
References acpi_finder, index, and signature.
Referenced by acpi_extract(), acpi_poweroff(), acpi_settings_fetch(), acpi_timer_probe(), ecam_find(), and spcr_console().
| const struct acpi_header* acpi_find_via_rsdt | ( | uint32_t | signature, |
| unsigned int | index | ||
| ) |
Locate ACPI table via RSDT.
| signature | Requested table signature |
| index | Requested index of table with this signature |
| table | Table, or NULL if not found |
Definition at line 105 of file acpi.c.
References acpi_rsdt::acpi, acpi_find_rsdt(), acpi_name(), colour, count, cpu_to_le32, DBG, DBGC, DBGC_HDA, acpi_rsdt::entry, index, le32_to_cpu, len, acpi_header::length, NULL, RSDT_SIGNATURE, signature, and acpi_header::signature.
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 184 of file acpi.c.
References acpi_name(), cpu_to_le32, data, DBGC, ENOENT, le32_to_cpu, len, acpi_header::length, memcpy(), offset, rc, and signature.
Referenced by acpi_extract().
| int acpi_extract | ( | uint32_t | signature, |
| void * | data, | ||
| int(*)(const struct acpi_header *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 227 of file acpi.c.
References acpi, acpi_name(), acpi_table(), acpi_zsdt(), colour, container_of, data, DBGC, acpi_fadt::dsdt, ENOENT, FADT_SIGNATURE, rc, signature, and SSDT_SIGNATURE.
Referenced by acpi_mac(), and acpi_poweroff().
| void* acpi_ioremap | ( | struct acpi_address * | address, |
| size_t | len | ||
| ) |
Map an ACPI generic address.
| address | Generic address |
| len | Length of region |
| io_addr | I/O address, or NULL on error |
Definition at line 269 of file acpi.c.
References ACPI_ADDRESS_TYPE_IO, ACPI_ADDRESS_TYPE_MEM, address, base, ioremap(), le64_to_cpu, len, and NULL.
Referenced by spcr_16550().
| void acpi_add | ( | struct acpi_descriptor * | desc | ) |
Add ACPI descriptor.
| desc | ACPI descriptor |
Definition at line 294 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 306 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 320 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 343 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().
1.8.15