vxKernel/vxgos/bootloader/boards/fxcg50/include/fxcg50/asm_utils.h

31 lines
1.0 KiB
C
Raw Normal View History

vxkernel - v0.7.0-1 : architecture overhaul + bootloader KASLR resolve --- The objective of this early rework of the kernel architecture is to prepare the project to run on other hardware than the Casio calculator (like Raspberry Pi devices). This is why I switched the kernel workflow to integrate a custom bootloader for the particular kernel image we generate. The v0.7.0 of the kernel is not released since the USB driver is not stable yet. But the need to deeply rework the architecture is prioritized. So, as this is a critical update, I update the minor version (which is a major indicator here since I don't have the mature version yet (v1.x.x)). Also, I work on a brand-new micro-kernel (for the Raspberry Pi 3b and Google Pixels), so, the name of this project, Vhex, has migrated to a temporary name(?): VxGOS (for Vhex Gaming Operating System), which will be changed as soon as the v0.8.0 is released. (I choose this name only because the word "gaming" make me laugh. Take showers folks). The objective of version 0.8.0 is to support:     - architecture rework     - internal bootloader     - proper KASLR support     - stack protection (libSSP) --- *update* > [common] | [kernel] move kernel source file in the new "vxgos" root directory | [boards] move board-related files / scripts in the new "vxgos" | [bootloader] support fxcg50 self-translation from ROM to RAM | [bootloader] support fxcg50 KASLR patching | [scripts] move `vxdev` tool in the new "scripts" root directory | [scripts] move norm related files to "checker" directory | [vxsdk] update the vxSDK indication file
2023-04-13 13:58:40 +02:00
#ifndef FXCG50_BOOTLOADER_ASM_UTILS_H
#define FXCG50_BOOTLOADER_ASM_UTILS_H 1
/* function() : define a function using special indication
*
* - the function's name must start with a '_'
* - the function should start in a 4-aligned address in order to benefit from
* the ILP (Instruction Level Parallelism) */
#define function(name) \
.balign 4 ;\
.global _ ## name ;\
_ ## name
/* FXCG50_SYSCALL_TRAMPOLINE - Casio's syscall trampoline address */
#define FXCG50_SYSCALL_TRAMPOLINE 0x80020070
vxkernel - v0.7.0-1 : architecture overhaul + bootloader KASLR resolve --- The objective of this early rework of the kernel architecture is to prepare the project to run on other hardware than the Casio calculator (like Raspberry Pi devices). This is why I switched the kernel workflow to integrate a custom bootloader for the particular kernel image we generate. The v0.7.0 of the kernel is not released since the USB driver is not stable yet. But the need to deeply rework the architecture is prioritized. So, as this is a critical update, I update the minor version (which is a major indicator here since I don't have the mature version yet (v1.x.x)). Also, I work on a brand-new micro-kernel (for the Raspberry Pi 3b and Google Pixels), so, the name of this project, Vhex, has migrated to a temporary name(?): VxGOS (for Vhex Gaming Operating System), which will be changed as soon as the v0.8.0 is released. (I choose this name only because the word "gaming" make me laugh. Take showers folks). The objective of version 0.8.0 is to support:     - architecture rework     - internal bootloader     - proper KASLR support     - stack protection (libSSP) --- *update* > [common] | [kernel] move kernel source file in the new "vxgos" root directory | [boards] move board-related files / scripts in the new "vxgos" | [bootloader] support fxcg50 self-translation from ROM to RAM | [bootloader] support fxcg50 KASLR patching | [scripts] move `vxdev` tool in the new "scripts" root directory | [scripts] move norm related files to "checker" directory | [vxsdk] update the vxSDK indication file
2023-04-13 13:58:40 +02:00
/* syscall() : helper used to quickly define Casio syscall invokation
*
* - the syscall trampoline code is common for all syscall
* - r0 contain the syscall ID */
#define syscall(id) \
mov.l 1f, r2 ;\
mov.l 2f, r0 ;\
jmp @r2 ;\
nop ;\
.balign 4 ;\
1: .long FXCG50_SYSCALL_TRAMPOLINE ;\
vxkernel - v0.7.0-1 : architecture overhaul + bootloader KASLR resolve --- The objective of this early rework of the kernel architecture is to prepare the project to run on other hardware than the Casio calculator (like Raspberry Pi devices). This is why I switched the kernel workflow to integrate a custom bootloader for the particular kernel image we generate. The v0.7.0 of the kernel is not released since the USB driver is not stable yet. But the need to deeply rework the architecture is prioritized. So, as this is a critical update, I update the minor version (which is a major indicator here since I don't have the mature version yet (v1.x.x)). Also, I work on a brand-new micro-kernel (for the Raspberry Pi 3b and Google Pixels), so, the name of this project, Vhex, has migrated to a temporary name(?): VxGOS (for Vhex Gaming Operating System), which will be changed as soon as the v0.8.0 is released. (I choose this name only because the word "gaming" make me laugh. Take showers folks). The objective of version 0.8.0 is to support:     - architecture rework     - internal bootloader     - proper KASLR support     - stack protection (libSSP) --- *update* > [common] | [kernel] move kernel source file in the new "vxgos" root directory | [boards] move board-related files / scripts in the new "vxgos" | [bootloader] support fxcg50 self-translation from ROM to RAM | [bootloader] support fxcg50 KASLR patching | [scripts] move `vxdev` tool in the new "scripts" root directory | [scripts] move norm related files to "checker" directory | [vxsdk] update the vxSDK indication file
2023-04-13 13:58:40 +02:00
2: .long id
#endif /* FXCG50_BOOTLOADER_ASM_UTILS_H */