Problems with Memory-Access (Framegrabber)

Thomas Niederreiter (
Fri, 22 Nov 1996 13:01:40 +0100 (MET)


I have a strange problem with programming a simple framegrabber card.

It uses a memory-area (DOS: c800:0000 - c800:0801) and no io-ports, no
IRQ, no DMA. Quite simple I thought.

I "mmap" the area 0xc8000 with a size of 0x802 into an array and
access now the memory via "buf[offset]".

But..the strange this is, that I have to initialize the card with
a DOS-Programm that was shipped with it, in order to get sensible
values from the memory-area.
I have the FULL source-code to that DOS-Programm (written in C and
uses only pokeb and peekb-calls) and I do exactly the same things
with my linux-program, but It won't work until I booted DOS first and
run that DOS-Programm. (After that I can even hard-reboot - linux access
seems to work).

Is there a linux (I use kernel 2.0.25, 32 MB RAM) system call to
"unlock" a certain memory-area used by an ISA-Card? (from user-space).

I also tried writing a kernel-module that requests the region 0xc8000-
0xc8801 (can then be seen in cat /proc/ioports - even when I mean
MEMORY, not PORTS?)), but it shows the exact same behavior..I have to
start the DOS-Programm first.

To be more precise, this is the way how I test:
I write the whole framebuffer memory with a ascending numbers
(have to select via mem-access each time a new line to be mappened
into memory. )
Then I do the same while reading all values and comparing them to the
values that they should be. -> Every single one is wrong if not initialised
with DOS.
Strange is, that the write-speed is same speed as DOS shows, but reads
are MUCH faster (10 times or something like that) when card is not initialised.

If I run the DOS-Programm first it works and read/write speed is the same.

I hope anybody can help me,



___ ___
/ | \ ___________ | REAL : Thomas Niederreiter: Munich, Germany
/ ~ \/ _ \_ __ \ | EMAIL :
\ Y ( <_> ) | \/ | MUD/IRC: Hor/_Hor
\___|_ / \____/|__| |
\/ All I want is a warm bed and a kind word and unlimited power
-- Ashleigh Brilliant