mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-10 23:09:18 +00:00
Refactor filesystem & stl code
This commit is contained in:
0
arch/aarch64/include/.gitkeep
Normal file
0
arch/aarch64/include/.gitkeep
Normal file
0
arch/amd64/include/.gitkeep
Normal file
0
arch/amd64/include/.gitkeep
Normal file
@ -62,6 +62,16 @@ SECTIONS
|
||||
{
|
||||
*(.data .data.*)
|
||||
} :data
|
||||
|
||||
.eh_frame : AT(ADDR(.eh_frame) - KERNEL_VMA) ONLY_IF_RW
|
||||
{
|
||||
KEEP (*(.eh_frame .eh_frame.*))
|
||||
} :data
|
||||
|
||||
.gcc_except_table : AT(ADDR(.gcc_except_table) - KERNEL_VMA) ONLY_IF_RW
|
||||
{
|
||||
KEEP (*(.gcc_except_table .gcc_except_table.*))
|
||||
} :data
|
||||
_kernel_data_end = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
_kernel_rodata_start = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
@ -85,6 +95,21 @@ SECTIONS
|
||||
KEEP(*(.fini_array .dtors))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
} :rodata
|
||||
|
||||
.eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - KERNEL_VMA)
|
||||
{
|
||||
*(.eh_frame_hdr .eh_frame_hdr.*)
|
||||
} :rodata
|
||||
|
||||
.eh_frame : AT(ADDR(.eh_frame) - KERNEL_VMA) ONLY_IF_RO
|
||||
{
|
||||
KEEP (*(.eh_frame .eh_frame.*))
|
||||
} :rodata
|
||||
|
||||
.gcc_except_table : AT(ADDR(.gcc_except_table) - KERNEL_VMA) ONLY_IF_RO
|
||||
{
|
||||
KEEP (*(.gcc_except_table .gcc_except_table.*))
|
||||
} :rodata
|
||||
_kernel_rodata_end = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
_kernel_bss_start = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
@ -149,30 +149,30 @@ namespace Memory
|
||||
|
||||
PageMapLevel4 *PML4 = &this->pTable->Entries[Index.PMLIndex];
|
||||
if (!PML4->Present)
|
||||
goto ReturnError;
|
||||
goto ReturnLogError;
|
||||
|
||||
PDPTE = (PageDirectoryPointerTableEntryPtr *)((uintptr_t)PML4->GetAddress() << 12);
|
||||
if (!PDPTE || !PDPTE->Entries[Index.PDPTEIndex].Present)
|
||||
goto ReturnError;
|
||||
goto ReturnLogError;
|
||||
|
||||
if (PDPTE->Entries[Index.PDPTEIndex].PageSize)
|
||||
return MapType::OneGiB;
|
||||
|
||||
PDE = (PageDirectoryEntryPtr *)((uintptr_t)PDPTE->Entries[Index.PDPTEIndex].GetAddress() << 12);
|
||||
if (!PDE || !PDE->Entries[Index.PDEIndex].Present)
|
||||
goto ReturnError;
|
||||
goto ReturnLogError;
|
||||
|
||||
if (PDE->Entries[Index.PDEIndex].PageSize)
|
||||
return MapType::TwoMiB;
|
||||
|
||||
PTE = (PageTableEntryPtr *)((uintptr_t)PDE->Entries[Index.PDEIndex].GetAddress() << 12);
|
||||
if (!PTE)
|
||||
goto ReturnError;
|
||||
goto ReturnLogError;
|
||||
|
||||
if (PTE->Entries[Index.PTEIndex].Present)
|
||||
return MapType::FourKiB;
|
||||
|
||||
ReturnError:
|
||||
ReturnLogError:
|
||||
return MapType::NoMapType;
|
||||
}
|
||||
|
||||
|
0
arch/i386/include/.gitkeep
Normal file
0
arch/i386/include/.gitkeep
Normal file
@ -62,6 +62,16 @@ SECTIONS
|
||||
{
|
||||
*(.data .data.*)
|
||||
} :data
|
||||
|
||||
.eh_frame : AT(ADDR(.eh_frame) - KERNEL_VMA) ONLY_IF_RW
|
||||
{
|
||||
KEEP (*(.eh_frame .eh_frame.*))
|
||||
} :data
|
||||
|
||||
.gcc_except_table : AT(ADDR(.gcc_except_table) - KERNEL_VMA) ONLY_IF_RW
|
||||
{
|
||||
KEEP (*(.gcc_except_table .gcc_except_table.*))
|
||||
} :data
|
||||
_kernel_data_end = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
_kernel_rodata_start = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
@ -85,6 +95,21 @@ SECTIONS
|
||||
KEEP(*(.fini_array .dtors))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
} :rodata
|
||||
|
||||
.eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - KERNEL_VMA)
|
||||
{
|
||||
*(.eh_frame_hdr .eh_frame_hdr.*)
|
||||
} :rodata
|
||||
|
||||
.eh_frame : AT(ADDR(.eh_frame) - KERNEL_VMA) ONLY_IF_RO
|
||||
{
|
||||
KEEP (*(.eh_frame .eh_frame.*))
|
||||
} :rodata
|
||||
|
||||
.gcc_except_table : AT(ADDR(.gcc_except_table) - KERNEL_VMA) ONLY_IF_RO
|
||||
{
|
||||
KEEP (*(.gcc_except_table .gcc_except_table.*))
|
||||
} :rodata
|
||||
_kernel_rodata_end = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
_kernel_bss_start = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
Reference in New Issue
Block a user