mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
kernel: add arm architecture support
Some checks failed
Build OS / Deploy Documentation to GitHub Pages (push) Failing after 5m35s
Build OS / Analyze (${{ matrix.language }}) (manual, c-cpp) (push) Has been cancelled
Build OS / Build Cross-Compiler & Toolchain (push) Has been cancelled
Build OS / Build amd64 (push) Has been cancelled
Build OS / Build i386 (push) Has been cancelled
Build OS / Build aarch64 (push) Has been cancelled
Build OS / Build arm (push) Has been cancelled
Some checks failed
Build OS / Deploy Documentation to GitHub Pages (push) Failing after 5m35s
Build OS / Analyze (${{ matrix.language }}) (manual, c-cpp) (push) Has been cancelled
Build OS / Build Cross-Compiler & Toolchain (push) Has been cancelled
Build OS / Build amd64 (push) Has been cancelled
Build OS / Build i386 (push) Has been cancelled
Build OS / Build aarch64 (push) Has been cancelled
Build OS / Build arm (push) Has been cancelled
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -551,9 +551,9 @@ struct heap_t
|
||||
};
|
||||
|
||||
/* Keep in sync with heap_t inside rpmalloc_compat.cpp */
|
||||
#ifndef __i386__
|
||||
#if !defined(__i386__) && !defined(__arm__)
|
||||
static_assert(sizeof(heap_t) == 56408, "heap_t size mismatch");
|
||||
#endif // __i386__
|
||||
#endif // __i386__ || __arm__
|
||||
|
||||
// Size class for defining a block size bucket
|
||||
struct size_class_t
|
||||
@ -3105,7 +3105,11 @@ rpcalloc(size_t num, size_t size)
|
||||
{
|
||||
size_t total;
|
||||
#if ENABLE_VALIDATE_ARGS
|
||||
#ifdef __arm__
|
||||
int err = __builtin_umull_overflow(num, size, (unsigned long *)&total);
|
||||
#else
|
||||
int err = __builtin_umull_overflow(num, size, &total);
|
||||
#endif
|
||||
assert(!err && (total < MAX_ALLOC_SIZE));
|
||||
#else
|
||||
total = num * size;
|
||||
@ -3150,7 +3154,11 @@ rpaligned_calloc(size_t alignment, size_t num, size_t size)
|
||||
{
|
||||
size_t total;
|
||||
#if ENABLE_VALIDATE_ARGS
|
||||
#ifdef __arm__
|
||||
int err = __builtin_umull_overflow(num, size, (unsigned long *)&total);
|
||||
#else
|
||||
int err = __builtin_umull_overflow(num, size, &total);
|
||||
#endif
|
||||
assert(!err && (total < MAX_ALLOC_SIZE));
|
||||
#else
|
||||
total = num * size;
|
||||
|
@ -93,7 +93,7 @@ namespace Memory
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
Elf64_Xword SymbolSize = 0;
|
||||
Elf64_Xword StringSize = 0;
|
||||
#elif defined(__i386__)
|
||||
#elif defined(__i386__) || defined(__arm__)
|
||||
Elf32_Word SymbolSize = 0;
|
||||
Elf32_Word StringSize = 0;
|
||||
#endif
|
||||
|
@ -304,12 +304,19 @@ nsa void DisplayMainScreen(CPU::ExceptionFrame *Frame)
|
||||
"stub",
|
||||
"stub",
|
||||
#warning "aarch64 not implemented"
|
||||
#elif defined(__arm__)
|
||||
"stub",
|
||||
"stub",
|
||||
#warning "arm not implemented"
|
||||
#endif
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
Frame->InterruptNumber);
|
||||
#elif defined(__aarch64__)
|
||||
0);
|
||||
#warning "aarch64 not implemented"
|
||||
#elif defined(__arm__)
|
||||
0);
|
||||
#warning "arm not implemented"
|
||||
#endif
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
ExPrint("Cause: %s\n", x86Exceptions[Frame->InterruptNumber].Cause);
|
||||
@ -320,6 +327,8 @@ nsa void DisplayMainScreen(CPU::ExceptionFrame *Frame)
|
||||
Frame->rip);
|
||||
#elif defined(__i386__)
|
||||
Frame->eip);
|
||||
#elif defined(__arm__)
|
||||
0);
|
||||
#elif defined(__aarch64__)
|
||||
0);
|
||||
#warning "aarch64 not implemented"
|
||||
|
@ -104,7 +104,7 @@ namespace SymbolResolver
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
Elf64_Xword SymbolSize = 0;
|
||||
// Elf64_Xword StringSize = 0;
|
||||
#elif defined(__i386__)
|
||||
#elif defined(__i386__) || defined(__arm__)
|
||||
Elf32_Word SymbolSize = 0;
|
||||
// Elf32_Word StringSize = 0;
|
||||
#endif
|
||||
@ -220,7 +220,7 @@ namespace SymbolResolver
|
||||
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
Elf64_Ehdr *Header = (Elf64_Ehdr *)ImageAddress;
|
||||
#elif defined(__i386__)
|
||||
#elif defined(__i386__) || defined(__arm__)
|
||||
Elf32_Ehdr *Header = (Elf32_Ehdr *)ImageAddress;
|
||||
#endif
|
||||
if (Header->e_ident[0] != 0x7F &&
|
||||
|
Reference in New Issue
Block a user