lkml.org 
[lkml]   [1999]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectAutomatic bank switching for a frame grabber?
Hi,

I have a ISA frame grabber card with 2 MB of memory on it. This
memory is accesed through a one MB memory window at address 0xf00000.
A bit in a control register switches between the two memory banks.

No, what I would like to do is to mmap the frame grabber memory into a
user processes address space so that the user process sees it as two
MB of memory without having to do the bank switching manually.

Is it possible to do this? I have a vague memory of someone doing
something like this for GGI and an old bank switching VGA adapter.

It should be doable since it's essentially the same as a mmap of a
file, but I simply don't know enough about the MM layer do do this
myself.

I guess this is whatI want to do:

page_fault_handler(void *address)
{
if (address >= high_bank)
{
outb(0x01, bank_ctrl);
set_prot_flags(low_bank, 0x100000, PROT_NONE);
set_prot_flags(high_bank, 0x100000, PROT_READ | PROT_WRITE);
}
else
{
outb(0x00, bank_ctrl);
set_prot_flags(low_bank, 0x100000, PROT_READ | PROT_WRITE);
set_prot_flags(high_bank, 0x100000, PROT_NONE);
}
}

/Christer

--
If it's tourist season, why can't we shoot them?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.071 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site