|
2 | 2 | * BIOS Decode
|
3 | 3 | *
|
4 | 4 | * Copyright (C) 2000-2002 Alan Cox <[email protected]>
|
5 |
| - * Copyright (C) 2002-2008 Jean Delvare <[email protected]> |
| 5 | + * Copyright (C) 2002-2015 Jean Delvare <[email protected]> |
6 | 6 | *
|
7 | 7 | * This program is free software; you can redistribute it and/or modify
|
8 | 8 | * it under the terms of the GNU General Public License as published by
|
|
25 | 25 | * are deemed to be part of the source code.
|
26 | 26 | *
|
27 | 27 | * References:
|
28 |
| - * - DMTF "System Management BIOS Reference Specification" |
29 |
| - * Version 2.3.4 |
| 28 | + * - DMTF "System Management BIOS (SMBIOS) Reference Specification" |
| 29 | + * Version 3.0.0 |
30 | 30 | * http://www.dmtf.org/standards/smbios
|
31 | 31 | * - Intel "Preboot Execution Environment (PXE) Specification"
|
32 | 32 | * Version 2.1
|
@@ -90,6 +90,26 @@ struct bios_entry {
|
90 | 90 | * SMBIOS
|
91 | 91 | */
|
92 | 92 |
|
| 93 | +static size_t smbios3_length(const u8 *p) |
| 94 | +{ |
| 95 | + return p[0x06]; |
| 96 | +} |
| 97 | + |
| 98 | +static int smbios3_decode(const u8 *p, size_t len) |
| 99 | +{ |
| 100 | + if (len < 0x18 || !checksum(p, p[0x06])) |
| 101 | + return 0; |
| 102 | + |
| 103 | + printf("SMBIOS %u.%u.%u present.\n", |
| 104 | + p[0x07], p[0x08], p[0x09]); |
| 105 | + printf("\tStructure Table Maximum Length: %u bytes\n", |
| 106 | + DWORD(p+0x0C)); |
| 107 | + printf("\tStructure Table 64-bit Address: 0x%08X%08X\n", |
| 108 | + QWORD(p + 0x10).h, QWORD(p + 0x10).l); |
| 109 | + |
| 110 | + return 1; |
| 111 | +} |
| 112 | + |
93 | 113 | static size_t smbios_length(const u8 *p)
|
94 | 114 | {
|
95 | 115 | return p[0x05] == 0x1E ? 0x1F : p[0x05];
|
@@ -530,6 +550,7 @@ static int fjkeyinf_decode(const u8 *p, size_t len)
|
530 | 550 | */
|
531 | 551 |
|
532 | 552 | static struct bios_entry bios_entries[] = {
|
| 553 | + { "_SM3_", 0, 0xF0000, 0xFFFFF, smbios3_length, smbios3_decode }, |
533 | 554 | { "_SM_", 0, 0xF0000, 0xFFFFF, smbios_length, smbios_decode },
|
534 | 555 | { "_DMI_", 0, 0xF0000, 0xFFFFF, dmi_length, dmi_decode },
|
535 | 556 | { "_SYSID_", 0, 0xE0000, 0xFFFFF, sysid_length, sysid_decode },
|
|
0 commit comments