--- Net2/arch/i386/stand/fdbootblk.c 2018/04/24 18:07:28 1.1.1.3 +++ Net2/arch/i386/stand/fdbootblk.c 2018/04/24 18:20:32 1.1.1.5 @@ -33,7 +33,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)fdbootblk.c 7.2 (Berkeley) 5/4/91 + * from: @(#)fdbootblk.c 7.2 (Berkeley) 5/4/91 + * fdbootblk.c,v 1.4 1993/05/22 08:02:15 cgd Exp */ /* @@ -45,6 +46,14 @@ * execute. * * No attempt is made to handle disk errors. + * + * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE + * -------------------- ----- ---------------------- + * CURRENT PATCH LEVEL: 1 00073 + * -------------------- ----- ---------------------- + * + * 22 Jan 93 Frank Maclachlan Fixed NOP's to read correct register + * */ /*#include "/sys/i386/isa/isa.h" #include "/sys/i386/isa/fdreg.h"*/ @@ -54,7 +63,7 @@ /* mumbo-jumbo to pacify DOS, in the hope of getting diskcopy to work */ jmp 1f - .asciz "386BSD " + .asciz "NetBSD " .byte 1 # sectors per allocation .word 15 # additional sectors for bootstrap .word 0 # number of DOS fat sectors @@ -176,7 +185,7 @@ dodisk: outb %al,$0x20 NOP - movb $0x07,%al + movb $0xbf,%al # enable floppy interrupt, mask out rest outb %al,$0x21 NOP 8: @@ -185,12 +194,12 @@ dodisk: /* Set read/write bytes */ xorl %edx,%edx - movb $0x0c,%dl # outb(0xC,0x46); outb(0xB,0x46); - movb $0x46,%al - outb %al,%dx + movb $0x0c,%dl # outb(0xC,junk); outb(0xB,0x46); + outb %al,%dx # reset DMA controller first/last flip-flop NOP decb %dx - outb %al,%dx + movb $0x46,%al # single mode, write mem, chan 2 + outb %al,%dx # output DMA controller mode byte /* Send start address */ movb $0x04,%dl # outb(0x4, addr);