Skip to content

Commit ad7ae61

Browse files
committed
Increase app size to 256KB and move stack init offset
1 parent da6ef16 commit ad7ae61

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

include/fuzzy/memmgr/layout.asm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
; constants only
22

3+
; START_ENSURE_SAME_layout_h
4+
MEMORY_APP_SIZE EQU 0x20000
5+
6+
; END_ENSURE_SAME_layout_h
7+
38
; Kernel core is app with pid 0
49
; Kernel event is trigged via IRQ0 or syscall,
10+
STACKINIT_APP EQU (MEMORY_APP_SIZE-4)
11+
STACKINIT_KERNEL_CORE EQU (STACKINIT_APP-4)
512

6-
STACKINIT_APP EQU 0xFFF0
7-
STACKINIT_KERNEL_CORE EQU STACKINIT_APP
13+
; Should be able to store
14+
; - syscall and all internal calls
15+
; - ISRs and all internal calls
816
STACKINIT_KERNEL_EVENT EQU 0xC000
917

include/fuzzy/memmgr/layout.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#pragma once
22

3+
// START_ENSURE_SAME_layout_asm
4+
#define MEMORY_APP_SIZE 0x20000
5+
// END_ENSURE_SAME_layout_asm
6+
37
// Most of the memory layout relies on the fact the kernel is first app
48
// and kernel's pid is 0.
59
#define PID_KERNEL 0
610

711
#define MEMORY_APPBASE_LOCATION 0x10000
8-
#define MEMORY_APP_SIZE 0x20000
912

1013
#define memmgr_app_abs_location(pid) (MEMORY_APPBASE_LOCATION + (pid)*MEMORY_APP_SIZE)
1114
#define memmgr_app_size(pid) (MEMORY_APP_SIZE)

0 commit comments

Comments
 (0)