Skip to content

P29 - Implement user-level shell with static allocation, console I/O, and syscall memory fixes#314

Merged
sai-kaushik-s merged 2 commits intocodenet:p29-shellfrom
parthagr3:p29-shell
Apr 13, 2026
Merged

P29 - Implement user-level shell with static allocation, console I/O, and syscall memory fixes#314
sai-kaushik-s merged 2 commits intocodenet:p29-shellfrom
parthagr3:p29-shell

Conversation

@parthagr3
Copy link
Copy Markdown

This PR introduces the foundational user-level shell (sh) for the xv6 operating system. Since malloc support is not yet available, the shell utilizes statically allocated buffers for command parsing and execution. This PR also wires up standard I/O descriptors, enables hardware keyboard interrupts for the console, and fixes critical memory translation bugs in system call argument fetching to account for the custom user process memory offsets.

Testing:
Successfully boots into user space via make qemu.

init successfully forks and executes sh.

Console displays the $ prompt and accepts keyboard input without freezing.

On writing any command, it outputs exec:fail, exec cat failed. Shell command functionality will be added in the next branch.

@parthagr3 parthagr3 changed the title Implement user-level shell with static allocation, console I/O, and syscall memory fixes P29 - Implement user-level shell with static allocation, console I/O, and syscall memory fixes Apr 10, 2026
@sai-kaushik-s sai-kaushik-s merged commit 602e266 into codenet:p29-shell Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants