As part of my project, I should implement some sort of cooperation
between user-level video driver and kernel console code, to notify
about mode change, for example.
Because the kernel is vital component of the OS, I guess I should ask
what I allowed to do with it to achieve my goals.

I have a proposal (for x86(_64)-compatible systems only, 'cos I don't
know how graphics hardware is organized on other platforms).

* Notice: I haven't discovered kernel code yet, so some things can be
already done in a way I plan to describe *

At first, a couple of indisputable statements:
1. We DONT need anything except ASCII in kernel console.
2. Kernel console is NOT dependent on any user-level code.

Now I'm ready to explain how I am going to realize it. I'll do it in QA-manner.

1. Q: How are you going to activate kernel console?
A: Kernel will catch keyboard shortcut.
2. Q: In which mode will kernel console work?
A: Since statement 1, it'll be enough to use VGA textmode: 80x25,
80x50 or even 90x30/60.
3. Q: And how are you going to switch to that mode? We won't allow you
to move any complex pieces of code, such as realmode emulator or v86
monitor, into kernel!!!!!
A: I won't use BIOS interrupt to setup mode. I will program VGA
controller directly using existing dumped register values. See [0],
[1], [2].
4. Q: How GUI stack will understand that we return from kconsole?
A: It will depend on our severity. If we are going to keep mikrokernel
minimal in the sence of codebase and functionaly, kernel will just
release keyboard. Then we can send keyboard shortcut to, e.g. GUI
server which will ask driver to set graphic mode and ask clients to
redraw. If we are little bit kinder, we can add notices (about return)
and subscriptions on them. (If I understood correctly, that's how it
realized now). But I guess minimal scheme looks better.
5. Q: What if system will build without GUI, only with console mode?
A: Now the situation is a bit more complicated. My current view:
kernel keep track of processes mapping VGA textmode memory. On
switching to kconsole, kernel saves vmem content to backbuffer and
remaps processes' pages from vmem to that buffer. On leaving kconsole,
kernel restores content of vmem from buffer and restores mapping.

Discuss!

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to