Espresso 0.0.1f

This commit is contained in:
2025-07-07 10:41:05 -05:00
parent dbaee2c881
commit f677e2e283
13 changed files with 315 additions and 119 deletions

View File

@ -45,29 +45,8 @@ doesn't make sense to return from this function as the bootloader is gone.
.global _start
.global _kernel_early
/*.global loadPageDirectory
.global enablePaging*/
.type _start, @function
/*load_page_directory:
push %ebp
mov %esp, %ebp
mov 8(%esp), %eax
mov %eax, %cr3
mov %ebp, %esp
pop %ebp
ret
enable_paging:
push %ebp
mov %esp, %ebp
mov %cr0, %eax
or $0x80000000, %eax
mov %eax, %cr0
mov %ebp, %esp
pop %ebp
ret*/
enable_sse_asm:
push %eax
@ -138,7 +117,7 @@ enable_sse_asm:
.no_sse:
.no_cpuid:
lea sse_initialized, %edi
mov $0, (%edi)
movl $0, (%edi)
.done:
pop %edi
@ -203,9 +182,8 @@ _start:
/*
Call _kernel_early, early low-level initialization will happen there;
please note that while _kernel_early is written in assembler,
kernel_early is written in C. (kernel_early is called by _kernel_early, don't be confused. ;) )
Call _kernel_early, early low-level initialization will happen there.
NOTE: I don't use 'jmp' because it doesn't work. Nice try.
*/
call _kernel_early

16
arch/x86/new_intrin.c Normal file
View File

@ -0,0 +1,16 @@
#include <types.h>
#ifdef __NEW_INTRINSICS_
bool cpu_supports_sse2(void)
{
int k = __buildin_cpu_supports("sse2");
return k > 0 ? true : false
}
bool cpu_supports_sse(void)
{
return __buildin_cpu_supports("sse") > 0 ? true : false;
}
#endif