|
iPXE
|
System Management BIOS. More...
#include <stdint.h>#include <ipxe/api.h>#include <config/general.h>#include <ipxe/null_smbios.h>#include <ipxe/efi/efi_smbios.h>#include <ipxe/linux/linux_smbios.h>#include <bits/smbios.h>Go to the source code of this file.
Data Structures | |
| struct | smbios_entry |
| SMBIOS 32-bit entry point. More... | |
| struct | smbios3_entry |
| SMBIOS 64-bit entry point. More... | |
| struct | smbios_header |
| An SMBIOS structure header. More... | |
| struct | smbios_system_information |
| SMBIOS system information structure. More... | |
| struct | smbios_base_board_information |
| SMBIOS base board information structure. More... | |
| struct | smbios_enclosure_information |
| SMBIOS enclosure information structure. More... | |
| struct | smbios |
| SMBIOS entry point descriptor. More... | |
Macros | |
| #define | PROVIDE_SMBIOS(_subsys, _api_func, _func) |
| Provide an SMBIOS API implementation. | |
| #define | SMBIOS_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '_' << 24 ) ) |
| Signature for 32-bit SMBIOS entry point. | |
| #define | SMBIOS3_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '3' << 24 ) ) |
| Signature for 64-bit SMBIOS entry point. | |
| #define | SMBIOS_TYPE_SYSTEM_INFORMATION 1 |
| SMBIOS system information structure type. | |
| #define | SMBIOS_TYPE_BASE_BOARD_INFORMATION 2 |
| SMBIOS base board information structure type. | |
| #define | SMBIOS_TYPE_ENCLOSURE_INFORMATION 3 |
| SMBIOS enclosure information structure type. | |
| #define | SMBIOS_TYPE_OEM_STRINGS 11 |
| SMBIOS OEM strings structure type. | |
| #define | SMBIOS_TYPE_END 127 |
| SMBIOS end of table type. | |
| #define | SMBIOS_VERSION(major, minor) |
| Calculate SMBIOS version. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| struct smbios_entry | __attribute__ ((packed)) |
| int | find_smbios (struct smbios *smbios) |
| const struct smbios_entry * | find_smbios_entry (const void *start, size_t len) |
| Scan for SMBIOS 32-bit entry point structure. | |
| const struct smbios3_entry * | find_smbios3_entry (const void *start, size_t len) |
| Scan for SMBIOS 64-bit entry point structure. | |
| const struct smbios_header * | smbios_structure (unsigned int type, unsigned int instance) |
| Find specific structure type within SMBIOS. | |
| const char * | smbios_string (const struct smbios_header *header, unsigned int index) |
| Get indexed string within SMBIOS structure. | |
| int | smbios_version (void) |
| Get SMBIOS version. | |
| void | smbios_clear (void) |
| Clear SMBIOS entry point descriptor. | |
Variables | |
| uint32_t | signature |
| Signature. | |
| uint8_t | checksum |
| Checksum. | |
| uint8_t | len |
| Length. | |
| uint8_t | major |
| Major version. | |
| uint8_t | minor |
| Minor version. | |
| uint16_t | max |
| Maximum structure size. | |
| uint8_t | revision |
| Entry point revision. | |
| uint8_t | formatted [5] |
| Formatted area. | |
| uint8_t | dmi_signature [5] |
| DMI Signature. | |
| uint8_t | dmi_checksum |
| DMI checksum. | |
| uint16_t | smbios_len |
| Structure table length. | |
| uint32_t | smbios_address |
| Structure table address. | |
| uint16_t | smbios_count |
| Number of SMBIOS structures. | |
| uint8_t | bcd_revision |
| BCD revision. | |
| uint8_t | extra |
| Signature extra byte. | |
| uint8_t | docrev |
| Documentation revision. | |
| uint8_t | reserved |
| Reserved. | |
| uint8_t | type |
| Type. | |
| uint16_t | handle |
| Handle. | |
| struct smbios_header | header |
| SMBIOS structure header. | |
| uint8_t | manufacturer |
| Manufacturer string. | |
| uint8_t | product |
| Product string. | |
| uint8_t | version |
| Version string. | |
| uint8_t | serial |
| Serial number string. | |
| uint8_t | uuid [16] |
| UUID. | |
| uint8_t | wakeup |
| Wake-up type. | |
| uint8_t | asset_tag |
| Asset tag. | |
| struct smbios | __attribute__ |
System Management BIOS.
Definition in file smbios.h.
| #define PROVIDE_SMBIOS | ( | _subsys, | |
| _api_func, | |||
| _func ) |
Provide an SMBIOS API implementation.
| _prefix | Subsystem prefix |
| _api_func | API function |
| _func | Implementing function |
Definition at line 24 of file smbios.h.
| #define SMBIOS_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '_' << 24 ) ) |
Signature for 32-bit SMBIOS entry point.
Definition at line 36 of file smbios.h.
Referenced by efi_find_smbios(), and find_smbios_entry().
| #define SMBIOS3_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '3' << 24 ) ) |
Signature for 64-bit SMBIOS entry point.
Definition at line 40 of file smbios.h.
Referenced by efi_find_smbios(), and find_smbios3_entry().
| #define SMBIOS_TYPE_SYSTEM_INFORMATION 1 |
SMBIOS system information structure type.
Definition at line 148 of file smbios.h.
Referenced by __setting(), __setting(), __setting(), __setting(), and smsc95xx_vm3_fetch_mac().
| #define SMBIOS_TYPE_BASE_BOARD_INFORMATION 2 |
SMBIOS base board information structure type.
Definition at line 165 of file smbios.h.
Referenced by __setting().
| #define SMBIOS_TYPE_ENCLOSURE_INFORMATION 3 |
SMBIOS enclosure information structure type.
Definition at line 184 of file smbios.h.
Referenced by __setting().
| #define SMBIOS_TYPE_OEM_STRINGS 11 |
SMBIOS OEM strings structure type.
Definition at line 187 of file smbios.h.
Referenced by smsc95xx_vm3_fetch_mac().
| #define SMBIOS_TYPE_END 127 |
SMBIOS end of table type.
Definition at line 190 of file smbios.h.
Referenced by smbios_structure().
Calculate SMBIOS version.
| major | Major version |
| minor | Minor version |
| version | SMBIOS version |
Definition at line 216 of file smbios.h.
Referenced by bios_find_smbios2(), bios_find_smbios3(), efi_find_smbios(), and smbios_fetch().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
| struct smbios_entry __attribute__ | ( | (packed) | ) |
|
extern |
References header, index, len, start, and type.
Referenced by PROVIDE_SMBIOS(), PROVIDE_SMBIOS(), PROVIDE_SMBIOS(), smbios_structure(), and smbios_version().
|
extern |
Scan for SMBIOS 32-bit entry point structure.
| start | Start address of region to scan |
| len | Length of region to scan |
| entry | SMBIOS entry point structure, or NULL if not found |
Definition at line 70 of file smbios.c.
References DBGC, len, smbios_entry::len, smbios_entry::major, smbios_entry::minor, NULL, offset, smbios_entry::signature, smbios_checksum(), SMBIOS_SIGNATURE, and start.
Referenced by bios_find_smbios2().
|
extern |
Scan for SMBIOS 64-bit entry point structure.
| start | Start address of region to scan |
| len | Length of region to scan |
| entry | SMBIOS entry point structure, or NULL if not found |
Definition at line 116 of file smbios.c.
References DBGC, len, smbios3_entry::len, smbios3_entry::major, smbios3_entry::minor, NULL, offset, smbios3_entry::signature, SMBIOS3_SIGNATURE, smbios_checksum(), and start.
Referenced by bios_find_smbios3().
|
extern |
Find specific structure type within SMBIOS.
| type | Structure type to search for |
| instance | Instance of this type of structure |
| structure | SMBIOS structure header, or NULL if not found |
Definition at line 183 of file smbios.c.
References smbios::address, assert, count, smbios::count, DBGC, find_smbios(), find_strings_terminator(), smbios::len, smbios_header::len, NULL, offset, rc, SMBIOS_TYPE_END, smbios_header::type, and type.
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
|
extern |
Get indexed string within SMBIOS structure.
| structure | SMBIOS structure header |
| index | String index |
| string | SMBIOS string, or NULL if not fond |
Definition at line 252 of file smbios.c.
References smbios::address, assert, DBGC, index, len, smbios_header::len, NULL, string, and strlen().
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
|
extern |
Get SMBIOS version.
| version | Version, or negative error |
Definition at line 285 of file smbios.c.
References smbios::address, assert, find_smbios(), NULL, rc, and smbios::version.
Referenced by smbios_fetch().
|
extern |
| uint32_t signature |
| uint8_t formatted[5] |
Formatted area.
Definition at line 18 of file smbios.h.
Referenced by uri_churi_okx(), and uri_resolve_okx().
| uint8_t extra |
Signature extra byte.
Definition at line 6 of file smbios.h.
Referenced by asn1_grow(), asn1_parse_gcm(), deflate_inflate(), and gzip_extract().
| uint16_t handle |
Handle.
Definition at line 5 of file smbios.h.
Referenced by chained_locate(), dbg_efi_opener(), dbg_efi_openers(), dbg_efi_protocol(), dbg_efi_protocols(), efi_autoexec_filesystem(), efi_autoexec_load(), efi_autoexec_network(), efi_block_boot(), efi_block_connect(), efi_block_filename(), efi_block_local(), efi_block_match(), efi_block_root(), efi_block_scan(), efi_close_by_child(), efi_close_by_driver(), efi_close_protocol_wrapper(), efi_close_unsafe(), efi_download_install(), efi_download_uninstall(), efi_driver_handles(), efi_dump_image(), efi_file_install(), efi_file_path_claim(), efi_file_uninstall(), efi_handle_name(), efi_handle_protocol_wrapper(), efi_image_exec(), efi_image_probe(), efi_init_stack_guard(), efi_install_multiple_protocol_interfaces_wrapper(), efi_install_protocol_interface_wrapper(), efi_open_by_child_untyped(), efi_open_by_driver_untyped(), efi_open_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_open_unsafe_untyped(), efi_open_untyped(), efi_protocols_per_handle_wrapper(), efi_pxe_find(), efi_pxe_install(), efi_pxe_uninstall(), efi_reinstall_protocol_interface_wrapper(), efi_service_add(), efi_service_del(), efi_shim_inhibit_pxe(), efi_shim_install(), efi_stack_cookie(), efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_veto_close(), efi_veto_close_handle(), efi_veto_close_protocol(), efi_veto_disconnect(), efi_wrap_image(), efipci_discover(), efipci_discover_any(), efipci_discover_one(), efipci_ioremap(), efipci_read(), efipci_root_open(), efipci_write(), FILE_SECBOOT(), find_snpdev(), mnptemp_create(), phantom_poll(), phantom_post_rds(), phantom_refill_rx_ring(), usbio_bulk_in_poll(), usbio_bulk_out_poll(), usbio_config(), usbio_control_poll(), usbio_endpoint_open(), usbio_interface(), usbio_interfaces(), usbio_interrupt_callback(), usbio_interrupt_open(), usbio_open(), usbio_path(), usbio_start(), usbio_stop(), and usbio_supported().
| struct smbios_header header |
| uint8_t manufacturer |
Manufacturer string.
Definition at line 3 of file smbios.h.
Referenced by __setting(), efi_veto(), efi_veto_dhcp6(), efi_veto_find(), efi_veto_hp_xhci(), efi_veto_ip4config(), efi_veto_vmware_uefipxebc(), and smsc95xx_vm3_fetch_mac().
| uint8_t product |
Product string.
Definition at line 5 of file smbios.h.
Referenced by __setting(), aes_entry_column(), bigint_mod_exp_ladder(), bigint_mod_exp_raw(), x25519_multiply_step1::bigint_t(), x25519_multiply_step2::bigint_t(), ecdsa_alloc(), ecdsa_init_values(), ecdsa_invert(), ecdsa_sign_rs(), ecdsa_verify_rs(), isa_id_string(), smsc95xx_vm3_fetch_mac(), weierstrass_done_raw(), weierstrass_exec(), weierstrass_init_curve(), weierstrass_init_raw(), and x25519_invert_okx().
| uint8_t asset_tag |