Age | Commit message (Collapse) | Author |
|
LogStream can handle VirtualAddress and PhysicalAddress directly.
|
|
Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
|
|
You can now mmap a file as private and writable, and the changes you
make will only be visible to you.
This works because internally a MAP_PRIVATE region is backed by a
unique PrivateInodeVMObject instead of using the globally shared
SharedInodeVMObject like we always did before. :^)
Fixes #1045.
|
|
Now we check before we set a FBResolution if the BXVGA device is capable
of setting the requested resolution.
If not, we revert the resolution to the previous one and return an error
to userspace.
Fixes #451.
|
|
Suggested by Sergey. The currently running Thread and Process are now
Thread::current and Process::current respectively. :^)
|
|
|
|
|
|
There's no sense in allowing arbitrarily huge resolutions. Instead, we
now cap the screen size at 4K DCI resolution and will reject attempts
to go bigger with EINVAL.
|
|
Previously it was not possible for this function to fail. You could
exploit this by triggering the creation of a VMObject whose physical
memory range would wrap around the 32-bit limit.
It was quite easy to map kernel memory into userspace and read/write
whatever you wanted in it.
Test: Kernel/bxvga-mmap-kernel-into-userspace.cpp
|
|
When using dbg() in the kernel, the output is automatically prefixed
with [Process(PID:TID)]. This makes it a lot easier to understand which
thread is generating the output.
This patch also cleans up some common logging messages and removes the
now-unnecessary "dbg() << *current << ..." pattern.
|
|
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.
|
|
WindowServer becomes the only user.
|
|
The new PCI subsystem is initialized during runtime.
PCI::Initializer is supposed to be called during early boot, to
perform a few tests, and initialize the proper configuration space
access mechanism. Kernel boot parameters can be specified by a user to
determine what tests will occur, to aid debugging on problematic
machines.
After that, PCI::Initializer should be dismissed.
PCI::IOAccess is a class that is derived from PCI::Access
class and implements PCI configuration space access mechanism via x86
IO ports.
PCI::MMIOAccess is a class that is derived from PCI::Access
and implements PCI configurtaion space access mechanism via memory
access.
The new PCI subsystem also supports determination of IO/MMIO space
needed by a device by checking a given BAR.
In addition, Every device or component that use the PCI subsystem has
changed to match the last changes.
|
|
There's a lot more of this and we need to stop printing kernel pointers
anywhere but the debug console.
|
|
|
|
Now that the SystemMonitor queries which open files can be read and written to,
having can_read()/can_write() unconditionally call ASSERT_NOT_REACHED() leads
to system crashes when inspecting the WindowServer.
Instead, just return true from can_read()/can_write() (indicating that the
read()/write() syscalls should not block) and return -EINVAL when trying to
actually read from or write to these devices.
|
|
Asking a File if we could possibly read or write it will never mutate
the asking FileDescription&, so it should be const.
|
|
Fixes #618.
|
|
The L was a leftover from when these were called linear addresses.
|
|
This also hides some functions that were previously public, since that
same functionality is now exposed via ioctl functions.
|
|
This is to prepare for other framebuffer implementations, for which it
would be inappropriate to use the /dev/bxvga device name.
|
|
InodeVMObject is a VMObject with an underlying Inode in the filesystem.
AnonymousVMObject has no Inode.
I'm happy that InodeVMObject::inode() can now return Inode& instead of
VMObject::inode() return Inode*. :^)
|
|
BXVGADevice was using a Size object for its framebuffer size. We shouldn't
be pulling in userspace code in the kernel like this, even if it's just
headers. :^)
|
|
These types can be picked up by including <AK/Types.h>:
* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
|
|
|
|
|
|
After reading a bunch of POSIX specs, I've learned that a file descriptor
is the number that refers to a file description, not the description itself.
So this patch renames FileDescriptor to FileDescription, and Process now has
FileDescription* file_description(int fd).
|
|
It's generated when the mapping is first created, so it won't update if
the file moves. Maybe that's something we should support, too.
|
|
Instead of having to inspect 'prot' at every call site, make the Process
API's take care of that so we can just pass it through.
|
|
Nothing crazy, this just means that PROT_READ allocates readable regions,
and that PROT_WRITE allocates writable ones.
|
|
This will allow us to implement different behaviors depending on the role
of the descriptor a File is being accessed through.
|
|
|
|
Also break MemoryManager.{cpp,h} into one file per class.
|
|
|