Removed debug/console.c, we no longer need it. frame_buffer_console_init() is now

called by debug_init_post_vm().
Since the availability of a blue screen specific getchar() is static anyway, there
is no need for the sBlueScreenGetChar variable (only the message "only serial input
available" gets lost, but since that is platform specific anyway...).
Hello blue screen! We now have an on-screen KDL, to be enabled by the kernel
setting "bluescreen", just like on BeOS.
The blue screen does not yet support any cursor actions or backspace, though (need
to grab some stuff from our console driver).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12896 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-05-29 16:23:00 +00:00
parent a332730df7
commit f33c8020e2
11 changed files with 347 additions and 156 deletions
@@ -4,6 +4,7 @@
*/
#include <KernelExport.h>
#include <kernel.h>
#include <lock.h>
#include <boot_item.h>
#include <fs/devfs.h>
@@ -298,7 +299,7 @@ console_std_ops(int32 op, ...)
{
switch (op) {
case B_MODULE_INIT:
return sConsole.frame_buffer != NULL ? B_OK : B_ERROR;
return frame_buffer_console_available() ? B_OK : B_ERROR;
case B_MODULE_UNINIT:
return B_OK;
@@ -323,10 +324,7 @@ console_module_info gFrameBufferConsoleModule = {
};
// #pragma mark -
status_t
static status_t
frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth, int32 bytesPerRow)
{
TRACE(("frame_buffer_update(buffer = %p, width = %ld, height = %ld, depth = %ld, bytesPerRow = %ld)\n",
@@ -355,6 +353,16 @@ frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth,
}
// #pragma mark -
bool
frame_buffer_console_available(void)
{
return sConsole.frame_buffer != NULL;
}
status_t
frame_buffer_console_init(kernel_args *args)
{
@@ -402,3 +410,19 @@ frame_buffer_console_init(kernel_args *args)
return B_OK;
}
// #pragma mark -
status_t
_user_frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
int32 depth, int32 bytesPerRow)
{
if (geteuid() != 0)
return B_NOT_ALLOWED;
if (IS_USER_ADDRESS(baseAddress))
return B_BAD_ADDRESS;
return frame_buffer_update(baseAddress, width, height, depth, bytesPerRow);
}