Key Changes Compared to Version 1:
Patch 3: Array subscript was replaced by a register constant.
Patches 4 and 5: Merged into a single patch.
Patch 6: Comment was removed.
Patch 10: ROUND_DOWN was used to align the stack.
Array subscript was replaced by a register constant.
Patch 15: Regi
From: Warner Losh
Added a generic definition for RISC-V64 target-specific details.
Implemented the 'regpairs_aligned' function,which returns 'false'
to indicate that register pairs are not aligned in the RISC-V64 ABI.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
orbin
Signed-off-by: Ajeet Singh
Signed-off-by: Warner Losh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/signal.c | 53 +
1 file changed, 53 insertions(+)
diff --git a/bsd-user/riscv/signal.c b/bsd-user/riscv/signa
From: Mark Corbin
Added the initial implementation for RISC-V CPU initialization and main
loop. This includes setting up the general-purpose registers and
program counter based on the provided target architecture definitions.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored
: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 94
1 file changed, 94 insertions(+)
diff --git a/bsd-user/riscv/target_arch_cpu.h b/bsd-user/riscv/target_arch_cpu.h
index
From: Warner Losh
Added configuration for RISC-V 64-bit target to the build system.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
configs/targets/riscv64-bsd-user.mak | 4
1 file changed, 4 insertions(+)
create mode 100644 configs/targets
From: Mark Corbin
Added the 'do_freebsd_arch_sysarch' function to emulate the 'sysarch'
system call for the RISC-V architecture.
Currently, this function returns '-TARGET_EOPNOTSUPP' to indicate that
the operation is not supported.
Signed-off-by: Mark Corb
ure, ensuring proper endianness handling using 'tswapreg'.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_reg.h | 88
1 file changed, 88 insertions(+)
create mode 100644 bsd-user/riscv
the signal handler
address, and the signal frame pointer.
'setup_sigframe_arch()': Initializes the signal frame with the current
machine context.This function copies the context from the CPU state to
the signal frame, preparing it for the signal handler.
Signed-off-by: Mark Corbin
Signed
From: Mark Corbin
Implemented the `setup_sigtramp` function for setting up the signal
trampoline code in the RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_sigtramp.h | 46
From: Mark Corbin
Introduced definitions for the RISC-V system call interface, including
the 'target_pt_regs' structure that outlines the register storage
layout during a system call.
Added constants for hardware machine identifiers.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet
From: Mark Corbin
Included the prototype for the 'target_cpu_set_tls' function in the
'target_arch.h' header file. This function is responsible for setting
the Thread Local Storage (TLS) register for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajee
From: Mark Corbin
Added implementations for 'set_mcontext' and 'get_ucontext_sigreturn'
functions for RISC-V architecture,
Both functions ensure that the CPU state and user context are properly
managed.
Signed-off-by: Mark Corbin
Signed-off-by: Warner Losh
Signed-off
zes thread registers based on
the provided image information.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
---
bsd-user/riscv/target_arch_thread.h | 47 +
1 file changed, 47 insertions(+)
create mode 1
From: Mark Corbin
Added definitions for RISC-V signal handling, including structures
and constants for managing signal frames and context
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_signal.h
From: Mark Corbin
Added functions for cloning CPU registers and resetting the CPU state
for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 14 ++
1 file changed, 14 insertions
-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_vmparam.h | 53
1 file changed, 53 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_vmparam.h
diff --git a/bsd-user/riscv/target_arch_vmparam.h
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_elf.h | 42
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_elf.h
diff --git a/bsd-user/riscv/target_arch_elf.h b
From: Stacey Son
Defined mmap and dynamic load adresses and
set various elf parameters
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
---
bsd-user/aarch64/target_arch_elf.h | 37 ++
1 file changed, 37 insertions(+)
create mode
From: Stacey Son
Addded function to initialize ARM CPU
and to check if it supports 64 bit mode
Signed-off-by: Ajeet Singh
Signed-off-by: Stacey Son
---
bsd-user/aarch64/target_arch_cpu.h | 42 ++
1 file changed, 42 insertions(+)
create mode 100644 bsd-user
From: Stacey Son
Defined address spaces for FreeBSD/arm64 and added function for
getting stack pointer from CPU and setting a return value.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Co-authored-by: Sean Bruno
Co-authored-by: Warner Losh
---
bsd-user
From: Stacey Son
Function to set and recieve thread-local-storage value
from tpidr_el0 register
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_cpu.c | 34 ++
1 file changed, 34 insertions(+)
create mode 100644 bsd-user
From: Warner Losh
The function initializes default hardware capabilities and
finds additional features using the `GET_FEATURE_ID` macro
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_elf.h | 38 ++
1 file changed, 38
From: Warner Losh
Defined a huge list of hardware capabilites and added
macros for retrieving hwcap flags
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_elf.h | 61 ++
1 file changed, 61 insertions(+)
diff --git a/bsd-user
From: Stacey Son
Added structure for storing register states
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Sean Bruno
---
bsd-user/aarch64/target_syscall.h | 51 +++
1 file changed, 51 insertions(+)
create mode 100644 bsd-user/aarch64
From: Stacey Son
signal trampoline function initializes a sequence of instructions
to handle signal returns and exits, and copies this code to the target offset.
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_sigtramp.h | 48 +
1
From: Stacey Son
CPU loop function to handle exceptions
and emulate execution of instructions
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Co-authored-by: Sean Bruno
Co-authored-by: Jessica Clarke
---
bsd-user/aarch64/target_arch_cpu.h | 132
From: Warner Losh
The function utilizes the `get_mcontext` function to retrieve the machine
context for the current CPUARMState
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/signal.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/bsd-user
From: Stacey Son
Prototypes for setting and getting TLS( thread local storage)
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch.h | 28
1 file changed, 28 insertions(+)
create mode 100644 bsd-user/aarch64/target_arch.h
diff
From: Warner Losh
Function to retrieve the extended hardware capability flags
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_elf.h | 29 +
1 file changed, 29 insertions(+)
diff --git a/bsd-user/aarch64/target_arch_elf.h
b
making sure to credit all the authors correctly
Stacey Son (18):
Add CPU initialization function
Added CPU loop function
Added function to clone CPU state
AArch64 specific CPU for bsd-user
Managing CPU register for BSD-USER
Add Aarch64 register handling
Add ARM AArch64 TLS Management
From: Stacey Son
Function for setting up thread upcall which will
add thread support to BSD-User
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
---
bsd-user/aarch64/target_arch_thread.h | 45 +++
1 file changed, 45 insertions
From: Stacey Son
Initializes thread's register state
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
---
bsd-user/aarch64/target_arch_thread.h | 16
1 file changed, 16 insertions(+)
diff --git a/bsd-user/aarch64/target_arch_thread
From: Stacey Son
Defined register indices and sizes,introduced structures to represent
general purpose registers, floating point registers, and machine context
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
---
bsd-user/aarch64
From: Stacey Son
Initial implementation of sysarch() syscall and a printing function
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_sysarch.h | 42 ++
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/aarch64
From: Stacey Son
Function can copy cpu state to create new thread
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_cpu.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/bsd-user/aarch64/target_arch_cpu.h
b/bsd-user/aarch64
From: Stacey Son
function to set up signal handler arguments it populates
register values in `CPUARMState` based on the provided
signal, signal frame, signal action, and frame address
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/signal.c | 53
From: Stacey Son
Function checks the processor state to ensure that the current
execution mode is EL0 and no flags indicating interrupts or
exceptions are set
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/signal.c | 18 ++
1 file changed, 18
From: Stacey Son
The function copies register values from the provided target_mcontext_t
structure to the CPUARMState registers
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/signal.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/bsd
From: Stacey Son
function to retrieve machine context,it populates the provided
target_mcontext_t structure with information from the CPUARMState
registers
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
---
bsd-user/aarch64/signal.c | 30
From: Stacey Son
Header file for managing CPU register states in
FreeBSD user mode
Signed-off-by: Stacey Son
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_reg.h | 56 ++
1 file changed, 56 insertions(+)
create mode 100644 bsd-user/aarch64
From: Warner Losh
Function accesses the x1 register which holds the value
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
---
bsd-user/aarch64/target_arch_vmparam.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/bsd-user/aarch64/target_arch_vmparam.h
b/bsd-user/aarch64
-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_vmparam.h | 53
1 file changed, 53 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_vmparam.h
diff --git a/bsd-user/riscv/target_arch_vmparam.h
From: Mark Corbin
Implemented the 'setup_sigtramp' function for setting up the signal
trampoline code in the RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_sigtr
From: Mark Corbin
Included the prototype for the 'target_cpu_set_tls' function in the
'target_arch.h' header file. This function is responsible for setting
the Thread Local Storage (TLS) register for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajee
From: Warner Losh
Added configuration for RISC-V 64-bit target to the build system.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
configs/targets/riscv64-bsd-user.mak | 4
1 file changed, 4 insertions(+)
create mode 100644 configs/targets
Key Changes Compared to Version 2:
Patch 1: changed loop conditions to avoid setting r0
Patch 7: replaced manual byte swapping with const_le32
Patch 9: used ROUND_DOWN to align the stack
Mark Corbin (15):
bsd-user: Implement RISC-V CPU initialization and main loop
bsd-user: Add RISC-V CPU exec
From: Mark Corbin
Added the initial implementation for RISC-V CPU initialization and main
loop. This includes setting up the general-purpose registers and
program counter based on the provided target architecture definitions.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored
From: Mark Corbin
Added implementations for 'set_mcontext' and 'get_ucontext_sigreturn'
functions for RISC-V architecture,
Both functions ensure that the CPU state and user context are properly
managed.
Signed-off-by: Mark Corbin
Signed-off-by: Warner Losh
Signed-off
zes thread registers based on
the provided image information.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
---
bsd-user/riscv/target_arch_thread.h | 47 +
1 file changed, 47 insertions(+)
create mode 1
From: Mark Corbin
Introduced definitions for the RISC-V system call interface, including
the 'target_pt_regs' structure that outlines the register storage
layout during a system call.
Added constants for hardware machine identifiers.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet
ure, ensuring proper endianness handling using 'tswapreg'.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_reg.h | 88
1 file changed, 88 insertions(+)
create mode 100644 bsd-user/riscv
From: Warner Losh
Added a generic definition for RISC-V64 target-specific details.
Implemented the 'regpairs_aligned' function,which returns 'false'
to indicate that register pairs are not aligned in the RISC-V64 ABI.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
From: Mark Corbin
Added functions for cloning CPU registers and resetting the CPU state
for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 14 ++
1 file changed, 14 insertions
From: Mark Corbin
Added definitions for RISC-V signal handling, including structures
and constants for managing signal frames and context
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_signal.h
: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 94
1 file changed, 94 insertions(+)
diff --git a/bsd-user/riscv/target_arch_cpu.h b/bsd-user/riscv/target_arch_cpu.h
index
orbin
Signed-off-by: Ajeet Singh
Signed-off-by: Warner Losh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/signal.c | 53 +
1 file changed, 53 insertions(+)
diff --git a/bsd-user/riscv/signal.c b/bsd-user/riscv/signa
the signal handler
address, and the signal frame pointer.
'setup_sigframe_arch()': Initializes the signal frame with the current
machine context.This function copies the context from the CPU state to
the signal frame, preparing it for the signal handler.
Signed-off-by: Mark Corbin
Signed
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_elf.h | 42
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_elf.h
diff --git a/bsd-user/riscv/target_arch_elf.h b
From: Mark Corbin
Added the 'do_freebsd_arch_sysarch' function to emulate the 'sysarch'
system call for the RISC-V architecture.
Currently, this function returns '-TARGET_EOPNOTSUPP' to indicate that
the operation is not supported.
Signed-off-by: Mark Corb
Key Changes Compared to Version 3:
Minor comment changes and all the patches
have been reviewed by Richard Henderson
Mark Corbin (15):
bsd-user: Implement RISC-V CPU initialization and main loop
bsd-user: Add RISC-V CPU execution loop and syscall handling
bsd-user: Implement RISC-V CPU regi
zes thread registers based on
the provided image information.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_thread.h | 47 +
1 file ch
-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_vmparam.h | 53
1 file changed, 53 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_vmparam.h
diff --git a/bsd-user/riscv/target_arch_vmparam.h
From: Mark Corbin
Added implementations for 'set_mcontext' and 'get_ucontext_sigreturn'
functions for RISC-V architecture,
Both functions ensure that the CPU state and user context are properly
managed.
Signed-off-by: Mark Corbin
Signed-off-by: Warner Losh
Signed-off
From: Warner Losh
Added configuration for RISC-V 64-bit target to the build system.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
configs/targets/riscv64-bsd-user.mak | 4
1 file changed, 4 insertions(+)
create mode 100644 configs/targets
From: Mark Corbin
Added the initial implementation for RISC-V CPU initialization and main
loop. This includes setting up the general-purpose registers and
program counter based on the provided target architecture definitions.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored
From: Mark Corbin
Added functions for cloning CPU registers and resetting the CPU state
for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 14 ++
1 file changed, 14 insertions
From: Mark Corbin
Introduced definitions for the RISC-V system call interface, including
the 'target_pt_regs' structure that outlines the register storage
layout during a system call.
Added constants for hardware machine identifiers.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet
From: Mark Corbin
Added definitions for RISC-V signal handling, including structures
and constants for managing signal frames and context
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_signal.h
From: Warner Losh
Added a generic definition for RISC-V64 target-specific details.
Implemented the 'regpairs_aligned' function,which returns 'false'
to indicate that register pairs are not aligned in the RISC-V64 ABI.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
the signal handler
address, and the signal frame pointer.
'setup_sigframe_arch()': Initializes the signal frame with the current
machine context.This function copies the context from the CPU state to
the signal frame, preparing it for the signal handler.
Signed-off-by: Mark Corbin
Signed
From: Mark Corbin
Included the prototype for the 'target_cpu_set_tls' function in the
'target_arch.h' header file. This function is responsible for setting
the Thread Local Storage (TLS) register for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajee
From: Mark Corbin
Added the 'do_freebsd_arch_sysarch' function to emulate the 'sysarch'
system call for the RISC-V architecture.
Currently, this function returns '-TARGET_EOPNOTSUPP' to indicate that
the operation is not supported.
Signed-off-by: Mark Corb
orbin
Signed-off-by: Ajeet Singh
Signed-off-by: Warner Losh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/signal.c | 53 +
1 file changed, 53 insertions(+)
diff --git a/bsd-user/riscv/signal.c b/bsd-user/riscv/signa
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_elf.h | 42
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_elf.h
diff --git a/bsd-user/riscv/target_arch_elf.h b
: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 94
1 file changed, 94 insertions(+)
diff --git a/bsd-user/riscv/target_arch_cpu.h b/bsd-user/riscv/target_arch_cpu.h
index
From: Mark Corbin
Implemented the 'setup_sigtramp' function for setting up the signal
trampoline code in the RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_sigtr
ure, ensuring proper endianness handling using 'tswapreg'.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_reg.h | 88
1 file changed, 88 insertions(+)
create mode 100644 bsd-user/riscv
: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 94
1 file changed, 94 insertions(+)
diff --git a/bsd-user/riscv/target_arch_cpu.h b/bsd-user/riscv/target_arch_cpu.h
index
From: Mark Corbin
Included the prototype for the 'target_cpu_set_tls' function in the
'target_arch.h' header file. This function is responsible for setting
the Thread Local Storage (TLS) register for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajee
ure, ensuring proper endianness handling using 'tswapreg'.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_reg.h | 88
1 file changed, 88 insertions(+)
create mode 100644 bsd-user/riscv
From: Mark Corbin
Introduced definitions for the RISC-V system call interface, including
the 'target_pt_regs' structure that outlines the register storage
layout during a system call.
Added constants for hardware machine identifiers.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet
From: Mark Corbin
Implemented the 'setup_sigtramp' function for setting up the signal
trampoline code in the RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_sigtr
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_elf.h | 42
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_elf.h
diff --git a/bsd-user/riscv/target_arch_elf.h b
From: Mark Corbin
Added functions for cloning CPU registers and resetting the CPU state
for RISC-V architecture.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_cpu.h | 14 ++
1 file changed, 14 insertions
-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_vmparam.h | 53
1 file changed, 53 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_vmparam.h
diff --git a/bsd-user/riscv/target_arch_vmparam.h
From: Mark Corbin
Added the initial implementation for RISC-V CPU initialization and main
loop. This includes setting up the general-purpose registers and
program counter based on the provided target architecture definitions.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored
From: Mark Corbin
Added the 'do_freebsd_arch_sysarch' function to emulate the 'sysarch'
system call for the RISC-V architecture.
Currently, this function returns '-TARGET_EOPNOTSUPP' to indicate that
the operation is not supported.
Signed-off-by: Mark Corb
From: Warner Losh
Added configuration for RISC-V 64-bit target to the build system.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
configs/targets/riscv64-bsd-user.mak | 4
1 file changed, 4 insertions(+)
create mode 100644 configs/targets
the signal handler
address, and the signal frame pointer.
'setup_sigframe_arch()': Initializes the signal frame with the current
machine context.This function copies the context from the CPU state to
the signal frame, preparing it for the signal handler.
Signed-off-by: Mark Corbin
Signed
orbin
Signed-off-by: Ajeet Singh
Signed-off-by: Warner Losh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/signal.c | 53 +
1 file changed, 53 insertions(+)
diff --git a/bsd-user/riscv/signal.c b/bsd-user/riscv/signa
From: Warner Losh
Added a generic definition for RISC-V64 target-specific details.
Implemented the 'regpairs_aligned' function,which returns 'false'
to indicate that register pairs are not aligned in the RISC-V64 ABI.
Signed-off-by: Warner Losh
Signed-off-by: Ajeet Singh
Key Changes Compared to Version 4:
Minor formatting changes
Mark Corbin (15):
bsd-user: Implement RISC-V CPU initialization and main loop
bsd-user: Add RISC-V CPU execution loop and syscall handling
bsd-user: Implement RISC-V CPU register cloning and reset functions
bsd-user: Implement RIS
From: Mark Corbin
Added definitions for RISC-V signal handling, including structures
and constants for managing signal frames and context
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_signal.h
zes thread registers based on
the provided image information.
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Jessica Clarke
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_thread.h | 47 +
1 file ch
From: Mark Corbin
Added implementations for 'set_mcontext' and 'get_ucontext_sigreturn'
functions for RISC-V architecture,
Both functions ensure that the CPU state and user context are properly
managed.
Signed-off-by: Mark Corbin
Signed-off-by: Warner Losh
Signed-off
Key Changes Compared to Version 5:
In target_arch_sigtramp.h removed static const,
as there was a compile-time constant issue
Mark Corbin (15):
bsd-user: Implement RISC-V CPU initialization and main loop
bsd-user: Add RISC-V CPU execution loop and syscall handling
bsd-user: Implement RISC-V
Signed-off-by: Ajeet Singh
Co-authored-by: Kyle Evans
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_elf.h | 42
1 file changed, 42 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_elf.h
diff --git a/bsd-user/riscv/target_arch_elf.h b
From: Mark Corbin
Added definitions for RISC-V signal handling, including structures
and constants for managing signal frames and context
Signed-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Co-authored-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_signal.h
-off-by: Mark Corbin
Signed-off-by: Ajeet Singh
Reviewed-by: Richard Henderson
---
bsd-user/riscv/target_arch_vmparam.h | 53
1 file changed, 53 insertions(+)
create mode 100644 bsd-user/riscv/target_arch_vmparam.h
diff --git a/bsd-user/riscv/target_arch_vmparam.h
1 - 100 of 161 matches
Mail list logo