From 75d0d027193a94d213512e0a816ba055ed640416 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 22 Aug 2003 01:59:28 +0000 Subject: [PATCH] Many newer CF do not handle having the entire track read from them at boot time. Instead, read it a sector at a time. While this sounds like a significant slowdown, I've not been able to measure any signficant difference. Submitted by: luigi Reviewed by: jhb, sam (both a while ago) MFC After: 3 days --- sys/boot/i386/boot2/boot1.S | 4 ++++ sys/boot/i386/boot2/boot1.s | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/boot/i386/boot2/boot1.S b/sys/boot/i386/boot2/boot1.S index e6cdab0ca156..f7d9df6dad8b 100644 --- a/sys/boot/i386/boot2/boot1.S +++ b/sys/boot/i386/boot2/boot1.S @@ -299,7 +299,11 @@ read: push %dx // Save mov 0x2(%bp),%ah // Blocks to read cmpb %ah,%al // To read jb read.2 // this +#ifdef TRACK_AT_A_TIME movb %ah,%al // track +#else + movb $1,%al // one sector +#endif read.2: mov $0x5,%di // Try count read.3: les 0x4(%bp),%bx // Transfer buffer push %ax // Save diff --git a/sys/boot/i386/boot2/boot1.s b/sys/boot/i386/boot2/boot1.s index e6cdab0ca156..f7d9df6dad8b 100644 --- a/sys/boot/i386/boot2/boot1.s +++ b/sys/boot/i386/boot2/boot1.s @@ -299,7 +299,11 @@ read: push %dx // Save mov 0x2(%bp),%ah // Blocks to read cmpb %ah,%al // To read jb read.2 // this +#ifdef TRACK_AT_A_TIME movb %ah,%al // track +#else + movb $1,%al // one sector +#endif read.2: mov $0x5,%di // Try count read.3: les 0x4(%bp),%bx // Transfer buffer push %ax // Save