--1724024063-1148255441-991034330=:13292
Content-Type: TEXT/PLAIN; charset=US-ASCII
So,
Here is what actualy happened:
The problem was that I was unable to open /dev/console or /dev/vcsXX or
/dev/ttyXX
Nothing changed in the configuration, except that I upgraded the kernel.
After some digging I realized that it has nothing to do with the KERNEL
version or the fact it is a SMP matchine.
Further more I notice that there is no VGA adapter listed in /proc/pci
Because I do have an AGP card, I expect it to be listed in /proc/pci and
even more to be detected at boot time. I know linux can work without a VGA
card, but I _HAD_ one and I was not understanding what's happening.
Then, I noticed that /proc/ioports has 2 entries for a 'mda' monocrome
video adapter...
so, now I was thinking:
1. why it detected my VGA as a MDA
2. why was not initializing the console ?!?
After 2h of digging in the code, I finaly realized what is wrong:
1. The video card had probably moved in its slot and was no longer working
This is why /proc/pci had no entry of a VGA controler
2. At some point the Linux kernel was guessing that I have a MDA controler
3. Then it continued by requesting the 2 IOports ranges, and registered
them for the MDA card I don't have.
4. Then it proceded to TEST the presence of VIDEO RAM. but since my video
card was gone fishing, there was aparently no video ram, or at least no
video ram where the kernel was looking for (since I actualy had a VGA
not a MDA adapter, and they use different regions to map the video ram)
5. Noticing that there is actualy NO VIDEO RAM at that location, it gives
up and return NULL, as in 'no VGA/EGA/MDA/CGA video adapter detected'
6. it continues silently, but without any console ...
It DO NOT DEALOCATE THE IOREGIONS that are not used !!!
Everything else works, just that my agettys are yelling that they can't
open /de/vttyXX. and my syslog is full of 'Can't locate module char-major-4'
Eh, finally everything was fixed pretty easly, but opening the computer
and pressing the vcard fermly back into its location. I am amazed that the
computer started in the first place WITHOUT the vcard working.
Now, I wrote a patch to address some of the issues ...
1. it first check for the presence of video ram BEFORE allocating any
resource
2. if you configure your kernel with 'VGA CONSOLE' it will complain that
no VGA/etc adapter was found, and the VGA CONSOLE is disabled.
3. if no COSOLE device is detected/initialized at all, not even the dummy
device, it will complain that no console device was found/initialized.
For people that doesn't use/have a VGA console, and doesn't wan't to see
that warning ... all they have to do is to disable the 'VGA CONSOLE'
option in the configuration. This will also help reducing the kernel size,
since they anyway have no use of that driver ...
If you use the SERIAL CONSOLE as your only CONSOLE driver:
- disable VGA CONSOLE to get rid of one warning, and make your kernel
smaller
- and you should dnot see the second warning about 'no console driver
found' since you have a console driver (serial console)... so there si no
problem. (NOT TESTED... someone please CONFIRM)
the patch will ... patch 2 files:
- linux/dirvers/char/console.c
+ added one line: a printk
- linux/drivers/video/vgacon.c
+ vgacon_startup() was rewritten
the patch is attached,
and is also available via http from:
http://bigD.kappa.ro/~pdoru/patch_linux_vga_console
Best regards,
------
Doru Petrescu
KappaNet - Senior Software Engineer
E-mail: pdoru@kappa.ro LINUX - the choice of the GNU generation
--1724024063-1148255441-991034330=:13292
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch_linux_vga_console
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0105281018500.13292@bigD.kappa.ro>
Content-Description:
Content-Disposition: attachment; filename=patch_linux_vga_console
LS0tIGxpbnV4L2RyaXZlcnMvY2hhci9jb25zb2xlLmMJTW9uIE1heSAyOCAw
OTowMzowNCAyMDAxDQorKysgbGludXgvZHJpdmVycy9jaGFyL2NvbnNvbGUu
YwlTdW4gTWF5IDI3IDEyOjAxOjE1IDIwMDENCkBAIC0yMzc5LDYgKzIzNzks
OCBAQA0KIAlpZiAoY29uc3dpdGNocCkNCiAJCWRpc3BsYXlfZGVzYyA9IGNv
bnN3aXRjaHAtPmNvbl9zdGFydHVwKCk7DQogCWlmICghZGlzcGxheV9kZXNj
KSB7DQorCQlwcmludGsoIldBUk5JTkc6IENPTlNPTEU6IG5vIGNvbnNvbGUg
ZHJpdmVyIGluaXRpYWxpemVkL2F2YWlsYWJsZSAhXG4iKTsNCisNCiAJCWZn
X2NvbnNvbGUgPSAwOw0KIAkJcmV0dXJuOw0KIAl9DQotLS0gbGludXgvZHJp
dmVycy92aWRlby92Z2Fjb24uYwlTYXQgTWF5IDI2IDIzOjEzOjIzIDIwMDEN
CisrKyBsaW51eC9kcml2ZXJzL3Z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CQl2Z2FfaGFyZHNjcm9sbF9lbmFibGVkID0gdmdhX2hhcmRz
Y3JvbGxfdXNlcl9lbmFibGU7DQotCQl2Z2FfZGVmYXVsdF9mb250X2hlaWdo
dCA9IE9SSUdfVklERU9fUE9JTlRTOw0KLQkJdmdhX3ZpZGVvX2ZvbnRfaGVp
Z2h0ID0gT1JJR19WSURFT19QT0lOVFM7DQotCQkvKiBUaGlzIG1heSBiZSBz
dWJvcHRpbWFsIGJ1dCBpcyBhIHNhZmUgYmV0IC0gZ28gd2l0aCBpdCAqLw0K
LQkJdmlkZW9fc2Nhbl9saW5lcyA9DQotCQkJdmdhX3ZpZGVvX2ZvbnRfaGVp
Z2h0ICogdmdhX3ZpZGVvX251bV9saW5lczsNCi0JfQ0KLQl2aWRlb19mb250
X2hlaWdodCA9IHZnYV92aWRlb19mb250X2hlaWdodDsNCisgICB9DQogDQot
CXJldHVybiBkaXNwbGF5X2Rlc2M7DQorICAgZGlzcGxheV9kZXNjID0gdmdh
Y29uX2RldGVjdF9hZGFwdGVyKCk7DQorICAgDQorICAgaWYgKGRpc3BsYXlf
ZGVzYyA9PSBOVUxMKSB7DQorICAgICAgcHJpbnRrKCJXQVJOSU5HOiBObyBW
R0EvRUdBL01EQS9DR0EgdmlkZW8gYWRhcHRlciBkZXRlY3RlZCA9PiBWR0Eg
Q09OU09MRSBkaXNhYmxlZFxuIik7DQorICAgICAgZ290byBub192Z2E7DQor
ICAgfQ0KKyAgIA0KKyAgIHJldHVybiBkaXNwbGF5X2Rlc2M7DQogfQ0KIA0K
IHN0YXRpYyB2b2lkIHZnYWNvbl9pbml0KHN0cnVjdCB2Y19kYXRhICpjLCBp
bnQgaW5pdCkNCg==
--1724024063-1148255441-991034330=:13292--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/