wedeck@iravcl.ira.uka.de (Joerg Wedeck) (05/29/90)
Here are the diffs for using Minix with a seagate scsi hostadapter. the primary goal of this posting is, that Minix can boot with an scsi hostadapter. if you want to ACCESS the scsi-disk, you have to use bios_wini.c, the disadvantage is, that Minix is not running in protected mode. when you modify at_wini.c, minix is running in protected mode, but it cannot (yet) access the scsi-disk. There is currently only one difference between my at_wini.c and the original one: the number of drives is explicitly set to 1, so the driver does not try to read the partition table of the scsi-disk (this causes a crash). i hope, i will be able to post the a working scsi driver in the next two months. the diffs are based on version 1.59. ------------------------------cut here--------------------------------- echo x - at_wini.c.cdif sed '/^X/s///' > at_wini.c.cdif << '/' X*** at_wini.c Sat May 5 15:42:44 1990 X--- scsi_wini.c Mon May 28 10:28:59 1990 X*************** X*** 471,476 **** X--- 471,482 ---- X /* Get the nummer of drives from the bios */ X phys_copy(0x475L, umap(proc_ptr, D, (vir_bytes)buf, 1), 1L); X nr_drives = (int) *buf; X+ X+ /* quick and dirty, for use of Minix with an scsi-controller. */ X+ /* the scsi disk cannot yet be accessed */ X+ X+ nr_drives = 1; X+ X if (nr_drives > MAX_DRIVES) nr_drives = MAX_DRIVES; X X /* Set the parameters in the drive structure */ / echo x - bootblok.cdif sed '/^X/s///' > bootblok.cdif << '/' X*** bootblok.orig Mon May 21 23:56:38 1990 X--- bootblok.s Tue May 22 00:10:34 1990 X*************** X*** 25,34 **** X BOOTSEG = 0x3FA0 | here it will copy itself (256K-1.5K) X DSKBASE = 120 | 120 = 4 * 0x1E = ptr to disk parameters X X! final = 504 X! menu_ds = 506 X! menu_pc = 508 X! menu_cs = 510 X X X .globl begtext, begdata, begbss, endtext, enddata, endbss | asld needs these X--- 25,34 ---- X BOOTSEG = 0x3FA0 | here it will copy itself (256K-1.5K) X DSKBASE = 120 | 120 = 4 * 0x1E = ptr to disk parameters X X! final = 502 X! menu_ds = 504 X! menu_pc = 506 X! menu_cs = 508 X X X .globl begtext, begdata, begbss, endtext, enddata, endbss | asld needs these / echo x - build.c.cdif sed '/^X/s///' > build.c.cdif << '/' X*** build.orig Mon May 21 23:56:46 1990 X--- build.c Mon May 28 00:13:00 1990 X*************** X*** 448,457 **** X ++sectrs; X X read_block(0, ubuf); /* read in boot block */ X! ubuf[(SECTOR_SIZE/2) - 4] = sectrs; X! ubuf[(SECTOR_SIZE/2) - 3] = ds; X! ubuf[(SECTOR_SIZE/2) - 2] = ip; X! ubuf[(SECTOR_SIZE/2) - 1] = cs; X write_block(0, ubuf); X } X X--- 448,458 ---- X ++sectrs; X X read_block(0, ubuf); /* read in boot block */ X! ubuf[(SECTOR_SIZE/2) - 5] = sectrs; X! ubuf[(SECTOR_SIZE/2) - 4] = ds; X! ubuf[(SECTOR_SIZE/2) - 3] = ip; X! ubuf[(SECTOR_SIZE/2) - 2] = cs; X! ubuf[(SECTOR_SIZE/2) - 1] = 0xAA55; /* magic number for SCSI-Bios */ X write_block(0, ubuf); X } X / ------------------------- Joerg Wedeck Forschungszentrum Informatik an der Universitaet Karlsruhe Haid- und Neu Str. 10 - 14 7500 Karlsruhe West Germany