Workaround a bug in the BIOS of Dell R900 machines. Specifically, each

entry in the SMAP is a 20 byte structure and they are queried from the
BIOS via sucessive BIOS calls.  Due to an apparent bug in the R900's
BIOS, for some SMAP requests the BIOS overflows the 20 byte buffer
trashing a few bytes of memory immediately after the SMAP structure.  As
a workaround, add 8 bytes of padding after the SMAP structure used in
the loader for SMAP queries.

PR:		i386/122668
Submitted by:	Mike Hibler  mike flux.utah.edu, silby
MFC after:	3 days
This commit is contained in:
jhb 2008-06-07 03:07:32 +00:00
parent f031db47ee
commit 0c94928735

View File

@ -39,7 +39,10 @@ __FBSDID("$FreeBSD$");
#include "libi386.h"
#include "btxv86.h"
static struct bios_smap smap;
static struct {
struct bios_smap _smap_entry;
char pad[8]; /* Bad BIOS writer, no cookie! */
} smap;
static struct bios_smap *smapbase;
static int smaplen;