File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 22
33; START_ENSURE_SAME_layout_h
44MEMORY_APP_SIZE EQU 0x20000
5+ MEMORY_KERNEL_SIZE EQU 0x64000
56; END_ENSURE_SAME_layout_h
67
78; Kernel core is app with pid 0
89; Kernel event is trigged via IRQ0 or syscall,
910STACKINIT_APP EQU (MEMORY_APP_SIZE-4 )
10- STACKINIT_KERNEL_CORE EQU (STACKINIT_APP -4 )
11+ STACKINIT_KERNEL_CORE EQU (MEMORY_KERNEL_SIZE/ 2 )
1112
1213; Should be able to store
1314; - syscall and all internal calls
1415; - ISRs and all internal calls
15- STACKINIT_KERNEL_EVENT EQU 0x18000
16+ STACKINIT_KERNEL_EVENT EQU (MEMORY_KERNEL_SIZE -4 )
1617
Original file line number Diff line number Diff line change 2424 * Resolution:
2525 * - I'm not sure.
2626 */
27- #define MEMORY_APPBASE_LOCATION 0x10000
27+ #define MEMORY_APPBASE_LOCATION 0x100000
2828
29- #define memmgr_app_abs_location (pid ) ((pid==0)?0x0F000:(MEMORY_APPBASE_LOCATION + (pid)*MEMORY_APP_SIZE))
30- #define memmgr_app_size (pid ) (MEMORY_APP_SIZE)
29+ // Keep in sync with memory_layout.md
30+ #define memmgr_app_abs_location (pid ) ((pid==PID_KERNEL)?0x0C000:(MEMORY_APPBASE_LOCATION + (pid)*MEMORY_APP_SIZE))
31+ #define memmgr_app_size (pid ) ((pid==PID_KERNEL)?0x64000:MEMORY_APP_SIZE)
3132
3233#define MEMORY_KERNEL_LOCATION (memmgr_app_abs_location(PID_KERNEL))
3334#define MEMORY_KERNEL_SIZE (memmgr_app_size(PID_KERNEL))
Original file line number Diff line number Diff line change 44| --------- | -------- | -------- | -------------------------------------------- |
55| 0x00000 | 0x003FF | - | IVT (standard) |
66| 0x00400 | 0x07BFF | - | BIOS data area + reserve |
7- | 0x07C00 | 0x07DFF | 512B | Bootloader Stage 1 |
8- | 0x07E00 | 0x07FFF | 512B | STATIC CODE for real_mode library |
9- | 0x08000 | 0x0BFFF | - | Bootloader Stage 2 + own stack |
10- | 0x0F000 | 0x2EFFF | 128KB | Kernel + (core, irq, syscall) stack |
11- | 0x30000 | 0x4FFFF | 128KB | App pid 1 |
12- | 0x50000 | 0x6FFFF | 128KB | App pid 2 |
7+ | 0x07C00 | 0x07DFF | 512B | Bootloader Stage 1 |
8+ | 0x07E00 | 0x07FFF | 512B | STATIC CODE for real_mode library |
9+ | 0x08000 | 0x0BFFF | 16KB | Bootloader Stage 2 + own stack |
10+ | 0x0C000 | 0x6FFFF | 400KB | Kernel + (core, isr, syscall) stack |
1311| 0x70000 | 0x7FFFF | 64KB | Extra space for real_mode library+client |
1412| 0x80000 | 0x9FFFF | 128KB | Extended BIOS Data area |
1513| 0xA0000 | 0xBFFFF | 128KB | Video memory |
1614| 0xC0000 | 0xFFFFF | 256KB | BIOS stuff |
15+ | 0x100000 | 0x1FFFFF | 1MB | Kernel future location (not used) |
16+ | 0x200000 | 0x2FFFFF | 1MB | App pid 1 |
17+ | 0x300000 | 0x3FFFFF | 1MB | App pid 2 |
18+ | ... | .... | 1MB | App ... |
You can’t perform that action at this time.
0 commit comments