Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
ok so i got v8086 mode to work almost perfectly (switches modes corerctly in bochs, vmware still has a hang in there somewhere).
Anyway, in vmware ,my kernel crashes just after it starts to switch modes...so no video output to work with (meaning no visible exception handler or anything like that )
So i think i wanna make my console driver mirror it's output to the serial port (which vmware can redirect to a file for me to tail )
anyone have any code to do this? any clue of how this works? is it as simple as writing to a specific port?
you should find plenty of documentation about serial ports on OSRC (see QuickLinkz / FAQ)
I fear it will not be as easy as writing to an I/O port, but it shouldn't be as complicated as writing to a Floppy disk
So now in my console object i have it mirror all characters written to video ram to the serial port. The i setup vmware to write the serial output to a file. SO when debugging video code i can do "tail -f serial.txt" in another term and see what's going on even when my video is broken
mystran wrote:
I have a similar setup for serial... Bochs writes to file, and running on real machine, I can catch it with another box using a null-modem cable.
How easy is that to do ? i mean, do i just have to "tail -f /dev/com01" under linux ? is there something like baudrate to be set up ?
(just for the sake of filling the Faq with infos).
btw, proxy, can i safely assume your code is free for pasting in the FAQ ?
Aren't the com ports able to trigger interrupts upon receipt of data?
I'd give it an interrupt handler then for fetching input from the com port. Just a proposal. I'd use the mentioned function for polling the com port for data as long as no irq handler is installed.
Pype: Yeah, I usually use simply "cat /dev/ttyS0 > debug.log". See setserial(8) for setting the parameters, or use a programs like Minicom to do the dirty work for you.
of course you can paste it into the FAQ. This was one of those things I wish was there so i didn't have to spend an hour locating information on how to do it