From a5431d9245451bd4bc859f729a302d1c1c9094f2 Mon Sep 17 00:00:00 2001 From: Bernd Boeckmann Date: Tue, 19 Dec 2023 16:18:22 +0100 Subject: [PATCH] remove BIOS assisted LBA translation, not sure its worth including it --- kernel/initdisk.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/kernel/initdisk.c b/kernel/initdisk.c index c6e6029..6e60cab 100644 --- a/kernel/initdisk.c +++ b/kernel/initdisk.c @@ -630,15 +630,6 @@ void DosDefinePartition(struct DriveParamS *driveParam, nUnits++; } -STATIC UWORD BIOS_assisted_LBA_heads(ULONG sectors) -{ - if (sectors > 63ul * 128ul * 1024ul) return 255; - else if (sectors > 63ul * 64ul * 1024ul) return 128; - else if (sectors > 63ul * 32ul * 1024ul) return 64; - else if (sectors > 63ul * 16ul * 1024ul) return 32; - else return 16; -} - /* Get the parameters of the hard disk */ STATIC int LBA_Get_Drive_Parameters(int drive, struct DriveParamS *driveParam, int firstPass) { @@ -757,14 +748,6 @@ StandardBios: /* old way to get parameters */ printf("BIOS reported 0 sectors/track, assuming 63!\n"); } - /* If heads < 2, this is probably wrong?!? - Then determine heads from disk size like BIOS assisted LBA does */ - if (driveParam->chs.Head < 2) { - driveParam->chs.Head = BIOS_assisted_LBA_heads(driveParam->total_sectors); - if (firstPass && (InitKernelConfig.Verbose >= 0)) - printf("BIOS reported <2 heads, assuming %u!\n", driveParam->chs.Head); - } - if (!(driveParam->descflags & DF_LBA)) { driveParam->total_sectors =