On Mon, 9 Jun 2003, Richard Smith wrote:
Any ideas? It seems unlikely that the bochs stuff would be
that fragile so I must be missing something.
It is :/
turn off some deubgging stuff. it helps keep code smaller.
Can you explain why turning off debugging macros can help?. I have problems when I enabled debug macros. It fail to run bochs bios. But If I turn off all debug macros, it boot normally.
I suspect it is b/c of those legacy bios entry points embedded into the bios code. they have fixed address. Perhaps it is some problem with BCC.
-- Adam Sulmicki http://www.eax.com The Supreme Headquarters of the 32 bit registers
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Any ideas? It seems unlikely that the bochs stuff would be
that fragile so I must be missing something.
It is :/
turn off some deubgging stuff. it helps keep code smaller.
Can you explain why turning off debugging macros can help?. I have problems when I enabled debug macros. It fail to run bochs bios. But If I turn off all debug macros, it boot normally.
I think there are two reasons for this.
One is that there are number of legacy entry points into bios. They are pretty much "uniformly" scattered across the 64kb address space. Making the available space non-contignous. (doing 'grep .org rombios.c' will show you all those).
The second is that adding debugging information I think adds lots of more static code to be compiled in. Both the text messages as well as the code to the print them.
Thus i think the combined extra code with fact that the space is noncontignous causes it to breaksomewhere. But that's just a guess It might as well turn out to be something else. I did not investiage it too closely.
Adam Sulmicki wrote:
Any ideas? It seems unlikely that the bochs stuff would be
that fragile so I must be missing something.
It is :/
Yes you are correct. It _is_ much more fragile than I thought. The boot POST area is limited in size. Looking through the code you will find many references to intxx_relocated because it was too big to fit in the boot POST area.
I solved my problem by relocating the expansion ROM BIOS routine and my PCI config code into another area of the bios and then calling them as subroutines.
I also had a problem with the way I was doing my PCI config reads and writes. The term 'Register' in a PCI config space read/write actually means 'which block of 4 bytes' So to access the command register (bytes 4 and 5) I had to use 0x09004 rather than 0x09010 in eax.
I now have both heads up and going... X works fine now except that the mouse dosen't work so it seems I have some more IRQ work to sort out.