summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand/libsa/biosdev.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-03-14 22:14:41 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-03-14 22:14:41 +0000
commit69b33539c4420ab485161d9744ad57280e229fa7 (patch)
treeb5502d3403d4ba32abc4a364e1499192a6ec4d5b /sys/arch/amd64/stand/libsa/biosdev.h
parent26cdeae19d2eaec023adb36e2b08a132e413779b (diff)
Clamp BIOS io attempts to < 2 ^28 - 1 sectors (a.k.a. 128GB for
512-byte sectors) as some BIOSen get confused when we ask for sectors higher up. Uss u_int throughout the boot code to calculate sector addresses, since 32 bits is enough to do 28 ^ 1 - 1 arithmetic. Add checks for wraparound. I can now install and boot from the 7th extended partition below 128GB. Much feedback & guidance from deraadt@. Also from weingart@ on BIOS io. ok deraadt@ (less a couple of minor tweaks found in testing)
Diffstat (limited to 'sys/arch/amd64/stand/libsa/biosdev.h')
-rw-r--r--sys/arch/amd64/stand/libsa/biosdev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/libsa/biosdev.h b/sys/arch/amd64/stand/libsa/biosdev.h
index 765ba0d0e59..fc0a0ce69ea 100644
--- a/sys/arch/amd64/stand/libsa/biosdev.h
+++ b/sys/arch/amd64/stand/libsa/biosdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.h,v 1.3 2011/03/13 00:13:52 deraadt Exp $ */
+/* $OpenBSD: biosdev.h,v 1.4 2011/03/14 22:14:40 krw Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -49,7 +49,7 @@ int biosopen(struct open_file *, ...);
int biosclose(struct open_file *);
int biosioctl(struct open_file *, u_long, void *);
int bios_getdiskinfo(int, bios_diskinfo_t *);
-int biosd_io(int, bios_diskinfo_t *, daddr32_t, int, void *);
+int biosd_io(int, bios_diskinfo_t *, u_int, int, void *);
const char * bios_getdisklabel(bios_diskinfo_t *, struct disklabel *);
/* diskprobe.c */