From: krw Date: Thu, 1 Sep 2022 08:18:20 +0000 (+0000) Subject: Delete force CHS remnants here too. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c1de27d7461d03c1ebaab80b4d56873db5e87930;p=openbsd Delete force CHS remnants here too. Makes file identical to amd64 version again. ok mlarkin@ --- diff --git a/sys/arch/i386/stand/biosboot/biosboot.S b/sys/arch/i386/stand/biosboot/biosboot.S index 790e80a104c..f7ddd7e47e3 100644 --- a/sys/arch/i386/stand/biosboot/biosboot.S +++ b/sys/arch/i386/stand/biosboot/biosboot.S @@ -1,4 +1,4 @@ -/* $OpenBSD: biosboot.S,v 1.44 2020/03/09 06:16:56 otto Exp $ */ +/* $OpenBSD: biosboot.S,v 1.45 2022/09/01 08:18:20 krw Exp $ */ /* * Copyright (c) 2003 Tobias Weingartner @@ -114,17 +114,10 @@ * * All of these are patched directly into the code where they are used * (once only, each), to save space. - * - * One more symbol is exported, in anticipation of a "-c" flag in - * installboot to force CHS reads: - * - * force_chs uint8 set to the value 1 to force biosboot to use CHS - * reads (this will of course cause the boot sequence - * to fail if /boot is above 8 GB). */ .globl inodeblk, inodedbl, fs_bsize_p, fsbtodb, p_offset, nblocks - .globl fs_bsize_s, force_chs, blkincr + .globl fs_bsize_s, blkincr .type inodeblk, @function .type inodedbl, @function .type fs_bsize_p, @function @@ -132,7 +125,6 @@ .type fsbtodb, @function .type p_offset, @function .type nblocks, @function - .type force_chs, @function .type blkincr, @function @@ -240,56 +232,17 @@ main: /* * We're going to print our sign-on message. * - * We're now LBA-aware, and will use LBA to load /boot if the - * BIOS says it's available. However, we have seen machines - * where CHS is required even when LBA is available. Therefore - * we provide a way to force CHS use: - * - * If the SHIFT key is held down on entry, force CHS reads. - */ - movw $load_msg+1, %si /* "Loading" */ - movb %dl, %dh - - /* - * BIOS call "INT 0x16 Get Keyboard Shift Flags - * Call with %ah = 0x02 - * Return: - * %al = shift flags - * %ah - undefined by many BIOSes - */ - movb $0x02, %ah - int $0x16 - - /* - * We provide the ability to force CHS use without having to hold - * down the SHIFT key each boot. Just set the byte at force_chs - * to 1 (more accurately any value with either of the bottom two - * bits set, but the use of 1 is recommended). + * We're now LBA-aware, and will use LBA to load /boot if + * it's available. */ -force_chs = .+1 - orb $0, %al - - testb $0x3, %al /* Either shift key down? */ - jz no_force_chs - - decw %si /* "!Loading" indicates forced CHS */ - xorb %dh, %dh /* Pretend a floppy, so no LBA use */ - -no_force_chs: - /* Print pretty message */ - call Lmessage + movw $load_msg, %si /* "Loading" */ + call Lmessage /* Print pretty message */ /* - * We will use LBA reads if we have LBA support, so find out. - */ - - /* - * But don't even try on floppies, OR if forcing to CHS. - * - * (We're really testing %dl, but use %dh so we can force the - * top bit to zero to force CHS boot.) + * We will use LBA reads if we have LBA support, but don't even try + * on floppies. */ - testb $0x80, %dh + testb $0x80, %dl jz no_lba /* @@ -895,7 +848,7 @@ lba_sector: .long 0, 0 /* sector number */ load_msg: - .asciz "!Loading" + .asciz "Loading" err_txt_crlf: .ascii "\r\n" err_txt: