mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
kernel: add aarch64 architecture support
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -314,6 +314,26 @@ struct linux_kstat
|
||||
unsigned long st_ctime_nsec;
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
#elif defined(__aarch64__)
|
||||
__kernel_ulong_t st_dev;
|
||||
__kernel_ulong_t st_ino;
|
||||
__kernel_ulong_t st_nlink;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned int __pad0;
|
||||
__kernel_ulong_t st_rdev;
|
||||
__kernel_long_t st_size;
|
||||
__kernel_long_t st_blksize;
|
||||
__kernel_long_t st_blocks;
|
||||
__kernel_ulong_t st_atime;
|
||||
__kernel_ulong_t st_atime_nsec;
|
||||
__kernel_ulong_t st_mtime;
|
||||
__kernel_ulong_t st_mtime_nsec;
|
||||
__kernel_ulong_t st_ctime;
|
||||
__kernel_ulong_t st_ctime_nsec;
|
||||
#undef __unused
|
||||
__kernel_long_t __unused[3];
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
@ -1077,6 +1077,7 @@ static int linux_mprotect(SysFrm *, void *addr, size_t len, int prot)
|
||||
return -linux_ENOMEM;
|
||||
}
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
if (!pte->Present ||
|
||||
(!pte->UserSupervisor && p_Read) ||
|
||||
(!pte->ReadWrite && p_Write))
|
||||
@ -1089,7 +1090,8 @@ static int linux_mprotect(SysFrm *, void *addr, size_t len, int prot)
|
||||
// pte->Present = !p_None;
|
||||
pte->UserSupervisor = p_Read;
|
||||
pte->ReadWrite = p_Write;
|
||||
// pte->ExecuteDisable = p_Exec;
|
||||
// pte->ExecuteDisable = p_Exec;
|
||||
#endif
|
||||
|
||||
debug("Changed permissions of page %#lx to %s %s %s %s",
|
||||
(void *)i,
|
||||
@ -1484,7 +1486,9 @@ static pid_t linux_fork(SysFrm *sf)
|
||||
|
||||
TaskManager->UpdateFrame();
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
NewThread->FPU = Thread->FPU;
|
||||
#endif
|
||||
NewThread->Stack->Fork(Thread->Stack);
|
||||
NewThread->Info.Architecture = Thread->Info.Architecture;
|
||||
NewThread->Info.Compatibility = Thread->Info.Compatibility;
|
||||
@ -1564,7 +1568,9 @@ static pid_t linux_vfork(SysFrm *sf)
|
||||
|
||||
TaskManager->UpdateFrame();
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
NewThread->FPU = Thread->FPU;
|
||||
#endif
|
||||
delete NewThread->Stack;
|
||||
NewThread->Stack = Thread->Stack;
|
||||
NewThread->Info.Architecture = Thread->Info.Architecture;
|
||||
|
Reference in New Issue
Block a user