summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-07-13Kernel: First cut of a sb16 driverRobin Burchell
Also add an AudioServer that (right now) doesn't do much. It tries to open, parse, and play a wav file. In the future, it can do more. My general thinking here here is that /dev/audio will be "owned" by AudioServer, and we'll do mixing in software before passing buffers off to the kernel to play, but we have to start somewhere.
2019-07-11Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.Andreas Kling
This is obviously more readable. If we ever run into a situation where ref count churn is actually causing trouble in the future, we can deal with it then. For now, let's keep it simple. :^)
2019-07-10Build: Build the host-side FormCompiler before everything else.Andreas Kling
Since we're gonna want to use this for building other apps, it should be the very first thing we build.
2019-07-10Demos: Add a HelloWorld2 demo.Andreas Kling
This is a simple test app with its UI generated from a VisualBuilder form. The name is probably silly, but who cares. :^)
2019-07-09Kernel: Pick up standard includes from ../Toolchain, not ../RootAndreas Kling
2019-07-09Kernel: Move PhysicalAddress.h into VM/Andreas Kling
2019-07-09Kernel: Move VirtualAddress.h into VM/Andreas Kling
2019-07-09Kernel: Move SharedMemory.{cpp,h} into FileSystem/Andreas Kling
2019-07-09Kernel: Move File.{cpp,h} into FileSystem/Andreas Kling
Also tweak the kernel's Makefile to use -nostdinc and -nostdinc++. This prevents us from picking up random headers from ../Root, which may include older versions of kernel headers. Since we still need <initializer_list> for Vector, we specifically include the necessary GCC path. This is a bit hackish but it works for now.
2019-07-09Kernel: Move i8253.cpp => Arch/i386/PIT.cppAndreas Kling
2019-07-09Kernel: Move PIC.cpp into Arch/i386/Andreas Kling
2019-07-08Kernel: Have the open() syscall take an explicit path length parameter.Andreas Kling
Instead of computing the path length inside the syscall handler, let the caller do that work. This allows us to implement to new variants of open() and creat(), called open_with_path_length() and creat_with_path_length(). These are suitable for use with e.g StringView.
2019-07-08Kernel: Don't interrupt blocked syscalls to dispatch ignored signals.Andreas Kling
This was just causing syscalls to return EINTR for no reason.
2019-07-08Kernel: Add LogStream operator<< for Process.Andreas Kling
It simply prints "process-name(pid)", nothing fancy, but kinda useful.
2019-07-08StringView: Rename characters() to characters_without_null_termination().Andreas Kling
This should make you think twice before trying to use the const char* from a StringView as if it's a null-terminated string.
2019-07-08IDEDiskDevice: Fix build after merging slave device changes.Andreas Kling
2019-07-08Kernel: Extended IDE interface to allow slave device usage (#283)Jesse
The IDE Disk Controller driver has been extended to allow the secondary device on the channel to be initialised and used. A test as to whether this is working (for anyone interested) is to modify `init.cpp:87` to `auto dev_hd0 = IDEDiskDevice::create(IdeDiskDevice::DeviceType::SLAVE);`. The kernel will fail to boot, as there is no disk attached to CHANNEL 1's slave. This was born out of the fact that my FAT driver can't be tested as easily without creating a partition on `hda`.
2019-07-04Libraries: Create top level directory for libraries.Andreas Kling
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
2019-07-04AK: Move some of LogStream out of line & add overloads for smart pointers.Andreas Kling
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-07-03Build: Use sudo -E to preserve EVs when calling build-image-qemu.sh from ↵Dan MacDonald
makeall.sh
2019-07-03Build: Fix incorrect user and group settings for disk image (#280)Dan MacDonald
Build: Fix incorrect user and group settings for disk image. Fixes #261.
2019-07-01Kernel+Userland: Convert /proc/df to JSON.Andreas Kling
2019-07-01Kernel+ProcessManager: Convert /proc/memstat to JSON.Andreas Kling
2019-07-01Build: Remove Userland/qs if we see one lying around.Andreas Kling
Userland/qs was moved to Applications/QuickShow, but some people still have old built binaries lying around in their Userland/ directories and the build system complains about this. Here goes a silly temporary hack to just get rid of them.
2019-06-30Kernel: Make more crash info show up in dmesg.Andreas Kling
kprintf() shows up in dmesg, dbgprintf() does not.
2019-06-30Kernel: Disable interrupts in Thread::set_state().Andreas Kling
We don't want to get interrupted while we're manipulating the thread lists.
2019-06-30Meta: Removed all gitignore in the source tree only keeping the root oneVAN BOSSUYT Nicolas
2019-06-29AK: Defer to Traits<T> for equality comparison in container templates.Andreas Kling
This is prep work for supporting HashMap with NonnullRefPtr<T> as values. It's currently not possible because many HashTable functions require being able to default-construct the value type.
2019-06-29ProcFS: Remove unused StringBuilder in procfs$all().Andreas Kling
2019-06-29Kernel: Change the format of /proc/all to JSON.Andreas Kling
Update ProcessManager, top and WSCPUMonitor to handle the new format. Since the kernel is not allowed to use floating-point math, we now compile the JSON classes in AK without JsonValue::Type::Double support. To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
2019-06-28AK: Add Vector(std::initializer_list<T>) constructor.Andreas Kling
This allows us to construct a Vector from an initializer list like so: Vector<Object> objects = { object1, object2, object3 };
2019-06-27Kernel: More use of NonnullRefPtrVector in the kernel.Andreas Kling
2019-06-27Kernel: Use NonnullRefPtrVector in parts of the kernel.Andreas Kling
2019-06-26Kernel: Automatically populate page tables with lazy kernel regions.Andreas Kling
If we get an NP page fault in a process, and the fault address is in the kernel address range (anywhere above 0xc0000000), we probably just need to copy the page table info over from the kernel page directory. The kernel doesn't allocate address space until it's needed, and when it does allocate some, it only puts the info in the kernel page directory, and any *new* page directories created from that point on. Existing page directories need to be updated, and that's what this patch fixes.
2019-06-26Kernel: Make the x86 paging code slightly less insane.Andreas Kling
Instead of PDE's and PTE's being weird wrappers around dword*, just have MemoryManager::ensure_pte() return a PageDirectoryEntry&, which in turn has a PageTableEntry* entries(). I've been trying to understand how things ended up this way, and I suspect it was because I inadvertently invoked the PageDirectoryEntry copy ctor in the original work on this, which must have made me very confused.. Anyways, now things are a bit saner and we can move forward towards a better future, etc. :^)
2019-06-25Kernel: Share code between all the exceptions that cause process crash.Andreas Kling
2019-06-23QuickShow: Allow panning and zooming the image instead of stretching it.Andreas Kling
This needs more work and polish, but it's a step in a more pleasant and useful direction. Also turn QuickShow into a fully-fledged "application". (By that, I really just mean giving it its own Applications/ subdirectory.)
2019-06-22Kernel: Colorize debugger output from the kernel.Andreas Kling
This makes it easy to distinguish kernel/userspace dbgprintf()'s. :^)
2019-06-22LibHTML: Make it possible to build LibHTML on the host.Andreas Kling
- "make" builds the normal Serenity libhtml.a - "make -f Makefile.host" builds a test program for the host machine.
2019-06-22Kernel: Fix all compiler warnings.Andreas Kling
2019-06-22printf: Oops, '-' is the left padding modifier, not ' '.Andreas Kling
It's kinda funny how I can make a mistake like this in Serenity and then get so used to it by spending lots of time using this API that I start to believe that this is how printf() always worked..
2019-06-21AK: Rename Retainable.h => RefCounted.h.Andreas Kling
2019-06-21AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.Andreas Kling
2019-06-21Change "retain" to "ref" in various comments.Andreas Kling
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-06-21AK: Rename Retainable => RefCounted.Andreas Kling
(And various related renames that go along with it.)
2019-06-19Kernel+LibC: Make page fault crashes a bit more readable.Andreas Kling
We'll now try to detect crashes that were due to dereferencing nullptr, uninitialized malloc() memory, or recently free()'d memory. It's not perfect but I think it's pretty good. :^) Also added some color to the most important parts of the crash log, and added some more modes to /bin/crash for exercising this code. Fixes #243.
2019-06-19Kernel: Symbolicate the crash address too, not just the call stack.Andreas Kling
Also print it in shiny red to make it extra easy to spot. :^) Fixes #244.
2019-06-18AK: Move IPv4Address from Kernel/Net/ to AK/ since it's quite useful.Andreas Kling