From owner-freebsd-small Wed Aug 25 2:14:47 1999 Delivered-To: freebsd-small@freebsd.org Received: from dingo.cdrom.com (castles553.castles.com [208.214.165.117]) by hub.freebsd.org (Postfix) with ESMTP id 03621157B9 for ; Wed, 25 Aug 1999 02:14:40 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id CAA02321; Wed, 25 Aug 1999 02:06:33 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199908250906.CAA02321@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Tim Tsai Cc: freebsd-small@freeBSD.ORG Subject: Re: porting a DOS application (also DOC booting) In-reply-to: Your message of "Wed, 25 Aug 1999 03:54:48 CDT." <19990825035448.A17461@futuresouth.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 25 Aug 1999 02:06:33 -0700 From: Mike Smith Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I am considering porting an embedded DOS based application to PicoBSD and > I have a few questions. > > 1) is it possible to boot off the DiskOnChip (fla) driver? It should be yes. If not, the changes are likely to be trivial. > 2) I have 4 megs of DRAM - I am assuming that's sufficient. The > application itself might take up as low as 512k but I'll be more > comfortable with 1meg. You should be able to sqeak through with this. > 3) Can PicoBSD be configured relatively easily to run from a read-only > partition (to minimize any possibility of corruption) or will I have to > go the "run-off-MFS" route? Since you will be replacing /sbin/init with your custom application, this is entirely up to you. > 4) does anybody envision a problem sustaining 115,200 baud on COM1 on a > 386sx-40? It has a 16550 UART and we'll most likely configure the > receive FIFO to be 8 characters deep (that's what works best in DOS). This is entirely dependant on what else you're doing. If your application can keep up, you'll be fine. > 5) we're going to need to store data to both DOC and a PCMCIA ATA Flash > card (the PCMCIA will have to a DOS partition). Since we preallocate > space for all storage in a big file before operations, ideally we do not > want any writes to the FAT table. I don't see any convenient flags in > either mount_msdos or mount to do this. Any problems if I just modify > the MSDOS driver to not bother writing just to update the time? (I hope > it'll be a relatively easy thing!). Time is not stored in the FAT, so this is a non-issue. Timestamps on disk are only updated on open/close AFAIK, so that also is a non-issue. > 6) I've got a POS hardware that we must interface to that'll require about > a 50 nanosecond sleep between byte writes. In DOS I have a carefully > calibrated delay loop for this. What is a reasonable method to do this > with FreeBSD? For this kind of delay on a 386, is there any point of even > making system or kernel calls? You can't possibly have a "carefully calibrated delay loop" on a 386sx40 that runs for 50 nanoseconds, since the clock cycle is five times that. If you know the ISA bus timing on your hardware, you can use a series of writes to an unassigned port to obtain a guaranteed minimum delay. If your platform has a high-resolution cycle timer, you can poll that. If you're doing this from user-space, you won't upset the interrupt handler for the UART. If you're doing it in kernel space, you should be sensitive to where you place the delays to avoid same. In the kernel you can expect DELAY(50) to give you at least 50us delay (since I assume this is what you really mean). > Lastly, anything to keep in mind before I base a $10,000 product on > FreeBSD? :-) It's a good choice. Last job I had we based a $100,000+ product on FreeBSD, and made enough money at it to keep us all fed and working. -- \\ The mind's the standard \\ Mike Smith \\ of the man. \\ msmith@freebsd.org \\ -- Joseph Merrick \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message