mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Kernel: Stop debug spam when using mmap on /dev/mem device
This is not really useful and quite annoying so let's disable it by default.
This commit is contained in:
parent
916e093d4a
commit
d0abae8907
Notes:
sideshowbarker
2024-07-18 01:43:16 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/d0abae8907 Pull-request: https://github.com/SerenityOS/serenity/pull/13411
3 changed files with 6 additions and 3 deletions
|
@ -207,6 +207,10 @@
|
|||
#cmakedefine01 MOUSE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef MEMORY_DEVICE_DEBUG
|
||||
#cmakedefine01 MEMORY_DEVICE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef MULTIPROCESSOR_DEBUG
|
||||
#cmakedefine01 MULTIPROCESSOR_DEBUG
|
||||
#endif
|
||||
|
|
|
@ -57,15 +57,13 @@ ErrorOr<Memory::Region*> MemoryDevice::mmap(Process& process, OpenFileDescriptio
|
|||
// is to be set to the page base of that start address.
|
||||
VERIFY(viewed_address == viewed_address.page_base());
|
||||
|
||||
dbgln("MemoryDevice: Trying to mmap physical memory at {} for range of {} bytes", viewed_address, range.size());
|
||||
if (!MM.is_allowed_to_read_physical_memory_for_userspace(viewed_address, range.size())) {
|
||||
dbgln("MemoryDevice: Trying to mmap physical memory at {} for range of {} bytes failed due to violation of access", viewed_address, range.size());
|
||||
dbgln_if(MEMORY_DEVICE_DEBUG, "MemoryDevice: Trying to mmap physical memory at {} for range of {} bytes failed due to violation of access", viewed_address, range.size());
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
auto vmobject = TRY(Memory::AnonymousVMObject::try_create_for_physical_range(viewed_address, range.size()));
|
||||
|
||||
dbgln("MemoryDevice: Mapped physical memory at {} for range of {} bytes", viewed_address, range.size());
|
||||
return process.address_space().allocate_region_with_vmobject(
|
||||
range,
|
||||
move(vmobject),
|
||||
|
|
|
@ -117,6 +117,7 @@ set(MATROSKA_DEBUG ON)
|
|||
set(MATROSKA_TRACE_DEBUG ON)
|
||||
set(MASTERPTY_DEBUG ON)
|
||||
set(MBR_DEBUG ON)
|
||||
set(MEMORY_DEVICE_DEBUG ON)
|
||||
set(MEMORY_DEBUG ON)
|
||||
set(MENU_DEBUG ON)
|
||||
set(MENUS_DEBUG ON)
|
||||
|
|
Loading…
Reference in a new issue