From 8c8d33fe9f90723b010ccc4aa9dc9c2c42f7d85a Mon Sep 17 00:00:00 2001
From: jkim <jkim@FreeBSD.org>
Date: Wed, 25 Aug 2010 20:52:40 +0000
Subject: [PATCH] Check opcode for short jump as well.  Some option ROMs do
 short jumps (e.g., some NVIDIA video cards) and we were not able to do POST
 while resuming because we only honored long jump.

MFC after:	3 days
---
 sys/compat/x86bios/x86bios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/compat/x86bios/x86bios.c b/sys/compat/x86bios/x86bios.c
index 224520c2c4f9..a8bd69a3f094 100644
--- a/sys/compat/x86bios/x86bios.c
+++ b/sys/compat/x86bios/x86bios.c
@@ -801,7 +801,8 @@ x86bios_get_orm(uint32_t offset)
 
 	/* Does the shadow ROM contain BIOS POST code for x86? */
 	p = x86bios_offset(offset);
-	if (p == NULL || p[0] != 0x55 || p[1] != 0xaa || p[3] != 0xe9)
+	if (p == NULL || p[0] != 0x55 || p[1] != 0xaa ||
+	    (p[3] != 0xe9 && p[3] != 0xeb))
 		return (NULL);
 
 	return (p);