wrote a shell but have an error will debug tomorrow
This commit is contained in:
3
kernel.h
3
kernel.h
@@ -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
|
||||
|
Reference in New Issue
Block a user