Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
Loading...
Searching...
No Matches
asm_helper.h
Go to the documentation of this file.
1
12#ifndef ASM_ASM_HELPER_H
13#define ASM_ASM_HELPER_H
14
16#define READ_SYS_REG(reg, val) \
17 do { \
18 asm volatile("mrs %0, " #reg : "=r"(val)); \
19 } while (0)
20
22#define WRITE_SYS_REG(reg, val) \
23 do { \
24 asm volatile("msr " #reg ", %0" : : "r"(val)); \
25 } while (0)
26
27#endif /* ASM_ASM_HELPER_H */