mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 15:29:18 +00:00
Update files
This commit is contained in:
17
Architecture/aarch64/boot.S
Normal file
17
Architecture/aarch64/boot.S
Normal file
@ -0,0 +1,17 @@
|
||||
.section ".text.boot"
|
||||
|
||||
.global _start
|
||||
.org 0x80000
|
||||
_start:
|
||||
ldr x5, =_start
|
||||
mov sp, x5
|
||||
ldr x5, =_kernel_rodata_end
|
||||
ldr w6, =_bss_size
|
||||
1: cbz w6, 2f
|
||||
str xzr, [x5], #8
|
||||
sub w6, w6, #1
|
||||
cbnz w6, 1b
|
||||
2: bl aarch64Entry
|
||||
Halt:
|
||||
wfe
|
||||
b Halt
|
42
Architecture/aarch64/linker.ld
Normal file
42
Architecture/aarch64/linker.ld
Normal file
@ -0,0 +1,42 @@
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x80000;
|
||||
_kernel_start = .;
|
||||
.text :
|
||||
{
|
||||
KEEP(*(.text.boot))
|
||||
*(.text .text.*)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
_kernel_text_end = .;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data .data.*)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
_kernel_data_end = .;
|
||||
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata .rodata.*)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
_kernel_rodata_end = .;
|
||||
|
||||
.bss :
|
||||
{
|
||||
*(.bss .bss.*)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
_kernel_end = .;
|
||||
_bss_size = _kernel_end - _kernel_rodata_end;
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.eh_frame)
|
||||
*(.note .note.*)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user