revert between 56095 -> 55830 in arch
[AROS.git] / arch / x86_64-pc / kernel / kernel_debug.c
blobcfe2084621625d687c850e93d02ec9151794c665
1 /*
2 Copyright � 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <bootconsole.h>
8 #include "kernel_base.h"
9 #include "kernel_intern.h"
10 #include "kernel_debug.h"
12 #if defined(__AROSEXEC_SMP__)
13 volatile ULONG safedebug = 1;
14 #endif
16 int krnPutC(int c, struct KernelBase *KernelBase)
18 unsigned long flags;
20 __save_flags(flags);
23 * stegerg: Don't use Disable/Enable, because we want interrupt enabled flag
24 * to stay the same as it was before the Disable() call
26 __cli();
29 * If we got 0x03, this means graphics driver wants to take over the screen.
30 * If VESA hack is activated, it will use only upper half of the screen
31 * because y resolution was adjusted.
32 * In our turn, we need to switch over to lower half.
33 * VESA hack is supported only on graphical console of course. And do not
34 * expect it to work with native mode video driver. :)
36 if ((c == 0x03) && (scr_Type == SCR_GFX) && __KernBootPrivate->debug_framebuffer)
38 /* Reinitialize boot console with decreased height */
39 scr_FrameBuffer = __KernBootPrivate->debug_framebuffer;
40 fb_Resize(__KernBootPrivate->debug_y_resolution);
42 else
43 con_Putc(c);
46 * Interrupt flag is stored in flags - if it was enabled before,
47 * it will be renabled when the flags are restored
49 __restore_flags(flags);
51 return 1;