memory stub
This commit is contained in:
parent
d1f512e3a0
commit
bbf6441108
|
@ -22,6 +22,14 @@
|
||||||
#define START 0xb80f0
|
#define START 0xb80f0
|
||||||
#define SIZE 16384
|
#define SIZE 16384
|
||||||
|
|
||||||
|
/*
|
||||||
|
* How memory is mapped
|
||||||
|
*/
|
||||||
|
#define STACK_START 0x000b8fa0
|
||||||
|
#define STACK_END 0x000fffff
|
||||||
|
#define PR_START 0x00100000
|
||||||
|
#define PHYSMEMTOP 0x0e000000
|
||||||
|
|
||||||
struct allocated {
|
struct allocated {
|
||||||
void *ref;
|
void *ref;
|
||||||
s32 size;
|
s32 size;
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
|
|
||||||
u32 curr = START;
|
u32 curr = START;
|
||||||
|
|
||||||
|
void
|
||||||
|
memory_init(void)
|
||||||
|
{
|
||||||
|
u32 esp, ebp;
|
||||||
|
ebp = 0x8B7F0;
|
||||||
|
}
|
||||||
|
|
||||||
void *malloc(s32 size) {
|
void *malloc(s32 size) {
|
||||||
u32 addr = curr;
|
u32 addr = curr;
|
||||||
curr += size;
|
curr += size;
|
||||||
|
|
|
@ -11,6 +11,8 @@ sysinit(void)
|
||||||
vga_clearscreen();
|
vga_clearscreen();
|
||||||
vga_write("Starting omOS...", 16, 0x0F);
|
vga_write("Starting omOS...", 16, 0x0F);
|
||||||
|
|
||||||
|
memory_init();
|
||||||
|
|
||||||
s8 *start = (s8 *) 0xb8fa0;
|
s8 *start = (s8 *) 0xb8fa0;
|
||||||
start[0] = 'h';
|
start[0] = 'h';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue