2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <bootconsole.h>
8 #include "kernel_base.h"
9 #include "kernel_debug.h"
10 #include "kernel_intern.h"
12 #define __save_flags(x) __asm__ __volatile__("pushfq ; popq %0":"=g" (x): /* no input */)
13 #define __restore_flags(x) __asm__ __volatile__("pushq %0 ; popfq": /* no output */ :"g" (x):"memory", "cc")
14 #define __cli() __asm__ __volatile__("cli": : :"memory")
15 #define __sti() __asm__ __volatile__("sti": : :"memory")
17 int krnPutC(int c
, struct KernelBase
*KernelBase
)
24 * stegerg: Don't use Disable/Enable, because we want interrupt enabled flag
25 * to stay the same as it was before the Disable() call
30 * If we got 0x03, this means graphics driver wants to take over the screen.
31 * If VESA hack is activated, it will use only upper half of the screen
32 * because y resolution was adjusted.
33 * In our turn, we need to switch over to lower half.
34 * VESA hack is supported only on graphical console of course. And do not
35 * expect it to work with native mode video driver. :)
37 if ((c
== 0x03) && (scr_Type
== SCR_GFX
) && __KernBootPrivate
->debug_framebuffer
)
39 /* Reinitialize boot console with decreased height */
40 scr_FrameBuffer
= __KernBootPrivate
->debug_framebuffer
;
41 fb_Resize(__KernBootPrivate
->debug_y_resolution
);
47 * Interrupt flag is stored in flags - if it was enabled before,
48 * it will be renabled when the flags are restored
50 __restore_flags(flags
);