Page MenuHomeFreeBSD

D14341.id39236.diff
No OneTemporary

D14341.id39236.diff

Index: stand/i386/libi386/biosdisk.c
===================================================================
--- stand/i386/libi386/biosdisk.c
+++ stand/i386/libi386/biosdisk.c
@@ -122,6 +122,8 @@
#define BD(dev) (bdinfo[(dev)->d_unit])
+static void bd_io_workaround(struct disk_devdesc *dev);
+
static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
caddr_t dest);
static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks,
@@ -726,6 +728,15 @@
return (0);
}
+static void
+bd_io_workaround(struct disk_devdesc *dev)
+{
+ uint8_t buf[8 * 1024];
+
+ bd_edd_io(dev, 0xffffffff, 1, (caddr_t)buf, 0);
+}
+
+
static int
bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write)
{
@@ -739,6 +750,17 @@
resid = blks;
p = dest;
+ /*
+ * Workaround for a problem with some HP ProLiant BIOS failing to work out
+ * the boot disk after installation. hrs and kuriyama discovered this
+ * problem with an HP ProLiant DL320e Gen 8 with a 3TB HDD, and discovered
+ * that an int13h call seems to cause a buffer overrun in the bios. The
+ * problem is alleviated by doing an extra read before the buggy read. It
+ * is not immediately known whether other models are similarly affected.
+ */
+ if (dblk >= 0x100000000)
+ bd_io_workaround(dev);
+
/* Decide whether we have to bounce */
if (VTOP(dest) >> 20 != 0 || (BD(dev).bd_unit < 0x80 &&
(VTOP(dest) >> 16) != (VTOP(dest +

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 30, 12:17 PM (9 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30576591
Default Alt Text
D14341.id39236.diff (1 KB)

Event Timeline