Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 1997 10:36:01 -0700
From:      Julian Elischer <julian@whistle.com>
To:        Steve Howe <un_x@anchorage.net>
Cc:        freebsd-hackers <hackers@FreeBSD.ORG>
Subject:   Re: direct access
Message-ID:  <33AEB401.446B9B3D@whistle.com>
References:  <Pine.BSF.3.95q.970623030537.23252A-100000@aak.anchorage.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Steve Howe wrote:
> 
>
> why is everyone telling me what i'm doing is no good for anything?
> either i'm crazy, or y'all know all possible uses of everything?
> hehe!  i have code that lets me execute a function and
> will list all devices connected via PC ports, and that is
> highly desirable to me.  maybe not to you, but to me it is.
> i don't have to open a PC to see what's in it.
> cuz sometimes my pc's are underground.
> so reading ports directly is
> important to me.
>

I think you've asked the wrong questions then..
Firstly:
you don't want to probe ports while the system is running
you could seriously confuse things,
because the system is using these devices constantly,
even when you are doing nothing..

boot from a floppy and have your diagnostic there
(I've previously explained how to do that)



> haha!  no, but i have no need for flow control at 9600 bps in a
> 80x186 @ 8mhz with an 8250 in an "ethernet" type radio modem network.
> thanks though - i appreciate your valuable information.

BSD will not run on a 186
but a 386sx20 will run ports at 115000 without flow control.



> that's what i think i want - a bogus environment.
> whatever is simple & fast.  in this application,
> i don't care about the code running on SunOS.
> i have specific apps, and they will run on low end
> PC systems, in highly controlled, 1 user environments.

if you are wanting to use less than 386 machines you need to go
elsewhere.


> ok - then i guess i want OS services ...
> spiffo?  hehe!  this is not a problem, this stuff runs under very
> controlled, non-interactive environments.  can't i create a lockfile
> like any other app that uses a device?

for some devices, yes.
for others no.


> i see a few generalizations about device drivers,
> but no solid instructions / rules for FreeBSD.

in /usr/share/examples/drivers 
are two shell scripts that WRITE A DRIVER FOR YOU

juat answer the questions
then take the output
and fill in the bits you want to add.


> because i am dealing with unique hardware, a2d cards, parallel i/o
> cards, 8530's, that the kernel will know nothing about, and i need
> simple and effective ways of dealing with them.  some people say
> UN*X is no good for embedded systems because drivers are such a
> hassle.  maybe they are?  i don't know.
no they are easy..
you want a driver.
Use the example driver programs
then your application rograms become SO SIMPLE.


> 
> > learn about what's going on, attach a debugger to the kernel and
> > look at both the source _and_ the data.

with 2 machines hooked together with a serial cable
and the right s/w loaded,
you can single step the 2md machine in the kernel
and examine each line of C as it's run, and look at all variables,
structures etc.
THAT is educational, as it takes into account all the mappings for you.



> 
> > Hah.  'fsdb' is your friend here.  Don't expect to be able to cruise
> > your disks looking for the magic bit to twiddle to "undlete" your
> > files though.  Aside from that, use something like beav on the disk
> > devices, while they are unmounted.
> 
> thanks.  i've heard many others ask, but never saw an answer.
> i need something that will do a search on every block.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33AEB401.446B9B3D>