Skip to content

Story 4.3 — SVC syscall path #28

Description

@Abhinkop

Goal

Implement a syscall dispatch path so that user programs can request kernel services safely.

Tasks

  • Add SVC #0 entry in vector.s: save GPRs, call C dispatcher
  • Define initial syscall table: SYS_WRITE=1, SYS_EXIT=60, SYS_GETPID=39
  • Implement sys_write(fd, buf_va, len): validate user VA, write to UART
  • Implement sys_exit(code): mark task dead, schedule
  • Implement sys_getpid(): return current task ID
  • Add user-side syscall.h with inline wrappers
  • Test: user task prints "Hello from EL0" via sys_write

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions