#ifndef RK_MEM_H_ #define RK_MEM_H_ #include #include #define KERNEL_START 0x1000000 // 1 MiB #define KERNEL_SIZE 0xC800 // 50 KiB #define BLOCK_SIZE 4096 #define BITS 32 uint8_t mmap_init(struct kernel_context *ctx); void mmap_set_block(struct kernel_context *ctx, int block); void mmap_free_block(struct kernel_context *ctx, int block); void *mmap_find_first_free_block(struct kernel_context *ctx); void *mmap_block_to_physical(struct kernel_context *ctx, int block); void *memset(void *s, int c, uint32_t len); #endif