It seems that in show_id() type of 'walk' variable should of fixed size (i.e. uint32_t) for x86_64 portability.
Also, it looks suspicious that two legacy bios checks (nvidia and general) are exactly the same: if ((*walk) == 0 || ((*walk) & 0x3ff) != 0) { /* We might have an Nvidia chipset bios ... }
if ((*walk) == 0 || ((*walk) & 0x3ff) != 0) { printf("Flash image seems to be a legacy BIOS. Disabling checks.\n"); ...