hrev53043 adds 5 changesets to branch 'master'
old head: dd0667da66cb007c8be2b641e1663ce464b7e1cb
new head: 40fcf16358a810cb8a1527a63dfb1cd34b2d6943
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=40fcf16358a8+%5Edd0667da66cb
----------------------------------------------------------------------------
d5ee175d9802: libroot/riscv64: Add missing sigjmp's.
Change-Id: Id353f86571ddf5bc106af7c77f0bd3d22b5b7cbd
Reviewed-on: https://review.haiku-os.org/c/1381
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
e21b752f137d: libroot/posix: Add missing riscv64 knowledge
Change-Id: I49682d79f5e4b2dd981480636e7a55d25f11c9d1
Reviewed-on: https://review.haiku-os.org/c/1377
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
45ebdd42175e: kernel/riscv64: Fix assembly to disable/enable interrupts
Change-Id: Id4dc7360650e78a9bcadec634be97b279da2d77c
Reviewed-on: https://review.haiku-os.org/c/1378
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
e0ec8de75331: kernel/riscv64: ATOMIC64 FUNCS are not syscalls
Change-Id: I8696939ec2fab6f3960a9a41f0b5c9fcd6949760
Reviewed-on: https://review.haiku-os.org/c/1379
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
40fcf16358a8: kernel/riscv64: Add missing kernel_arg ranges to get build going.
Change-Id: Idf549a5e4d01e6dc8949ec1252296337e5ef970c
Reviewed-on: https://review.haiku-os.org/c/1380
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
[ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
8 files changed, 53 insertions(+), 10 deletions(-)
.../kernel/arch/riscv64/arch_kernel_args.h | 9 +++++++++
.../private/system/arch/riscv64/arch_config.h | 2 +-
src/system/kernel/arch/riscv64/arch_asm.S | 8 ++++----
src/system/kernel/lib/arch/riscv64/Jamfile | 4 ++--
src/system/libroot/posix/arch/riscv64/Jamfile | 4 ++--
.../libroot/posix/arch/riscv64/siglongjmp.S | 20 ++++++++++++++++++++
.../libroot/posix/arch/riscv64/sigsetjmp.S | 13 +++++++++++++
src/system/libroot/posix/stdlib/strtod.c | 3 ++-
############################################################################
Commit: d5ee175d98027e91e2dde0b6cd0c09e6bd92d25c
URL: https://git.haiku-os.org/haiku/commit/?id=d5ee175d9802
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 4 19:17:09 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Apr 5 14:29:23 2019 UTC
libroot/riscv64: Add missing sigjmp's.
Change-Id: Id353f86571ddf5bc106af7c77f0bd3d22b5b7cbd
Reviewed-on: https://review.haiku-os.org/c/1381
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/system/kernel/lib/arch/riscv64/Jamfile
b/src/system/kernel/lib/arch/riscv64/Jamfile
index 3ffd75a931..bf5138168a 100644
--- a/src/system/kernel/lib/arch/riscv64/Jamfile
+++ b/src/system/kernel/lib/arch/riscv64/Jamfile
@@ -22,8 +22,8 @@ SEARCH_SOURCE += [ FDirName $(posixSources) string arch
generic ] ;
SEARCH_SOURCE += [ FDirName $(posixSources) string arch $(TARGET_ARCH) ] ;
KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o :
- #siglongjmp.S
- #sigsetjmp.S
+ siglongjmp.S
+ sigsetjmp.S
kernel_longjmp_return.c
kernel_setjmp_save_sigs.c
diff --git a/src/system/libroot/posix/arch/riscv64/Jamfile
b/src/system/libroot/posix/arch/riscv64/Jamfile
index 5a8d678ea7..7ee7d1ba29 100644
--- a/src/system/libroot/posix/arch/riscv64/Jamfile
+++ b/src/system/libroot/posix/arch/riscv64/Jamfile
@@ -12,8 +12,8 @@ for architectureObject in [ MultiArchSubDirSetup riscv64 ] {
MergeObject <$(architecture)>posix_arch_$(TARGET_ARCH).o :
fenv.c
- #sigsetjmp.S
- #siglongjmp.S
+ sigsetjmp.S
+ siglongjmp.S
$(genericSources)
;
diff --git a/src/system/libroot/posix/arch/riscv64/siglongjmp.S
b/src/system/libroot/posix/arch/riscv64/siglongjmp.S
new file mode 100644
index 0000000000..824600d984
--- /dev/null
+++ b/src/system/libroot/posix/arch/riscv64/siglongjmp.S
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019, Adrien Destugues, pulkomandy@xxxxxxxxxxxxx
+ * Distributed under the terms of the MIT License.
+ */
+
+
+#include <asm_defs.h>
+
+
+/* int __siglongjmp(jmp_buf buffer, int value) */
+FUNCTION(siglongjmp):
+FUNCTION(longjmp):
+FUNCTION(_longjmp):
+ ret
+FUNCTION_END(siglongjmp)
+FUNCTION_END(longjmp)
+FUNCTION_END(_longjmp)
+
+#pragma weak longjmp=siglongjmp
+
diff --git a/src/system/libroot/posix/arch/riscv64/sigsetjmp.S
b/src/system/libroot/posix/arch/riscv64/sigsetjmp.S
new file mode 100644
index 0000000000..594f881460
--- /dev/null
+++ b/src/system/libroot/posix/arch/riscv64/sigsetjmp.S
@@ -0,0 +1,13 @@
+/* Copyright 2019, Adrien Destugues, pulkomandy@xxxxxxxxxxxxx.
+ * Distributed under the terms of the MIT License.
+ */
+
+
+#include <asm_defs.h>
+
+
+/* int setjmp(jmp_buf buffer) */
+FUNCTION(setjmp):
+FUNCTION(_setjmp):
+ ret
+FUNCTION_END(setjmp)
############################################################################
Commit: e21b752f137ddcc73cddfa059362aaf188085458
URL: https://git.haiku-os.org/haiku/commit/?id=e21b752f137d
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 4 19:18:18 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Apr 5 14:29:23 2019 UTC
libroot/posix: Add missing riscv64 knowledge
Change-Id: I49682d79f5e4b2dd981480636e7a55d25f11c9d1
Reviewed-on: https://review.haiku-os.org/c/1377
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/system/libroot/posix/stdlib/strtod.c
b/src/system/libroot/posix/stdlib/strtod.c
index 77dc7efa4f..7eadb13c4e 100644
--- a/src/system/libroot/posix/stdlib/strtod.c
+++ b/src/system/libroot/posix/stdlib/strtod.c
@@ -126,7 +126,8 @@
#if defined(__i386__) || defined(__ia64__) || defined(__alpha__) || \
defined(__sparc64__) || defined(__powerpc__) || defined(__POWERPC__) || \
defined(__m68k__) || defined(__M68K__) || defined(__arm__) || \
- defined(__mipsel__) || defined(__MIPSEL__) || defined(__x86_64__)
+ defined(__mipsel__) || defined(__MIPSEL__) || defined(__x86_64__) || \
+ defined(__riscv64__)
# include <sys/types.h>
# if BYTE_ORDER == BIG_ENDIAN
# define IEEE_BIG_ENDIAN
############################################################################
Commit: 45ebdd42175edf7e162b5556737707ab7dc93fa0
URL: https://git.haiku-os.org/haiku/commit/?id=45ebdd42175e
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 4 19:18:53 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Apr 5 14:29:23 2019 UTC
kernel/riscv64: Fix assembly to disable/enable interrupts
Change-Id: Id4dc7360650e78a9bcadec634be97b279da2d77c
Reviewed-on: https://review.haiku-os.org/c/1378
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/system/kernel/arch/riscv64/arch_asm.S
b/src/system/kernel/arch/riscv64/arch_asm.S
index 1c3a6ec705..4fa5b032d6 100644
--- a/src/system/kernel/arch/riscv64/arch_asm.S
+++ b/src/system/kernel/arch/riscv64/arch_asm.S
@@ -15,8 +15,8 @@
/* void arch_int_enable_interrupts(void) */
FUNCTION(arch_int_enable_interrupts):
- // TODO
- csrs sstatus, ARCH_SR_SIE
+ li t0, ARCH_SR_SIE
+ csrrs zero, sstatus, t0
ret
FUNCTION_END(arch_int_enable_interrupts)
@@ -24,8 +24,8 @@ FUNCTION_END(arch_int_enable_interrupts)
/* int arch_int_disable_interrupts(void)
*/
FUNCTION(arch_int_disable_interrupts):
- csrrc 0, sstatus, ARCH_SR_SIE
- // TODO
+ li t0, ARCH_SR_SIE
+ csrrc zero, sstatus, ARCH_SR_SIE
ret
FUNCTION_END(arch_int_disable_interrupts)
############################################################################
Commit: e0ec8de75331c102eab241fa35318fe9aa3ad0c5
URL: https://git.haiku-os.org/haiku/commit/?id=e0ec8de75331
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 4 19:19:39 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Apr 5 14:29:23 2019 UTC
kernel/riscv64: ATOMIC64 FUNCS are not syscalls
Change-Id: I8696939ec2fab6f3960a9a41f0b5c9fcd6949760
Reviewed-on: https://review.haiku-os.org/c/1379
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/headers/private/system/arch/riscv64/arch_config.h
b/headers/private/system/arch/riscv64/arch_config.h
index 1be83d9386..6e22c47143 100644
--- a/headers/private/system/arch/riscv64/arch_config.h
+++ b/headers/private/system/arch/riscv64/arch_config.h
@@ -12,7 +12,7 @@
#define STACK_GROWS_DOWNWARDS
//#define ATOMIC_FUNCS_ARE_SYSCALLS
-#define ATOMIC64_FUNCS_ARE_SYSCALLS
+//#define ATOMIC64_FUNCS_ARE_SYSCALLS
#endif /* _SYSTEM_ARCH_RISCV64_CONFIG_H */
############################################################################
Revision: hrev53043
Commit: 40fcf16358a810cb8a1527a63dfb1cd34b2d6943
URL: https://git.haiku-os.org/haiku/commit/?id=40fcf16358a8
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 4 19:20:14 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Apr 5 14:29:23 2019 UTC
kernel/riscv64: Add missing kernel_arg ranges to get build going.
Change-Id: Idf549a5e4d01e6dc8949ec1252296337e5ef970c
Reviewed-on: https://review.haiku-os.org/c/1380
Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/headers/private/kernel/arch/riscv64/arch_kernel_args.h
b/headers/private/kernel/arch/riscv64/arch_kernel_args.h
index ddb9c85b08..0286024abf 100644
--- a/headers/private/kernel/arch/riscv64/arch_kernel_args.h
+++ b/headers/private/kernel/arch/riscv64/arch_kernel_args.h
@@ -9,12 +9,21 @@
# error This file is included from <boot/kernel_args.h> only
#endif
+#define _PACKED __attribute__((packed))
+
+#define MAX_VIRTUAL_RANGES_TO_KEEP 32
+
+
// kernel args
typedef struct {
// architecture specific
uint64 phys_pgdir;
uint64 vir_pgdir;
uint64 next_pagetable;
+
+ // The virtual ranges we want to keep in the kernel.
+ uint32 num_virtual_ranges_to_keep;
+ addr_range virtual_ranges_to_keep[MAX_VIRTUAL_RANGES_TO_KEEP];
} arch_kernel_args;
#endif /* KERNEL_ARCH_RISCV64_KERNEL_ARGS_H */