mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything: The modifications in this commit were automatically made using the following command: find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
This commit is contained in:
parent
40b8e21115
commit
938e5c7719
95 changed files with 331 additions and 331 deletions
|
@ -66,7 +66,7 @@ void Parser::locate_static_data()
|
|||
PhysicalAddress Parser::find_table(const StringView& signature)
|
||||
{
|
||||
#ifdef ACPI_DEBUG
|
||||
dbg() << "ACPI: Calling Find Table method!";
|
||||
dbgln("ACPI: Calling Find Table method!");
|
||||
#endif
|
||||
for (auto p_sdt : m_sdt_pointers) {
|
||||
auto sdt = map_typed<Structures::SDTHeader>(p_sdt);
|
||||
|
@ -244,7 +244,7 @@ size_t Parser::get_table_size(PhysicalAddress table_header)
|
|||
{
|
||||
InterruptDisabler disabler;
|
||||
#ifdef ACPI_DEBUG
|
||||
dbg() << "ACPI: Checking SDT Length";
|
||||
dbgln("ACPI: Checking SDT Length");
|
||||
#endif
|
||||
return map_typed<Structures::SDTHeader>(table_header)->length;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ u8 Parser::get_table_revision(PhysicalAddress table_header)
|
|||
{
|
||||
InterruptDisabler disabler;
|
||||
#ifdef ACPI_DEBUG
|
||||
dbg() << "ACPI: Checking SDT Revision";
|
||||
dbgln("ACPI: Checking SDT Revision");
|
||||
#endif
|
||||
return map_typed<Structures::SDTHeader>(table_header)->revision;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ u8 Parser::get_table_revision(PhysicalAddress table_header)
|
|||
void Parser::initialize_main_system_description_table()
|
||||
{
|
||||
#ifdef ACPI_DEBUG
|
||||
dbg() << "ACPI: Checking Main SDT Length to choose the correct mapping size";
|
||||
dbgln("ACPI: Checking Main SDT Length to choose the correct mapping size");
|
||||
#endif
|
||||
ASSERT(!m_main_system_description_table.is_null());
|
||||
auto length = get_table_size(m_main_system_description_table);
|
||||
|
|
|
@ -471,7 +471,7 @@ void page_fault_handler(TrapFrame* trap)
|
|||
handle_crash(regs, "Page Fault", SIGSEGV, response == PageFaultResponse::OutOfMemory);
|
||||
} else if (response == PageFaultResponse::Continue) {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbg() << "Continuing after resolved page fault";
|
||||
dbgln("Continuing after resolved page fault");
|
||||
#endif
|
||||
} else {
|
||||
ASSERT_NOT_REACHED();
|
||||
|
@ -605,7 +605,7 @@ void unregister_generic_interrupt_handler(u8 interrupt_number, GenericInterruptH
|
|||
{
|
||||
ASSERT(s_interrupt_handler[interrupt_number] != nullptr);
|
||||
if (s_interrupt_handler[interrupt_number]->type() == HandlerType::UnhandledInterruptHandler) {
|
||||
dbg() << "Trying to unregister unused handler (?)";
|
||||
dbgln("Trying to unregister unused handler (?)");
|
||||
return;
|
||||
}
|
||||
if (s_interrupt_handler[interrupt_number]->is_shared_handler() && !s_interrupt_handler[interrupt_number]->is_sharing_with_others()) {
|
||||
|
@ -844,7 +844,7 @@ static void idt_init()
|
|||
register_interrupt_handler(0xfe, interrupt_254_asm_entry);
|
||||
register_interrupt_handler(0xff, interrupt_255_asm_entry);
|
||||
|
||||
dbg() << "Installing Unhandled Handlers";
|
||||
dbgln("Installing Unhandled Handlers");
|
||||
|
||||
for (u8 i = 0; i < GENERIC_INTERRUPT_HANDLERS_COUNT; ++i) {
|
||||
new UnhandledInterruptHandler(i);
|
||||
|
|
|
@ -76,7 +76,7 @@ I8042Controller::I8042Controller()
|
|||
do_wait_then_write(I8042_STATUS, 0x60);
|
||||
do_wait_then_write(I8042_BUFFER, configuration);
|
||||
} else {
|
||||
dbg() << "I8042: Controller self test failed";
|
||||
dbgln("I8042: Controller self test failed");
|
||||
}
|
||||
|
||||
// Test ports and enable them if available
|
||||
|
@ -88,7 +88,7 @@ I8042Controller::I8042Controller()
|
|||
configuration |= 1;
|
||||
configuration &= ~(1 << 4);
|
||||
} else {
|
||||
dbg() << "I8042: Keyboard port not available";
|
||||
dbgln("I8042: Keyboard port not available");
|
||||
}
|
||||
|
||||
if (m_is_dual_channel) {
|
||||
|
@ -99,7 +99,7 @@ I8042Controller::I8042Controller()
|
|||
configuration |= 2;
|
||||
configuration &= ~(1 << 5);
|
||||
} else {
|
||||
dbg() << "I8042: Mouse port not available";
|
||||
dbgln("I8042: Mouse port not available");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ I8042Controller::I8042Controller()
|
|||
if (KeyboardDevice::the().initialize()) {
|
||||
m_devices[0].device = &KeyboardDevice::the();
|
||||
} else {
|
||||
dbg() << "I8042: Keyboard device failed to initialize, disable";
|
||||
dbgln("I8042: Keyboard device failed to initialize, disable");
|
||||
m_devices[0].available = false;
|
||||
configuration &= ~1;
|
||||
configuration |= 1 << 4;
|
||||
|
@ -129,7 +129,7 @@ I8042Controller::I8042Controller()
|
|||
if (PS2MouseDevice::the().initialize()) {
|
||||
m_devices[1].device = &PS2MouseDevice::the();
|
||||
} else {
|
||||
dbg() << "I8042: Mouse device failed to initialize, disable";
|
||||
dbgln("I8042: Mouse device failed to initialize, disable");
|
||||
m_devices[1].available = false;
|
||||
configuration |= 1 << 5;
|
||||
ScopedSpinLock lock(m_lock);
|
||||
|
@ -223,7 +223,7 @@ u8 I8042Controller::do_write_to_device(Device device, u8 data)
|
|||
response = do_wait_then_read(I8042_BUFFER);
|
||||
} while (response == I8042_RESEND && ++attempts < 3);
|
||||
if (attempts >= 3)
|
||||
dbg() << "Failed to write byte to device, gave up";
|
||||
dbgln("Failed to write byte to device, gave up");
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ KeyboardDevice::~KeyboardDevice()
|
|||
bool KeyboardDevice::initialize()
|
||||
{
|
||||
if (!m_controller.reset_device(I8042Controller::Device::Keyboard)) {
|
||||
dbg() << "KeyboardDevice: I8042 controller failed to reset device";
|
||||
dbgln("KeyboardDevice: I8042 controller failed to reset device");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -118,7 +118,7 @@ void PS2MouseDevice::irq_handle_byte_read(u8 byte)
|
|||
switch (m_data_state) {
|
||||
case 0:
|
||||
if (!(byte & 0x08)) {
|
||||
dbg() << "PS2Mouse: Stream out of sync.";
|
||||
dbgln("PS2Mouse: Stream out of sync.");
|
||||
break;
|
||||
}
|
||||
++m_data_state;
|
||||
|
@ -223,7 +223,7 @@ void PS2MouseDevice::set_sample_rate(u8 rate)
|
|||
bool PS2MouseDevice::initialize()
|
||||
{
|
||||
if (!m_controller.reset_device(I8042Controller::Device::Mouse)) {
|
||||
dbg() << "PS2MouseDevice: I8042 controller failed to reset device";
|
||||
dbgln("PS2MouseDevice: I8042 controller failed to reset device");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ KResultOr<size_t> PS2MouseDevice::read(FileDescription&, size_t, UserOrKernelBuf
|
|||
#ifdef PS2MOUSE_DEBUG
|
||||
dbg() << "PS2 Mouse Read: Buttons " << String::format("%x", packet.buttons);
|
||||
dbg() << "PS2 Mouse: X " << packet.x << ", Y " << packet.y << ", Z " << packet.z << " Relative " << packet.buttons;
|
||||
dbg() << "PS2 Mouse Read: Filter packets";
|
||||
dbgln("PS2 Mouse Read: Filter packets");
|
||||
#endif
|
||||
size_t bytes_read_from_packet = min(remaining_space_in_buffer, sizeof(MousePacket));
|
||||
if (!buffer.write(&packet, nread, bytes_read_from_packet))
|
||||
|
|
|
@ -302,7 +302,7 @@ KResultOr<NonnullRefPtr<Inode>> DevFSRootDirectoryInode::create_child(const Stri
|
|||
if (link.name() == name)
|
||||
return KResult(-EEXIST);
|
||||
}
|
||||
dbg() << "DevFS: Success on create new symlink";
|
||||
dbgln("DevFS: Success on create new symlink");
|
||||
auto new_link_inode = adopt(*new DevFSLinkInode(m_parent_fs, name));
|
||||
m_links.append(new_link_inode);
|
||||
m_parent_fs.m_nodes.append(new_link_inode);
|
||||
|
|
|
@ -215,7 +215,7 @@ Ext2FS::BlockListShape Ext2FS::compute_block_list_shape(unsigned blocks) const
|
|||
if (!blocks_remaining)
|
||||
return shape;
|
||||
|
||||
dbg() << "we don't know how to compute tind ext2fs blocks yet!";
|
||||
dbgln("we don't know how to compute tind ext2fs blocks yet!");
|
||||
ASSERT_NOT_REACHED();
|
||||
|
||||
shape.triply_indirect_blocks = min(blocks_remaining, entries_per_block * entries_per_block * entries_per_block);
|
||||
|
@ -420,7 +420,7 @@ bool Ext2FS::write_block_list_for_inode(InodeIndex inode_index, ext2_inode& e2in
|
|||
return true;
|
||||
|
||||
// FIXME: Implement!
|
||||
dbg() << "we don't know how to write tind ext2fs blocks yet!";
|
||||
dbgln("we don't know how to write tind ext2fs blocks yet!");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(GroupIndex preferred_group_in
|
|||
|
||||
Vector<BlockIndex> blocks;
|
||||
#ifdef EXT2_DEBUG
|
||||
dbg() << "Ext2FS: allocate_blocks:";
|
||||
dbgln("Ext2FS: allocate_blocks:");
|
||||
#endif
|
||||
blocks.ensure_capacity(count);
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ KResultOr<NonnullRefPtr<Inode>> Ext2FS::create_inode(InodeIdentifier parent_id,
|
|||
|
||||
size_t needed_blocks = ceil_div(static_cast<size_t>(size), block_size());
|
||||
if ((size_t)needed_blocks > super_block().s_free_blocks_count) {
|
||||
dbg() << "Ext2FS: create_inode: not enough free blocks";
|
||||
dbgln("Ext2FS: create_inode: not enough free blocks");
|
||||
return KResult(-ENOSPC);
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ bool Plan9FS::initialize()
|
|||
|
||||
result = post_message_and_wait_for_a_reply(attach_message);
|
||||
if (result.is_error()) {
|
||||
dbg() << "Attaching failed";
|
||||
dbgln("Attaching failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ ssize_t Plan9FS::adjust_buffer_size(ssize_t size) const
|
|||
|
||||
void Plan9FS::thread_main()
|
||||
{
|
||||
dbg() << "Plan9FS: Thread running";
|
||||
dbgln("Plan9FS: Thread running");
|
||||
do {
|
||||
auto result = read_and_dispatch_one_message();
|
||||
if (result.is_error()) {
|
||||
|
@ -676,11 +676,11 @@ void Plan9FS::thread_main()
|
|||
}
|
||||
m_completions.clear();
|
||||
m_completion_blocker.unblock_all();
|
||||
dbg() << "Plan9FS: Thread terminating, error reading";
|
||||
dbgln("Plan9FS: Thread terminating, error reading");
|
||||
return;
|
||||
}
|
||||
} while (!m_thread_shutdown);
|
||||
dbg() << "Plan9FS: Thread terminating";
|
||||
dbgln("Plan9FS: Thread terminating");
|
||||
}
|
||||
|
||||
void Plan9FS::ensure_thread()
|
||||
|
|
|
@ -1296,7 +1296,7 @@ ssize_t ProcFSInode::read_bytes(off_t offset, ssize_t count, UserOrKernelBuffer&
|
|||
return -EIO;
|
||||
if (!description->data()) {
|
||||
#ifdef PROCFS_DEBUG
|
||||
dbg() << "ProcFS: Do not have cached data!";
|
||||
dbgln("ProcFS: Do not have cached data!");
|
||||
#endif
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ KResult VFS::unmount(Inode& guest_inode)
|
|||
if (&mount.guest() == &guest_inode) {
|
||||
auto result = mount.guest_fs().prepare_to_unmount();
|
||||
if (result.is_error()) {
|
||||
dbg() << "VFS: Failed to unmount!";
|
||||
dbgln("VFS: Failed to unmount!");
|
||||
return result;
|
||||
}
|
||||
dbg() << "VFS: found fs " << mount.guest_fs().fsid() << " at mount index " << i << "! Unmounting...";
|
||||
|
|
|
@ -414,7 +414,7 @@ void APIC::boot_aps()
|
|||
Processor::smp_enable();
|
||||
|
||||
#ifdef APIC_DEBUG
|
||||
dbg() << "All processors initialized and waiting, trigger all to continue";
|
||||
dbgln("All processors initialized and waiting, trigger all to continue");
|
||||
#endif
|
||||
|
||||
// Now trigger all APs to continue execution (need to do this after
|
||||
|
|
|
@ -127,7 +127,7 @@ RefPtr<IRQController> InterruptManagement::get_responsible_irq_controller(u8 int
|
|||
|
||||
PhysicalAddress InterruptManagement::search_for_madt()
|
||||
{
|
||||
dbg() << "Early access to ACPI tables for interrupt setup";
|
||||
dbgln("Early access to ACPI tables for interrupt setup");
|
||||
auto rsdp = ACPI::StaticParsing::find_rsdp();
|
||||
if (!rsdp.has_value())
|
||||
return {};
|
||||
|
@ -165,7 +165,7 @@ void InterruptManagement::switch_to_ioapic_mode()
|
|||
InterruptDisabler disabler;
|
||||
|
||||
if (m_madt.is_null()) {
|
||||
dbg() << "Interrupts: ACPI MADT is not available, reverting to PIC mode";
|
||||
dbgln("Interrupts: ACPI MADT is not available, reverting to PIC mode");
|
||||
switch_to_pic_mode();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ KResult Socket::getsockopt(FileDescription&, int level, int option, Userspace<vo
|
|||
case SO_ERROR: {
|
||||
if (size < sizeof(int))
|
||||
return KResult(-EINVAL);
|
||||
dbg() << "getsockopt(SO_ERROR): FIXME!";
|
||||
dbgln("getsockopt(SO_ERROR): FIXME!");
|
||||
int errno = 0;
|
||||
if (!copy_to_user(static_ptr_cast<int*>(value), &errno))
|
||||
return KResult(-EFAULT);
|
||||
|
|
|
@ -460,7 +460,7 @@ void TCPSocket::shut_down_for_writing()
|
|||
{
|
||||
if (state() == State::Established) {
|
||||
#ifdef TCP_SOCKET_DEBUG
|
||||
dbg() << " Sending FIN/ACK from Established and moving into FinWait1";
|
||||
dbgln(" Sending FIN/ACK from Established and moving into FinWait1");
|
||||
#endif
|
||||
[[maybe_unused]] auto rc = send_tcp_packet(TCPFlags::FIN | TCPFlags::ACK);
|
||||
set_state(State::FinWait1);
|
||||
|
@ -475,7 +475,7 @@ KResult TCPSocket::close()
|
|||
auto result = IPv4Socket::close();
|
||||
if (state() == State::CloseWait) {
|
||||
#ifdef TCP_SOCKET_DEBUG
|
||||
dbg() << " Sending FIN from CloseWait and moving into LastAck";
|
||||
dbgln(" Sending FIN from CloseWait and moving into LastAck");
|
||||
#endif
|
||||
[[maybe_unused]] auto rc = send_tcp_packet(TCPFlags::FIN | TCPFlags::ACK);
|
||||
set_state(State::LastAck);
|
||||
|
|
|
@ -37,7 +37,7 @@ void IOAccess::initialize()
|
|||
if (!Access::is_initialized()) {
|
||||
new IOAccess();
|
||||
#ifdef PCI_DEBUG
|
||||
dbg() << "PCI: IO access initialised.";
|
||||
dbgln("PCI: IO access initialised.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void IOAccess::write32_field(Address address, u32 field, u32 value)
|
|||
void IOAccess::enumerate_hardware(Function<void(Address, ID)> callback)
|
||||
{
|
||||
#ifdef PCI_DEBUG
|
||||
dbg() << "PCI: IO enumerating hardware";
|
||||
dbgln("PCI: IO enumerating hardware");
|
||||
#endif
|
||||
// Single PCI host controller.
|
||||
if ((read8_field(Address(), PCI_HEADER_TYPE) & 0x80) == 0) {
|
||||
|
|
|
@ -85,7 +85,7 @@ void MMIOAccess::initialize(PhysicalAddress mcfg)
|
|||
if (!Access::is_initialized()) {
|
||||
new MMIOAccess(mcfg);
|
||||
#ifdef PCI_DEBUG
|
||||
dbg() << "PCI: MMIO access initialised.";
|
||||
dbgln("PCI: MMIO access initialised.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ MMIOAccess::MMIOAccess(PhysicalAddress p_mcfg)
|
|||
|
||||
auto checkup_region = MM.allocate_kernel_region(p_mcfg.page_base(), (PAGE_SIZE * 2), "PCI MCFG Checkup", Region::Access::Read | Region::Access::Write);
|
||||
#ifdef PCI_DEBUG
|
||||
dbg() << "PCI: Checking MCFG Table length to choose the correct mapping size";
|
||||
dbgln("PCI: Checking MCFG Table length to choose the correct mapping size");
|
||||
#endif
|
||||
|
||||
auto* sdt = (ACPI::Structures::SDTHeader*)checkup_region->vaddr().offset(p_mcfg.offset_in_page()).as_ptr();
|
||||
|
|
|
@ -147,7 +147,7 @@ void IDEChannel::start_request(AsyncBlockDeviceRequest& request, bool use_dma, b
|
|||
{
|
||||
ScopedSpinLock lock(m_request_lock);
|
||||
#ifdef PATA_DEBUG
|
||||
dbg() << "IDEChannel::start_request";
|
||||
dbgln("IDEChannel::start_request");
|
||||
#endif
|
||||
m_current_request = &request;
|
||||
m_current_request_block_index = 0;
|
||||
|
@ -246,7 +246,7 @@ void IDEChannel::handle_irq(const RegisterState&)
|
|||
|
||||
if (!m_current_request) {
|
||||
#ifdef PATA_DEBUG
|
||||
dbg() << "IDEChannel: IRQ but no pending request!";
|
||||
dbgln("IDEChannel: IRQ but no pending request!");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ void IDEChannel::ata_read_sectors(bool slave_request)
|
|||
auto& request = *m_current_request;
|
||||
ASSERT(request.block_count() <= 256);
|
||||
#ifdef PATA_DEBUG
|
||||
dbg() << "IDEChannel::ata_read_sectors";
|
||||
dbgln("IDEChannel::ata_read_sectors");
|
||||
#endif
|
||||
|
||||
while (m_io_group.io_base().offset(ATA_REG_STATUS).in<u8>() & ATA_SR_BSY)
|
||||
|
|
|
@ -90,7 +90,7 @@ pid_t Process::sys$fork(RegisterState& regs)
|
|||
#endif
|
||||
auto region_clone = region.clone(*child);
|
||||
if (!region_clone) {
|
||||
dbg() << "fork: Cannot clone region, insufficient memory";
|
||||
dbgln("fork: Cannot clone region, insufficient memory");
|
||||
// TODO: tear down new process?
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ int Process::sys$module_load(Userspace<const char*> user_path, size_t path_lengt
|
|||
|
||||
auto* text_base = section_storage_by_name.get(".text").value_or(nullptr);
|
||||
if (!text_base) {
|
||||
dbg() << "No .text section found in module!";
|
||||
dbgln("No .text section found in module!");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ int Process::sys$mount(Userspace<const Syscall::SC_mount_params*> user_params)
|
|||
if (description.is_null())
|
||||
return -EBADF;
|
||||
if (!description->file().is_seekable()) {
|
||||
dbg() << "mount: this is not a seekable file";
|
||||
dbgln("mount: this is not a seekable file");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ int Process::sys$select(const Syscall::SC_select_params* user_params)
|
|||
|
||||
if (current_thread->block<Thread::SelectBlocker>(timeout, fds_info).was_interrupted()) {
|
||||
#ifdef DEBUG_POLL_SELECT
|
||||
dbg() << "select was interrupted";
|
||||
dbgln("select was interrupted");
|
||||
#endif
|
||||
return -EINTR;
|
||||
}
|
||||
|
|
|
@ -38,14 +38,14 @@ int Process::sys$reboot()
|
|||
|
||||
REQUIRE_NO_PROMISES;
|
||||
|
||||
dbg() << "acquiring FS locks...";
|
||||
dbgln("acquiring FS locks...");
|
||||
FS::lock_all();
|
||||
dbg() << "syncing mounted filesystems...";
|
||||
dbgln("syncing mounted filesystems...");
|
||||
FS::sync();
|
||||
dbg() << "attempting reboot via ACPI";
|
||||
dbgln("attempting reboot via ACPI");
|
||||
if (ACPI::is_enabled())
|
||||
ACPI::Parser::the()->try_acpi_reboot();
|
||||
dbg() << "attempting reboot via KB Controller...";
|
||||
dbgln("attempting reboot via KB Controller...");
|
||||
IO::out8(0x64, 0xFE);
|
||||
|
||||
return 0;
|
||||
|
@ -58,18 +58,18 @@ int Process::sys$halt()
|
|||
|
||||
REQUIRE_NO_PROMISES;
|
||||
|
||||
dbg() << "acquiring FS locks...";
|
||||
dbgln("acquiring FS locks...");
|
||||
FS::lock_all();
|
||||
dbg() << "syncing mounted filesystems...";
|
||||
dbgln("syncing mounted filesystems...");
|
||||
FS::sync();
|
||||
dbg() << "attempting system shutdown...";
|
||||
dbgln("attempting system shutdown...");
|
||||
// QEMU Shutdown
|
||||
IO::out16(0x604, 0x2000);
|
||||
// If we're here, the shutdown failed. Try VirtualBox shutdown.
|
||||
IO::out16(0x4004, 0x3400);
|
||||
// VirtualBox shutdown failed. Try Bochs/Old QEMU shutdown.
|
||||
IO::out16(0xb004, 0x2000);
|
||||
dbg() << "shutdown attempts failed, applications will stop responding.";
|
||||
dbgln("shutdown attempts failed, applications will stop responding.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ int Process::sys$join_thread(pid_t tid, Userspace<void**> exit_value)
|
|||
}
|
||||
if (result == Thread::BlockResult::InterruptedByDeath)
|
||||
break;
|
||||
dbg() << "join_thread: retrying";
|
||||
dbgln("join_thread: retrying");
|
||||
}
|
||||
|
||||
if (exit_value && !copy_to_user(exit_value, &joinee_exit_value))
|
||||
|
|
|
@ -95,7 +95,7 @@ void VirtualConsole::switch_to(unsigned index)
|
|||
// can set the video mode on our own. Just stop anyone from trying for
|
||||
// now.
|
||||
if (active_console->is_graphical()) {
|
||||
dbg() << "Cannot switch away from graphical console yet :(";
|
||||
dbgln("Cannot switch away from graphical console yet :(");
|
||||
return;
|
||||
}
|
||||
active_console->set_active(false);
|
||||
|
@ -305,7 +305,7 @@ void VirtualConsole::flush_dirty_lines()
|
|||
void VirtualConsole::beep()
|
||||
{
|
||||
// TODO
|
||||
dbg() << "Beep!1";
|
||||
dbgln("Beep!1");
|
||||
}
|
||||
|
||||
void VirtualConsole::set_window_title(const StringView&)
|
||||
|
|
|
@ -35,7 +35,7 @@ void SyncTask::spawn()
|
|||
{
|
||||
RefPtr<Thread> syncd_thread;
|
||||
Process::create_kernel_process(syncd_thread, "SyncTask", [] {
|
||||
dbg() << "SyncTask is running";
|
||||
dbgln("SyncTask is running");
|
||||
for (;;) {
|
||||
VFS::the().sync();
|
||||
Thread::current()->sleep({ 1, 0 });
|
||||
|
|
|
@ -147,7 +147,7 @@ bool HPET::test_and_initialize()
|
|||
|
||||
if (TimeManagement::is_hpet_periodic_mode_allowed()) {
|
||||
if (!check_for_exisiting_periodic_timers()) {
|
||||
dbg() << "HPET: No periodic capable timers";
|
||||
dbgln("HPET: No periodic capable timers");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ size_t HPETComparator::ticks_per_second() const
|
|||
|
||||
void HPETComparator::reset_to_default_ticks_per_second()
|
||||
{
|
||||
dbg() << "reset_to_default_ticks_per_second";
|
||||
dbgln("reset_to_default_ticks_per_second");
|
||||
m_frequency = OPTIMAL_TICKS_PER_SECOND_RATE;
|
||||
if (!is_periodic())
|
||||
set_new_countdown();
|
||||
|
|
|
@ -224,7 +224,7 @@ timeval TimeManagement::now_as_timeval()
|
|||
Vector<HardwareTimerBase*> TimeManagement::scan_and_initialize_periodic_timers()
|
||||
{
|
||||
bool should_enable = is_hpet_periodic_mode_allowed();
|
||||
dbg() << "Time: Scanning for periodic timers";
|
||||
dbgln("Time: Scanning for periodic timers");
|
||||
Vector<HardwareTimerBase*> timers;
|
||||
for (auto& hardware_timer : m_hardware_timers) {
|
||||
if (hardware_timer.is_periodic_capable()) {
|
||||
|
@ -238,7 +238,7 @@ Vector<HardwareTimerBase*> TimeManagement::scan_and_initialize_periodic_timers()
|
|||
|
||||
Vector<HardwareTimerBase*> TimeManagement::scan_for_non_periodic_timers()
|
||||
{
|
||||
dbg() << "Time: Scanning for non-periodic timers";
|
||||
dbgln("Time: Scanning for non-periodic timers");
|
||||
Vector<HardwareTimerBase*> timers;
|
||||
for (auto& hardware_timer : m_hardware_timers) {
|
||||
if (!hardware_timer.is_periodic_capable())
|
||||
|
@ -264,10 +264,10 @@ bool TimeManagement::probe_and_set_non_legacy_hardware_timers()
|
|||
if (!HPET::test_and_initialize())
|
||||
return false;
|
||||
if (!HPET::the().comparators().size()) {
|
||||
dbg() << "HPET initialization aborted.";
|
||||
dbgln("HPET initialization aborted.");
|
||||
return false;
|
||||
}
|
||||
dbg() << "HPET: Setting appropriate functions to timers.";
|
||||
dbgln("HPET: Setting appropriate functions to timers.");
|
||||
|
||||
for (auto& hpet_comparator : HPET::the().comparators())
|
||||
m_hardware_timers.append(hpet_comparator);
|
||||
|
@ -315,10 +315,10 @@ bool TimeManagement::probe_and_set_legacy_hardware_timers()
|
|||
{
|
||||
if (ACPI::is_enabled()) {
|
||||
if (ACPI::Parser::the()->x86_specific_flags().cmos_rtc_not_present) {
|
||||
dbg() << "ACPI: CMOS RTC Not Present";
|
||||
dbgln("ACPI: CMOS RTC Not Present");
|
||||
return false;
|
||||
} else {
|
||||
dbg() << "ACPI: CMOS RTC Present";
|
||||
dbgln("ACPI: CMOS RTC Present");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ PageFaultResponse AnonymousVMObject::handle_cow_fault(size_t page_index, Virtual
|
|||
bool have_committed = m_shared_committed_cow_pages && is_nonvolatile(page_index);
|
||||
if (page_slot->ref_count() == 1) {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbg() << " >> It's a COW page but nobody is sharing it anymore. Remap r/w";
|
||||
dbgln(" >> It's a COW page but nobody is sharing it anymore. Remap r/w");
|
||||
#endif
|
||||
set_should_cow(page_index, false);
|
||||
if (have_committed) {
|
||||
|
@ -459,12 +459,12 @@ PageFaultResponse AnonymousVMObject::handle_cow_fault(size_t page_index, Virtual
|
|||
RefPtr<PhysicalPage> page;
|
||||
if (have_committed) {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbg() << " >> It's a committed COW page and it's time to COW!";
|
||||
dbgln(" >> It's a committed COW page and it's time to COW!");
|
||||
#endif
|
||||
page = m_shared_committed_cow_pages->allocate_one();
|
||||
} else {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbg() << " >> It's a COW page and it's time to COW!";
|
||||
dbgln(" >> It's a COW page and it's time to COW!");
|
||||
#endif
|
||||
page = MM.allocate_user_physical_page(MemoryManager::ShouldZeroFill::No);
|
||||
if (page.is_null()) {
|
||||
|
|
|
@ -209,7 +209,7 @@ void RangeAllocator::deallocate(Range range)
|
|||
}
|
||||
}
|
||||
#ifdef VRA_DEBUG
|
||||
dbg() << "VRA: After deallocate";
|
||||
dbgln("VRA: After deallocate");
|
||||
dump();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -500,7 +500,7 @@ PageFaultResponse Region::handle_zero_fault(size_t page_index_in_region)
|
|||
|
||||
if (!page_slot.is_null() && !page_slot->is_shared_zero_page() && !page_slot->is_lazy_committed_page()) {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbg() << "MM: zero_page() but page already present. Fine with me!";
|
||||
dbgln("MM: zero_page() but page already present. Fine with me!");
|
||||
#endif
|
||||
if (!remap_vmobject_page(page_index_in_vmobject))
|
||||
return PageFaultResponse::OutOfMemory;
|
||||
|
@ -581,7 +581,7 @@ PageFaultResponse Region::handle_inode_fault(size_t page_index_in_region)
|
|||
current_thread->did_inode_fault();
|
||||
|
||||
#ifdef MM_DEBUG
|
||||
dbg() << "MM: page_in_from_inode ready to read from inode";
|
||||
dbgln("MM: page_in_from_inode ready to read from inode");
|
||||
#endif
|
||||
|
||||
u8 page_buffer[PAGE_SIZE];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue