mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Support i386
This commit is contained in:
15
Architecture/i386/runtime/crt0.c
Normal file
15
Architecture/i386/runtime/crt0.c
Normal file
@ -0,0 +1,15 @@
|
||||
// #include <types.h>
|
||||
|
||||
// #include <debug.h>
|
||||
|
||||
// int Entry(void *Info);
|
||||
|
||||
// void _start(void *Raw)
|
||||
// {
|
||||
// error("Todo");
|
||||
// while (1)
|
||||
// asmv("hlt");
|
||||
// Entry(NULL);
|
||||
// return;
|
||||
// }
|
||||
// C stuff
|
15
Architecture/i386/runtime/crt1.c
Normal file
15
Architecture/i386/runtime/crt1.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <types.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
int Entry(void *Info);
|
||||
|
||||
void _start(void *Raw)
|
||||
{
|
||||
UNUSED(Raw);
|
||||
error("ERROR! INVALID BOOT PROTOCOL!");
|
||||
while (1)
|
||||
asmv("hlt");
|
||||
Entry(NULL);
|
||||
return;
|
||||
}
|
1
Architecture/i386/runtime/crtbegin.c
Normal file
1
Architecture/i386/runtime/crtbegin.c
Normal file
@ -0,0 +1 @@
|
||||
// C++ constructor/destructor stuff
|
1
Architecture/i386/runtime/crtend.c
Normal file
1
Architecture/i386/runtime/crtend.c
Normal file
@ -0,0 +1 @@
|
||||
// C++ constructor/destructor stuff
|
13
Architecture/i386/runtime/crti.S
Normal file
13
Architecture/i386/runtime/crti.S
Normal file
@ -0,0 +1,13 @@
|
||||
.section .init
|
||||
.global _init
|
||||
.type _init, @function
|
||||
_init:
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
|
||||
.section .fini
|
||||
.global _fini
|
||||
.type _fini, @function
|
||||
_fini:
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
7
Architecture/i386/runtime/crtn.S
Normal file
7
Architecture/i386/runtime/crtn.S
Normal file
@ -0,0 +1,7 @@
|
||||
.section .init
|
||||
pop %ebp
|
||||
ret
|
||||
|
||||
.section .fini
|
||||
pop %ebp
|
||||
ret
|
Reference in New Issue
Block a user