mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 01:04:38 +03:00
Fix bug where Console::the() was initialized too late.
Yet another problem due to lack of BSS zeroing in the kernel loader...
This commit is contained in:
parent
00c21d1590
commit
b833aa4162
Notes:
sideshowbarker
2024-07-19 18:36:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b833aa41623
@ -10,6 +10,7 @@ static Console* s_the;
|
|||||||
|
|
||||||
Console& Console::the()
|
Console& Console::the()
|
||||||
{
|
{
|
||||||
|
ASSERT(s_the);
|
||||||
return *s_the;
|
return *s_the;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ DWORD handle(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3)
|
|||||||
case Syscall::PosixTtynameR:
|
case Syscall::PosixTtynameR:
|
||||||
return current->sys$ttyname_r((int)arg1, (char*)arg2, (size_t)arg3);
|
return current->sys$ttyname_r((int)arg1, (char*)arg2, (size_t)arg3);
|
||||||
default:
|
default:
|
||||||
kprintf("int0x80: Unknown function %x requested {%x, %x, %x}\n", function, arg1, arg2, arg3);
|
kprintf("<%u> int0x80: Unknown function %x requested {%x, %x, %x}\n", current->pid(), function, arg1, arg2, arg3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -218,6 +218,8 @@ void init()
|
|||||||
kmalloc_init();
|
kmalloc_init();
|
||||||
vga_init();
|
vga_init();
|
||||||
|
|
||||||
|
auto console = make<Console>();
|
||||||
|
|
||||||
RTC::initialize();
|
RTC::initialize();
|
||||||
PIC::initialize();
|
PIC::initialize();
|
||||||
gdt_init();
|
gdt_init();
|
||||||
@ -225,7 +227,6 @@ void init()
|
|||||||
|
|
||||||
keyboard = new Keyboard;
|
keyboard = new Keyboard;
|
||||||
|
|
||||||
auto console = make<Console>();
|
|
||||||
VirtualConsole::initialize();
|
VirtualConsole::initialize();
|
||||||
tty0 = new VirtualConsole(0, VirtualConsole::AdoptCurrentVGABuffer);
|
tty0 = new VirtualConsole(0, VirtualConsole::AdoptCurrentVGABuffer);
|
||||||
tty1 = new VirtualConsole(1);
|
tty1 = new VirtualConsole(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user