memory stub

This commit is contained in:
spikey 2024-02-18 11:03:57 -05:00
parent d1f512e3a0
commit bbf6441108
3 changed files with 17 additions and 0 deletions

View File

@ -22,6 +22,14 @@
#define START 0xb80f0
#define SIZE 16384
/*
* How memory is mapped
*/
#define STACK_START 0x000b8fa0
#define STACK_END 0x000fffff
#define PR_START 0x00100000
#define PHYSMEMTOP 0x0e000000
struct allocated {
void *ref;
s32 size;

View File

@ -3,6 +3,13 @@
u32 curr = START;
void
memory_init(void)
{
u32 esp, ebp;
ebp = 0x8B7F0;
}
void *malloc(s32 size) {
u32 addr = curr;
curr += size;

View File

@ -11,6 +11,8 @@ sysinit(void)
vga_clearscreen();
vga_write("Starting omOS...", 16, 0x0F);
memory_init();
s8 *start = (s8 *) 0xb8fa0;
start[0] = 'h';
}