diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2020-03-09 06:16:57 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2020-03-09 06:16:57 +0000 |
commit | 6f8b3d77296cd33aad00b67fa827f37f41187e26 (patch) | |
tree | 241edac4f307c17c5ae5a810a61e7583ad5e3344 /sys/arch/i386 | |
parent | 17bc656393fede29483e1d66cb5856dc100132e7 (diff) |
Recommit, now that we found out how to fix the BIOS related issues: go
back to a 4 byte add instruction.
We do not know *why* though, so if somebody likes a challenge...
Lots of help from semarie@ who has a few systems showing the issue.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/stand/biosboot/biosboot.S | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/biosboot/biosboot.S b/sys/arch/i386/stand/biosboot/biosboot.S index d58b4326946..790e80a104c 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.43 2020/03/07 15:11:50 otto Exp $ */ +/* $OpenBSD: biosboot.S,v 1.44 2020/03/09 06:16:56 otto Exp $ */ /* * Copyright (c) 2003 Tobias Weingartner @@ -108,6 +108,9 @@ * While this can be calculated as * howmany(di_size, fs_bsize) it takes us too * many code bytes to do it. + * blkincr uint8 the increment used to parse di_db[]. set to four by + * installboot for ffs2 (due to 64-bit blocks) and should + * be zero for ffs1. * * All of these are patched directly into the code where they are used * (once only, each), to save space. @@ -121,7 +124,7 @@ */ .globl inodeblk, inodedbl, fs_bsize_p, fsbtodb, p_offset, nblocks - .globl fs_bsize_s, force_chs + .globl fs_bsize_s, force_chs, blkincr .type inodeblk, @function .type inodedbl, @function .type fs_bsize_p, @function @@ -130,6 +133,7 @@ .type p_offset, @function .type nblocks, @function .type force_chs, @function + .type blkincr, @function /* Clobbers %ax, maybe more */ @@ -461,6 +465,15 @@ load_blocks: /* Get the next filesystem block number into %eax */ lodsl /* %eax = *(%si++), make sure 0x66 0xad */ + /* + * The addw could be a 3 byte instruction, but stick to a 4 byte + * one since the former inroduces mysterious hangs on *some* + * BIOS implementations, possibly alignment related. + * Grand prize for somebody finding the root cause! + */ +blkincr = .+2 + addw $0x90, %si /* adjust %si if needed (for ffs2) */ + pushal /* Save all 32-bit registers */ /* |