Age | Commit message (Collapse) | Author |
|
This matches MutexLocker, and doesn't sound like it's a lock itself.
|
|
|
|
|
|
|
|
This was not an active issue as sys$dbgputch (the only user of this
function) is not actually used anywhere.
|
|
|
|
This adds a dbgputch() alongside dbgputstr() in kstdio.h. The function
already existed as the static function debugger_out(). It has now been
exposed to users of kstdio.h.
|
|
If we are printing strings in the critical path, handling new lines
require us to break abstraction a bit to print new lines.
Fixes #7562.
|
|
|
|
This simple driver simply finds a device in a device definitions list
and then sets up a SerialDevice instance based on the definition.
The driver currently only supports "WCH CH382 2S" pci serial boards,
as that is the only device available for me to test with, but most
other pci serial devices should be as easily addable as adding a
board_definitions entry.
|
|
As we removed the support of VBE modesetting that was done by GRUB early
on boot, we need to determine if we can modeset the resolution with our
drivers, and if not, we should enable text mode and ensure that
SystemServer knows about it too.
Also, SystemServer should first check if there's a framebuffer device
node, which is an indication that text mode was not even if it was
requested. Then, if it doesn't find it, it should check what boot_mode
argument the user specified (in case it's self-test). This way if we
try to use bochs-display device (which is not VGA compatible) and
request a text mode, it will not honor the request and will continue
with graphical mode.
Also try to print critical messages with mininum memory allocations
possible.
In LibVT, We make the implementation flexible for kernel-specific
methods that are implemented in ConsoleImpl class.
|
|
This change will help to distinguish between the console
device and the Console abstraction layer in the Graphics
subsystem later.
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
Good-bye LogStream. Long live AK::Format!
|
|
This function doesn't write to the log, and so doesn't need to acquire
the logging lock. (This is only used by GCC's name demangling thingy.)
|
|
There are no remaining users of this API.
|
|
There are no remaining users of this API in the kernel.
|
|
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
|
|
The kernel no longer needs sprintf (which might, in theory, overflow),
so we can hide the C++ declaration and make the function uncallable
from within the kernel.
However, libstdc++ still links against it, as libstdc++ uses it for
demangling, from AK::demangle().
|
|
In contrast to sprintf, which might overflow the given buffer.
I feel bad about the code duplication, but that is a pre-existing issue.
|
|
This enables a nice warning in case a function becomes dead code. Also, in case
of signal_trampoline_dummy, marking it external (non-static) prevents it from
being 'optimized away', which would lead to surprising and weird linker errors.
I found these places by using -Wmissing-declarations.
The Kernel still shows these issues, which I think are false-positives,
but don't want to touch:
- Kernel/Arch/i386/CPU.cpp:1081:17: void Kernel::enter_thread_context(Kernel::Thread*, Kernel::Thread*)
- Kernel/Arch/i386/CPU.cpp:1170:17: void Kernel::context_first_init(Kernel::Thread*, Kernel::Thread*, Kernel::TrapFrame*)
- Kernel/Arch/i386/CPU.cpp:1304:16: u32 Kernel::do_init_context(Kernel::Thread*, u32)
- Kernel/Arch/i386/CPU.cpp:1347:17: void Kernel::pre_init_finished()
- Kernel/Arch/i386/CPU.cpp:1360:17: void Kernel::post_init_finished()
No idea, not gonna touch it.
- Kernel/init.cpp:104:30: void Kernel::init()
- Kernel/init.cpp:167:30: void Kernel::init_ap(u32, Kernel::Processor*)
- Kernel/init.cpp:184:17: void Kernel::init_finished(u32)
Called by boot.S.
- Kernel/init.cpp:383:16: int Kernel::__cxa_atexit(void (*)(void*), void*, void*)
- Kernel/StdLib.cpp:285:19: void __cxa_pure_virtual()
- Kernel/StdLib.cpp:300:19: void __stack_chk_fail()
- Kernel/StdLib.cpp:305:19: void __stack_chk_fail_local()
Not sure how to tell the compiler that the compiler is already using them.
Also, maybe __cxa_atexit should go into StdLib.cpp?
- Kernel/Modules/TestModule.cpp:31:17: void module_init()
- Kernel/Modules/TestModule.cpp:40:17: void module_fini()
Could maybe go into a new header. This would also provide type-checking for new modules.
|
|
This is like dbgprintf() except it takes a va_list instead of ...
|
|
This allows printing in the case e.g. a page fault happens
during a log statement
|
|
|
|
This was supposed to be the foundation for some kind of pre-kernel
environment, but nobody is working on it right now, so let's move
everything back into the kernel and remove all the confusion.
|
|
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
Turns out we can use abi::__cxa_demangle() for this, and all we need to
provide is sprintf(), realloc() and free(), so this patch exposes them.
We now have fully demangled C++ backtraces :^)
|
|
This triggered a stack overflow because ubsan can call kprintf() at any
time, even before Console is initialized.
|
|
|
|
serial_debug will output all the kprintf and dbgprintf data to COM1 at
8-N-1 57600 baud. this is particularly useful for debugging the boot
process on live hardware.
Note: it must be the first parameter in the boot cmdline.
|
|
This is very handy for the DebugLogStream implementation, among others. :^)
|
|
This makes it easy to distinguish kernel/userspace dbgprintf()'s. :^)
|
|
|
|
This will allow us to implement different behaviors depending on the role
of the descriptor a File is being accessed through.
|
|
|
|
The scheduler now operates on threads, rather than on processes.
Each process has a main thread, and can have any number of additional
threads. The process exits when the main thread exits.
This patch doesn't actually spawn any additional threads, it merely
does all the plumbing needed to make it possible. :^)
|
|
|
|
This is no longer needed as the Kernel can stand on its own legs now
and there won't be any conflict with host system data types.
|
|
This is much nicer than grabbing directly at 'current' inside a read().
|
|
|
|
The SpinLock was all backwards and didn't actually work. Fixing it exposed
how wrong most of the locking here is.
I need to come up with a better granularity here.
|
|
Use it to make "ls" output a bit better. Also sys$spawn now fails with EACCES
if the path is not a file that's executable by the current uid/gid.
|
|
This only has second accuracy right now, I'll work out subseconds later.
|
|
|