| 1 |
|
| 2 |
|
| 3 |
#include <smbios.h> |
| 4 |
#include <stdio.h> |
| 5 |
#include <types.h> |
| 6 |
|
| 7 |
#include "eeprom.h" |
| 8 |
|
| 9 |
const char *smbios_system_serial_number(void) |
| 10 |
{ |
| 11 |
const size_t offset = offsetof(struct eeprom_layout, system_serial_number); |
| 12 |
return eeprom_read_serial(offset, CONFIG_MAINBOARD_SERIAL_NUMBER); |
| 13 |
} |
| 14 |
|
| 15 |
const char *smbios_mainboard_serial_number(void) |
| 16 |
{ |
| 17 |
const size_t offset = offsetof(struct eeprom_layout, board_serial_number); |
| 18 |
return eeprom_read_serial(offset, CONFIG_MAINBOARD_SERIAL_NUMBER); |
| 19 |
} |
| 20 |
|
| 21 |
const char *smbios_mainboard_version(void) |
| 22 |
{ |
| 23 |
static char version_str[8] = { 0 }; |
| 24 |
|
| 25 |
snprintf(version_str, sizeof(version_str), "HSI %u", get_bmc_hsi()); |
| 26 |
|
| 27 |
return version_str; |
| 28 |
} |