iPXE
|
System Management BIOS. More...
#include <stdint.h>
#include <ipxe/api.h>
#include <config/general.h>
#include <ipxe/uaccess.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_structure |
SMBIOS structure descriptor. 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) |
int | find_smbios_entry (userptr_t start, size_t len, struct smbios_entry *entry) |
Scan for SMBIOS entry point structure. More... | |
int | find_smbios_structure (unsigned int type, unsigned int instance, struct smbios_structure *structure) |
Find specific structure type within SMBIOS. More... | |
int | read_smbios_structure (struct smbios_structure *structure, void *data, size_t len) |
Copy SMBIOS structure. More... | |
int | read_smbios_string (struct smbios_structure *structure, unsigned int index, void *data, size_t len) |
Find 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 find_smbios_structure(), and smbios_version().
int find_smbios_entry | ( | userptr_t | start, |
size_t | len, | ||
struct smbios_entry * | entry | ||
) |
Scan for SMBIOS entry point structure.
start | Start address of region to scan |
len | Length of region to scan |
entry | SMBIOS entry point structure to fill in |
rc | Return status code |
Definition at line 52 of file smbios.c.
References assert(), copy_from_user(), DBG, ENODEV, entry, len, offset, SMBIOS_SIGNATURE, start, and user_to_phys().
Referenced by bios_find_smbios().
int find_smbios_structure | ( | unsigned int | type, |
unsigned int | instance, | ||
struct smbios_structure * | structure | ||
) |
Find specific structure type within SMBIOS.
type | Structure type to search for |
instance | Instance of this type of structure |
structure | SMBIOS structure descriptor to fill in |
rc | Return status code |
Definition at line 118 of file smbios.c.
References smbios::address, assert(), copy_from_user(), count, smbios::count, DBG, ENOENT, find_smbios(), find_strings_terminator(), smbios_structure::header, smbios_header::len, smbios::len, smbios_structure::offset, offset, rc, SMBIOS_TYPE_END, smbios_structure::strings_len, type, smbios_header::type, and UNULL.
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
int read_smbios_structure | ( | struct smbios_structure * | structure, |
void * | data, | ||
size_t | len | ||
) |
Copy SMBIOS structure.
structure | SMBIOS structure descriptor |
data | Buffer to hold SMBIOS structure |
len | Length of buffer |
rc | Return status code |
Definition at line 189 of file smbios.c.
References smbios::address, assert(), copy_from_user(), data, smbios_structure::header, len, smbios_header::len, smbios_structure::offset, and UNULL.
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
int read_smbios_string | ( | struct smbios_structure * | structure, |
unsigned int | index, | ||
void * | data, | ||
size_t | len | ||
) |
Find indexed string within SMBIOS structure.
structure | SMBIOS structure descriptor |
index | String index |
data | Buffer for string |
len | Length of string buffer |
rc | Length of string, or negative error |
Definition at line 209 of file smbios.c.
References smbios::address, assert(), copy_from_user(), data, DBG, ENOENT, smbios_structure::header, index, len, smbios_header::len, smbios_structure::offset, offset, smbios_structure::strings_len, strlen_user(), and UNULL.
Referenced by smbios_fetch(), and smsc95xx_vm3_fetch_mac().
int smbios_version | ( | void | ) |
Get SMBIOS version.
version | Version, or negative error |
Definition at line 247 of file smbios.c.
References smbios::address, assert(), find_smbios(), rc, UNULL, and smbios::version.
Referenced by smbios_fetch().
void smbios_clear | ( | void | ) |
Clear SMBIOS entry point descriptor.
Definition at line 263 of file smbios.c.
References smbios::address, and UNULL.
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(), asn1_start(), deflate_inflate(), der_probe(), and gzip_extract().
uint16_t handle |
Handle.
Definition at line 16 of file smbios.h.
Referenced by dbg_efi_opener(), dbg_efi_openers(), dbg_efi_protocols(), efi_block_boot_image(), efi_close_protocol_wrapper(), 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_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_protocols_per_handle_wrapper(), efi_pxe_find(), efi_pxe_install(), efi_pxe_uninstall(), efi_reinstall_protocol_interface_wrapper(), efi_shim_exit_boot_services(), efi_shim_inhibit_pxe(), efi_shim_install(), efi_stack_cookie(), efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_veto_close_handle(), efi_veto_close_protocol(), efi_veto_disconnect(), efi_wrap(), efipci_ioremap(), efipci_read(), efipci_root_close(), efipci_root_match(), efipci_root_open(), efipci_write(), find_snpdev(), 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 __attribute__ |
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(), and efi_veto_ip4config().
uint8_t product |
Product string.
Definition at line 16 of file smbios.h.
Referenced by __attribute__(), and isa_id_string().
UUID.
Definition at line 22 of file smbios.h.
Referenced by format_uuid_setting(), peerdisc_create(), and smbios_fetch().