|
iPXE
|
System Management BIOS. More...
#include <stdint.h>#include <string.h>#include <errno.h>#include <assert.h>#include <ipxe/uaccess.h>#include <ipxe/smbios.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static uint8_t | smbios_checksum (const void *start, size_t len) |
| Calculate SMBIOS entry point structure checksum. More... | |
| 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... | |
| static size_t | find_strings_terminator (size_t offset) |
| Find SMBIOS strings terminator. 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 *structure, 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... | |
Variables | |
| static struct smbios | smbios |
| SMBIOS entry point descriptor. More... | |
System Management BIOS.
Definition in file smbios.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Calculate SMBIOS entry point structure checksum.
| start | Start address of region |
| len | Length of entry point structure |
| sum | Byte checksum |
Definition at line 51 of file smbios.c.
Referenced by find_smbios3_entry(), and find_smbios_entry().
| 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().
Find SMBIOS strings terminator.
| offset | Offset to start of strings |
| offset | Offset to strings terminator, or 0 if not found |
Definition at line 160 of file smbios.c.
References __attribute__, smbios::address, assert(), smbios::len, NULL, and offset.
Referenced by smbios_structure().
| 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.
1.8.15