Temporary fixes for process waiting and stack setup to allow simple user programs to run #24

Merged
sb3923 merged 2 commits from user-programs-temporary-fix into user-programs 2024-11-06 16:41:49 +00:00
Showing only changes of commit fcb7e9e441 - Show all commits

View File

@@ -457,7 +457,7 @@ setup_stack (void **esp)
{ {
success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true); success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true);
if (success) if (success)
*esp = PHYS_BASE; *esp = PHYS_BASE - 12;
else else
palloc_free_page (kpage); palloc_free_page (kpage);
} }