Skip to content

Commit 6d8234b

Browse files
committed
Do not print the BIOS base address and runtime size if the base address is
0. This happens on IA-64 because there's no BIOS.
1 parent c46e50f commit 6d8234b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

dmidecode.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,11 +2878,19 @@ static void dmi_decode(struct dmi_header *h, u16 ver)
28782878
dmi_string(h, data[0x05]));
28792879
printf("\tRelease Date: %s\n",
28802880
dmi_string(h, data[0x08]));
2881-
printf("\tAddress: 0x%04X0\n",
2882-
WORD(data+0x06));
2883-
printf("\tRuntime Size:");
2884-
dmi_bios_runtime_size((0x10000-WORD(data+0x06))<<4);
2885-
printf("\n");
2881+
/*
2882+
* On IA-64, the BIOS base address will read 0 because
2883+
* there is no BIOS. Skip the base address and the
2884+
* runtime size in this case.
2885+
*/
2886+
if(WORD(data+0x06)!=0)
2887+
{
2888+
printf("\tAddress: 0x%04X0\n",
2889+
WORD(data+0x06));
2890+
printf("\tRuntime Size:");
2891+
dmi_bios_runtime_size((0x10000-WORD(data+0x06))<<4);
2892+
printf("\n");
2893+
}
28862894
printf("\tROM Size: %u kB\n",
28872895
(data[0x09]+1)<<6);
28882896
printf("\tCharacteristics:\n");

0 commit comments

Comments
 (0)