[lkml]   [2000]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectwhy volatile on vgacon.c?

I used to be able to run my 12 ethernet ports pentium based bridge without
vga card, but with tty1, tty2, ... still working, as the kernel used to
recognice a kind of a cga card on my machine even though there was none. But
the kernel could write to the memory were the card was supposed to be, and
so it worked.

That was on 2.2 series, but since I moved it to 2.4 series I don't have that
cga card found anymore. I have looked on the kernel code and followed it to
the __init function in vgacon.c, more concretely this piece of code...

scr_writew(0xAA55, p);
scr_writew(0x55AA, p + 1);
if (scr_readw(p) != 0xAA55 || scr_readw(p + 1) != 0x55AA) {

Well, the thing is that this code and the code in this function is almost
the same in 2.4 as in 2.2, however reading returns the written values on 2.2
and different ones (0xffff) on 2.4

This is caused by the volatile declaration of *p on 2.4, so the questions

was the old (I have found a CGA) behaviour considered a bug and is the
volatile declaration its fix?

If so, is there any way to have /dev/tty1 on a no graphic card i386 machine?
(besides unvolatilizating *p wich works for me)

Manty/BestiaTester ->

PS: Please cc me, as I'm not on the list.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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