|
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_SINGLE_API ( SMBIOS_PREFIX_ ## _subsys, _api_func, _func ) |
| Provide an SMBIOS API implementation. More... | |
| #define | SMBIOS_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '_' << 24 ) ) |
| Signature for 32-bit SMBIOS entry point. More... | |
| #define | SMBIOS3_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '3' << 24 ) ) |
| Signature for 64-bit SMBIOS entry point. More... | |
| #define | SMBIOS_TYPE_SYSTEM_INFORMATION 1 |
| SMBIOS system information structure type. More... | |
| #define | SMBIOS_TYPE_BASE_BOARD_INFORMATION 2 |
| SMBIOS base board information structure type. More... | |
| #define | SMBIOS_TYPE_ENCLOSURE_INFORMATION 3 |
| SMBIOS enclosure information structure type. More... | |
| #define | SMBIOS_TYPE_OEM_STRINGS 11 |
| SMBIOS OEM strings structure type. More... | |
| #define | SMBIOS_TYPE_END 127 |
| SMBIOS end of table type. More... | |
| #define | SMBIOS_VERSION(major, minor) ( ( (major) << 8 ) | (minor) ) |
| Calculate SMBIOS version. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| 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. More... | |
| const struct smbios3_entry * | find_smbios3_entry (const void *start, size_t len) |
| Scan for SMBIOS 64-bit entry point structure. More... | |
| const struct smbios_header * | smbios_structure (unsigned int type, unsigned int instance) |
| Find specific structure type within SMBIOS. More... | |
| const char * | smbios_string (const struct smbios_header *header, unsigned int index) |
| Get indexed string within SMBIOS structure. More... | |
| int | smbios_version (void) |
| Get SMBIOS version. More... | |
| void | smbios_clear (void) |
| Clear SMBIOS entry point descriptor. More... | |
System Management BIOS.
Definition in file smbios.h.
| #define PROVIDE_SMBIOS | ( | _subsys, | |
| _api_func, | |||
| _func | |||
| ) | PROVIDE_SINGLE_API ( SMBIOS_PREFIX_ ## _subsys, _api_func, _func ) |
| #define SMBIOS_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '_' << 24 ) ) |
| #define SMBIOS3_SIGNATURE ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '3' << 24 ) ) |
| #define SMBIOS_TYPE_SYSTEM_INFORMATION 1 |
| #define SMBIOS_TYPE_BASE_BOARD_INFORMATION 2 |
| #define SMBIOS_TYPE_ENCLOSURE_INFORMATION 3 |
| #define SMBIOS_TYPE_OEM_STRINGS 11 |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| struct smbios_entry __attribute__ | ( | (packed) | ) |
| int find_smbios | ( | struct smbios * | smbios | ) |
Referenced by smbios_structure(), and smbios_version().
| const struct smbios_entry* find_smbios_entry | ( | const void * | start, |
| size_t | len | ||
| ) |
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 69 of file smbios.c.
References DBGC, smbios_entry::len, len, smbios_entry::major, smbios_entry::minor, NULL, offset, smbios_entry::signature, smbios_checksum(), SMBIOS_SIGNATURE, and start.
Referenced by bios_find_smbios2().
| const struct smbios3_entry* find_smbios3_entry | ( | const void * | start, |
| size_t | len | ||
| ) |
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 115 of file smbios.c.
References DBGC, smbios3_entry::len, len, smbios3_entry::major, smbios3_entry::minor, NULL, offset, smbios3_entry::signature, SMBIOS3_SIGNATURE, smbios_checksum(), and start.
Referenced by bios_find_smbios3().
| const struct smbios_header* smbios_structure | ( | unsigned int | type, |
| unsigned int | instance | ||
| ) |
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 182 of file smbios.c.
References smbios::address, assert(), smbios::count, count, DBGC, find_smbios(), find_strings_terminator(), smbios_header::len, smbios::len, NULL, offset, rc, SMBIOS_TYPE_END, type, and smbios_header::type.
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
| const char* smbios_string | ( | const struct smbios_header * | structure, |
| unsigned int | index | ||
| ) |
Get indexed string within SMBIOS structure.
| structure | SMBIOS structure header |
| index | String index |
| string | SMBIOS string, or NULL if not fond |
Definition at line 251 of file smbios.c.
References smbios::address, assert(), DBGC, index, smbios_header::len, len, NULL, string, and strlen().
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
| int smbios_version | ( | void | ) |
Get SMBIOS version.
| version | Version, or negative error |
Definition at line 284 of file smbios.c.
References smbios::address, assert(), find_smbios(), NULL, rc, and smbios::version.
Referenced by smbios_fetch().
| void smbios_clear | ( | void | ) |
Clear SMBIOS entry point descriptor.
Definition at line 300 of file smbios.c.
References smbios::address, and NULL.
| uint32_t signature |
| uint8_t formatted[5] |
Formatted area.
Definition at line 29 of file smbios.h.
Referenced by uri_churi_okx(), and uri_resolve_okx().
| uint8_t extra |
Signature extra byte.
Definition at line 17 of file smbios.h.
Referenced by asn1_grow(), deflate_inflate(), and gzip_extract().
| uint16_t handle |
Handle.
Definition at line 16 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_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(), 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 14 of file smbios.h.
Referenced by efi_veto(), 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 16 of file smbios.h.
Referenced by aes_entry_column(), bigint_mod_exp_ladder(), bigint_mod_exp_raw(), isa_id_string(), smsc95xx_vm3_fetch_mac(), weierstrass_exec(), weierstrass_init(), and x25519_invert_okx().
UUID.
Definition at line 22 of file smbios.h.
Referenced by format_uuid_setting(), parse_uuid_setting(), peerdisc_create(), and smbios_fetch().
| struct smbios __attribute__ |
1.8.15