All: Cleanup all files

Add newline to end of files and remove whitespace from end of lines
This commit is contained in:
2024-01-24 14:43:46 +02:00
parent 3441f63298
commit dfe5a2d665
226 changed files with 466 additions and 460 deletions

View File

@@ -39,7 +39,7 @@ namespace Kernel::GDT
uint8_t flags : 4;
uint8_t base3;
} __attribute__((packed));
struct
{
uint32_t low;
@@ -81,7 +81,7 @@ namespace Kernel::GDT
{
memset(&s_tss, 0x00, sizeof(TaskStateSegment));
s_tss.iopb = sizeof(TaskStateSegment);
uint64_t base = (uint64_t)&s_tss;
write_entry(s_tss_offset, (uint32_t)base, sizeof(TaskStateSegment), 0x89, 0x0);
@@ -122,4 +122,4 @@ namespace Kernel::GDT
flush_tss();
}
}
}

View File

@@ -121,7 +121,7 @@ namespace Kernel::IDT
uint32_t reserved2 : 16;
};
};
};
static_assert(sizeof(PageFaultError) == 4);
@@ -290,7 +290,7 @@ namespace Kernel::IDT
break;
case ISR::PageFault:
signal = SIGSEGV;
break;
break;
default:
dwarnln("Unhandled exception");
signal = SIGABRT;
@@ -305,7 +305,7 @@ namespace Kernel::IDT
}
ASSERT(Thread::current().state() != Thread::State::Terminated);
done:
return;
}

View File

@@ -138,7 +138,7 @@ namespace Kernel
s_global_pml4e = V2P(allocate_zeroed_page_aligned_page());
m_highest_paging_struct = V2P(allocate_zeroed_page_aligned_page());
uint64_t* pml4 = (uint64_t*)P2V(m_highest_paging_struct);
pml4[511] = s_global_pml4e;
@@ -436,7 +436,7 @@ namespace Kernel
ASSERT(vaddr % PAGE_SIZE == 0);
size_t page_count = range_page_count(vaddr, size);
LockGuard _(m_lock);
for (size_t page = 0; page < page_count; page++)
map_page_at(paddr + page * PAGE_SIZE, vaddr + page * PAGE_SIZE, flags);
@@ -453,7 +453,7 @@ namespace Kernel
uint64_t pdpte = (uc_vaddr >> 30) & 0x1FF;
uint64_t pde = (uc_vaddr >> 21) & 0x1FF;
uint64_t pte = (uc_vaddr >> 12) & 0x1FF;
LockGuard _(m_lock);
uint64_t* pml4 = (uint64_t*)P2V(m_highest_paging_struct);
@@ -533,7 +533,7 @@ namespace Kernel
const uint16_t e_pdpte = (uc_vaddr_end >> 30) & 0x1FF;
const uint16_t e_pde = (uc_vaddr_end >> 21) & 0x1FF;
const uint16_t e_pte = (uc_vaddr_end >> 12) & 0x1FF;
LockGuard _(m_lock);
// Try to find free page that can be mapped without
@@ -714,7 +714,7 @@ namespace Kernel
if (!(pt[pte] & Flags::Used))
continue;
if (start == 0)
{
flags = parse_flags(pt[pte]);

View File

@@ -192,4 +192,4 @@ syscall_asm:
addq $8, %rsp
popaq_no_rax
addq $8, %rsp
iretq
iretq

View File

@@ -35,4 +35,4 @@ SECTIONS
*(.bss)
}
g_kernel_end = .;
}
}