From: antirez <an...@in...> - 2001-05-14 17:18:54
|
On Mon, May 14, 2001 at 09:50:15AM -0700, James Simmons wrote: > > > No I can't use the no-page trick to remap the videoram pages and change > > the hardware state, unfortunatelly: it seems not possible. > > I used it just to mmap the vmalloc()ed "virtual"-fb memory to userspace. There > > is a different kernel timer that updates the video memory and > > switches the registers to write to the proper video plane. > > Yuck! You can use the no-page trick to handle banked video cards. Its been > done before. Noramlly VGA uses A000 to AFFFF. Once you go beyond that > (B000) you can stop this is in a page fault handler and then program the > register to switch to a new bank. Note you have to keep a eye on what the > current bank is at all times (think SMP). You also have to flush the page > tables so you can keep page faulting :-( I tried something like this but I was unable to keep the page fault: where I can flush the page tables? memory.c will create a page entry with the physical address I returned by the no_page handler, so I should flush the page in mm/memory.c? The other problem is that without a PACKED_PIXEL display all the userspace currently available will not work. To make it working without too problems with old PCs was my goal. Also as you noted you need to flush the page table, and it seems it can't be done in a module ;( BTW the trick is very interesting! I'll try to implement it as 'nonstd == 2' or something like this if I understand how to keep the page faulting. thanks! Salvatore -- Salvatore Sanfilippo <an...@in...> http://www.kyuzz.org/antirez finger an...@te... for PGP key 28 52 F5 4A 49 65 34 29 - 1D 1B F6 DA 24 C7 12 BF |