Skip to contentSkip to conversation

please explain to me why video/bios shadowing must be disabled to use graphics... -- Victory!!!

DISCUSSION Stas Sergeev 2 participants 2 messages Oct 17, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 3 lines · Bart Oldeman
Quoted 2 lines

slower than xdos... why ioperm() doesn't allow

Quoted 1 line

0x3ff ports?..

Once upon a time Linus decided that a 128 byte per-process i/o bitmap is ok, but 8192 bytes is excessively large.

Yes, and there was a reason then, which was that ISA had 10-bit IO space most likely, but why it wasn't altered since, is still unclear.

Quoted 1 line

see also iopl(2)

I don't think it can be used. Even if I trap int10, do iopl(3), then trap iret and do iopl(0), it is still dangerous, because pesky vbios calls some other ints in a mean time.
iopl() is used in ports.c anyway to access that ports...
I think there is no way around: VESA in WinXP have the same speed (which means that they also doesn't have an ability to manipulate the large IO bitmap? - strange).

#1 lore raw
Quoted 10 lines · Stas Sergeev
Quoted 4 lines · Bart Oldeman
Quoted 2 lines

slower than xdos... why ioperm() doesn't allow

Quoted 1 line

0x3ff ports?..

Once upon a time Linus decided that a 128 byte per-process i/o bitmap is ok, but 8192 bytes is excessively large.

Yes, and there was a reason then, which was that ISA had 10-bit IO space most likely, but why it wasn't altered since, is still unclear.

Quoted 1 line

see also iopl(2)

(I meant the man page, which has this explanation about ioperm too)

Quoted 4 lines

I don't think it can be used. Even if I trap int10, do iopl(3), then trap iret and do iopl(0), it is still dangerous, because pesky vbios calls some other ints in a mean time.

I'm sure it cannot be used to get fast port access. CLI and STI are no longer virtualized (very dangerous - this can crash the machine) and moreover inside V86 mode the IOPL setting is ignored for "IN" and "OUT".

The only way to get around this is to hack the kernel to have 8k/process IO bitmaps. Searching lkml I found out that Ingo Molnar attempted (in 1998) to get ioperm bitmaps allocated on the fly (only if the app tries to do ioperm()) but he said it was very difficult.

Bart