[comp.os.minix] Compiling Minix with MSC. Also, SMC disk controller

ericr@ipmoea (Eric Roskos) (07/10/87)

This message has two separate subjects (it's very hard to post from here,
because I haven't written a postnews yet, so I have to conserve messages),
so if the first subject doesn't interest you, please skip to the 2nd.

First:

Recently I posted a query here as to whether anyone had experience with
the Modular Circuit Technologies hard disk controller under Minix, and
promised to summarize the results.  To summarize,

1) It is another of the ones that doesn't work with Minix (without
   driver modifications)

2) Apparently it uses the Scientific Microsystems disk controller, which was
   apparently one of the first disk controllers to come out, according to
   someone who replied.

also, in case anyone wonders,

3) I don't have it working yet with Minix either, but plan to.

Thanks are due to Thomas Sumner (thos@ucsfcca) for his reply to my query.


Second:

Now, to get to the main question: for the past two weeks, I've been working
on trying to get Minix to compile with the Microsoft C compiler.  This has
been mostly productive, since the code is smaller than the original Minix
(and should be substantially smaller with the new 5.0 compiler), but I have
run into a couple of problems that I hope someone may know the answers to:

1) What are the "absread" and "abswrite" functions that are used in build.c
to write the boot disk out under DOS?  I had assumed that they were just
simple calls to the DOS absolute disk I/O routines, (not the BIOS, the DOS
ones), but after finding it didn't work and doing several days of debugging
on it, I've reached the conclusion that these apparently write the disk
sectors out in a different physical sequence than the Minix boot code tries
to read in.  I think this because if I examine the contents of the generated
boot disk with the debugger, everything is in the right place, but if I add
code to the bootblok to print out selected parts of the code loaded from
the disk, it's wrong.  Obviously, there could be something else causing it,
but the above is the most likely hypothesis at present...

In any case, I can't find sources for "absread" and "abswrite" on the Minix
source disks, so I suspect maybe they were a C86 library feature.  Does anyone
know details of this, and of how they worked?

2) In the routine mm_init() in the file main.c in mm, on line 5517 in the
textbook, mm_init calls a routine called get_tot_mem().  I can't figure out
where this routine is in the source files!  It's not in the cross reference
at the end of the book, and I've been unsuccessful in searching for it with
grep.  Can anyone tell me where it is?

I'm literally bootstrapping this system (in the other sense of the word)
from the source disks under DOS, because I only have 1 floppy disk drive on
my machine (I do have a 386 machine at work, but Minix won't boot on it).
This has been fairly successful, in that I have at least gotten everything
but mm compiled and linked (including init, fsck, and bootblok), but am
bogged down at this point.  I'm hoping someone else out there who is working
on this same effort (compiling Minix with MSC) will have some insights; maybe
I can offer insights into some other problem I've found, in return.  (There
are quite a few, trying to get it to compile with MSC.)  I know some people
have mentioned doing this, but so far cannot get a reply by email from any
of those who have posted.  If you are interested in this, and would like
to correspond on the subject, please send me email.  I'll summarize if there
is sufficient interest.

Note: MSC means "Microsoft C".

----
Eric Roskos, uw-beaver!tikal!amc!ipmoea!ericr

Disclaimer:  This is not a work-related project, is not funded by any company,
and is just me in my room.  However, as some readers may be quick to point out,
I do work for one of those big software companies, so I must stress that any
opinions expressed here are my own.  PS - ipmoea is just a Taiwanese PC clone.

mark@imagen.UUCP (Mark Peek) (07/14/87)

In article <6@ipmoea.UUCP>, ericr@ipmoea (Eric Roskos) writes:
> Recently I posted a query here as to whether anyone had experience with
> the Modular Circuit Technologies hard disk controller under Minix, and
> promised to summarize the results.  To summarize,
> 
> 1) It is another of the ones that doesn't work with Minix (without
>    driver modifications)
> 
> 2) Apparently it uses the Scientific Microsystems disk controller, which was
>    apparently one of the first disk controllers to come out, according to
>    someone who replied.
> 
> also, in case anyone wonders,
> 
> 3) I don't have it working yet with Minix either, but plan to.
> 
> Thanks are due to Thomas Sumner (thos@ucsfcca) for his reply to my query.

	I have an LDS (I think that is the name) controller that uses the
SMC 9224 (Universal Disk Controller) part. It behaves almost identical to
an MCT that is here at work. Since I could not get a hardware manual for
either of them, I spent part of my weekend disassembling the fixed disk bios
that is on-board the controller. It was quite enlightening to see how different
my controller is than the IBM spec controller.

	I am starting on the Minix device driver for it and I should have it
finished in the next few days (the hard part is figuring out how to address the
9224). If anyone with these type of controllers would like to beta test it
before I release it to the net, just drop me a line.

		Mark

----

Name:	Mark Peek
Mail:	Imagen Corp. 2650 San Tomas Expressway, P.O. Box 58101
        Santa Clara, CA 95052-8101
AT&T:	(408) 986-9400
UUCP:	...{decvax,ucbvax}!decwrl!imagen!mark
ARPA:	mark@ford-scf1.arpa