wrote a shell but have an error will debug tomorrow

This commit is contained in:
2025-07-29 21:48:16 +03:00
parent bc9fa4eac7
commit cfffd14b4b
7 changed files with 86 additions and 22 deletions

View File

@@ -5,13 +5,14 @@
#define PROC_UNUSED 0 // Unused processes control structure
#define PROC_RUNNABLE 1 // Runnable proccess
#define SATP_SV32 (1u << 31)
#define SSTATUS_SPIE (1 << 5)
#define SCAUSE_ECALL 8
#define PAGE_V (1 << 0) // "Valid" bit (entry is allowed)
#define PAGE_R (1 << 1) // Readable
#define PAGE_W (1 << 2) // Writable
#define PAGE_X (1 << 3) // Executable
#define PAGE_U (1 << 4) // User (accessible in user mode)
#define USER_BASE 0x1000000
#define SSTATUS_SPIE (1 << 5)
struct process {
int pid; // ID of a process