public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Miller <miller@techsource.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: HELP: Linux replacement for "DOS diagnostic" station
Date: Mon, 08 Mar 2004 18:17:23 -0500	[thread overview]
Message-ID: <404CFF03.1090601@techsource.com> (raw)

Like many companies that do hardware development (PCI cards, etc.), when 
we here first produce a board, the first things we do is put it into a 
DOS machine and run our diagnostic tools on it.  We're running the DOS 
version that came with Windows 3.11, and we use the Watcom C compiler 
that lets us run our software in protected mode, so we have access to 
32-bit address space.

Some advantages of this approach:
- Single-tasking environment, so we can do polling on devices in real-time
- No memory protection, so we can access all device memory directly
- No instruction set restrictions, so we can execute I/O instructions 
directly
- Access to PCI config space (via I/O instructions)
- The computer boots up in seconds

Disadvantages include:
- No modern compiler
- No debugging tools
- DOS command shell is a lousy working environment
- Dwindling support for DOS NIC drivers from motherboard manufacturers


We are doing some forward-looking thinking about how we're going to 
replace this environment in the not-to-distant future.  We are looking 
at Linux as the environment we want to use.  Some of the features we're 
thinking of include:

- Kernel support for basically nothing but Ethernet, text-mode console, 
and USB (ie. IDE and floppy not necessarily supported).
- Boot from USB flash dongle.
- Hand-code init so that services are loaded in parallel
- Fill the rest of the USB dongle with development tools
- Put the rest of the tools on NFS.


There are a number of issues that we have to cover (such as what 
filesystem to use on the flash and how to make the flash bootable), but 
the biggest concern is that we absolutely MUST have un restricted access 
to physical memory, I/O space, and config space from user-space programs.

So, first of all, we need to make /dev/mem accessible to all users. 
Secondly, we need some mechanism to access I/O and config space, but it 
can be indirect through ioctl.

Is there a driver for Linux which supports I/O and config space access 
for user-space programs in a completely generic way?

Another occurrence is that sometimes, PCI config space on a new device 
is 'broken' and therefore confuses the OS trying to map it.  We'll need 
to be able to override the OS in a way that doesn't interfere with other 
devices.  That is, we need to (a) indicate which device NOT to map, (b) 
query which memory areas have been allocated to other devices, and (c) 
program in our own desired physical addresses into config space.

Does anyone have suggestions?

Thanks!


             reply	other threads:[~2004-03-08 23:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-08 23:17 Timothy Miller [this message]
2004-03-09  0:18 ` HELP: Linux replacement for "DOS diagnostic" station H. Peter Anvin
2004-03-09 12:18 ` Michael Frank
2004-03-09 16:56 ` Jesse Pollard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=404CFF03.1090601@techsource.com \
    --to=miller@techsource.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox