27 lines
545 B
C
27 lines
545 B
C
#ifndef HAZEL_MEM_H_
|
|
#define HAZEL_MEM_H_
|
|
|
|
#include <kernel/kernel.h>
|
|
#include <stdint.h>
|
|
|
|
#define KERNEL_START 0x1000000 // 1 MiB
|
|
#define KERNEL_SIZE 0xC800 // 50 KiB
|
|
#define BLOCK_SIZE 4096
|
|
#define BITS 32
|
|
|
|
uint8_t mmap_init(void);
|
|
void mmap_set_block(int block);
|
|
void mmap_free_block(int block);
|
|
void *mmap_find_first_free_block(void);
|
|
void *mmap_block_to_physical(int block);
|
|
|
|
void memset(void *s, int c, uint32_t len);
|
|
void memcpy(void *dest, void *src, int n);
|
|
|
|
typedef struct {
|
|
void *data;
|
|
void *next;
|
|
} linked_mem_t;
|
|
|
|
#endif
|