Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for loongarch #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions include/arch-loongarch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#define PAGE_OFFSET 0x9000000000000000
#define TASK_SIZE (PAGE_OFFSET)
#define MODULE_ADDR 0xffff800000000000
#define KERNEL_ADDR 0x9000000000000000

#define PAGE_SHIFT 14
#define PTE_FILE_MAX_BITS 31

#define PTRACE_GETREGS 0
#define PTRACE_GETFPREGS 0
#define PTRACE_SETREGS 0
#define PTRACE_SETFPREGS 0

#define SYSCALLS syscalls_loongarch
3 changes: 3 additions & 0 deletions include/arch-syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@
#error "riscv32 is not supported yet."
#endif
#endif
#ifdef __loongarch__
#include "syscalls-loongarch.h"
#endif
4 changes: 4 additions & 0 deletions include/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
#endif
#endif

#ifdef __loongarch__
#include "arch-loongarch.h"
#endif

#ifndef SYSCALL_OFFSET
#define SYSCALL_OFFSET 0
#endif
Expand Down
Loading