File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ 2017-04-27 Jean Delvare <jdelvare@suse.de>
2
+
3
+ Update to support SMBIOS specification version 3.1.0.
4
+
5
+ * dmidecode.c: Add support for extended BIOS ROM size (DMI type 0).
6
+
1
7
2017-04-11 Jean Delvare <jdelvare@suse.de>
2
8
3
9
* util.c: Don't leak a file descriptor in function read_file.
Original file line number Diff line number Diff line change @@ -295,6 +295,18 @@ static void dmi_bios_runtime_size(u32 code)
295
295
printf (" %u kB" , code >> 10 );
296
296
}
297
297
298
+ static void dmi_bios_rom_size (u8 code1 , u16 code2 )
299
+ {
300
+ static const char * unit [4 ] = {
301
+ "MB" , "GB" , out_of_spec , out_of_spec
302
+ };
303
+
304
+ if (code1 != 0xFF )
305
+ printf (" %u kB" , (code1 + 1 ) << 6 );
306
+ else
307
+ printf (" %u %s" , code2 & 0x3FFF , unit [code2 >> 14 ]);
308
+ }
309
+
298
310
static void dmi_bios_characteristics (u64 code , const char * prefix )
299
311
{
300
312
/* 7.1.1 */
@@ -3271,8 +3283,9 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
3271
3283
dmi_bios_runtime_size ((0x10000 - WORD (data + 0x06 )) << 4 );
3272
3284
printf ("\n" );
3273
3285
}
3274
- printf ("\tROM Size: %u kB\n" ,
3275
- (data [0x09 ] + 1 ) << 6 );
3286
+ printf ("\tROM Size:" );
3287
+ dmi_bios_rom_size (data [0x09 ], h -> length < 0x1A ? 16 : WORD (data + 0x18 ));
3288
+ printf ("\n" );
3276
3289
printf ("\tCharacteristics:\n" );
3277
3290
dmi_bios_characteristics (QWORD (data + 0x0A ), "\t\t" );
3278
3291
if (h -> length < 0x13 ) break ;
You can’t perform that action at this time.
0 commit comments