summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/kernel/kernel/sysclib.h41
-rw-r--r--nids/360/SceSysmem.yml14
2 files changed, 53 insertions, 2 deletions
diff --git a/include/kernel/kernel/sysclib.h b/include/kernel/kernel/sysclib.h
new file mode 100644
index 0000000..c255e56
--- /dev/null
+++ b/include/kernel/kernel/sysclib.h
@@ -0,0 +1,41 @@
+#ifndef _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_
+#define _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_
+
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Left shift with only register operations (no memory access).
+ */
+SceInt64 lshift(SceInt64 value, int shift);
+
+/**
+ * Arithmetic right shift with only register operations (no memory access).
+ */
+SceInt64 rshift(SceInt64 value, int shift);
+
+/**
+ * Arithmetic right shift with only register operations (no memory access).
+ * May be faster than rshift for shift less than 32.
+ */
+SceInt64 rshift_fast(SceInt64 value, int shift);
+
+/**
+ * Like memcmp but checks all n bytes of s1 and s2 without early return.
+ */
+int memcmp_consttime(const void *s1, const void *s2, size_t n);
+
+/**
+ * Like strncpy but puts 0 or 1 zero bytes after copying src to dest,
+ * rather than filling dest with zero bytes up to n.
+ */
+char *strncpy_fast(char *dest, const char *src, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_ */
diff --git a/nids/360/SceSysmem.yml b/nids/360/SceSysmem.yml
index 8361858..e99c661 100644
--- a/nids/360/SceSysmem.yml
+++ b/nids/360/SceSysmem.yml
@@ -282,16 +282,21 @@ modules:
nid: 0x7EE45391
functions:
__aeabi_idiv: 0x2518CD9E
+ __aeabi_idivmod: 0xAC86B4BA
__aeabi_lcmp: 0x709077A1
+ __aeabi_ldivmod: 0x7554AB04
__aeabi_lmul: 0xFEE5E751
__aeabi_uidiv: 0xA9FF1205
__aeabi_uidivmod: 0xA46CB7DE
__aeabi_ulcmp: 0xFE900DE8
+ __aeabi_uldivmod: 0x9D148CDE
__memcpy_chk: 0x8A0B0815
__memmove_chk: 0x35DBB110
__memset_chk: 0x1A30BB28
__snprintf_chk: 0x7DBE7007
__stack_chk_fail: 0xB997493D
+ __strcat_chk: 0xDE4666F0
+ __strcpy_chk: 0x545DA5FD
__strlcat_chk: 0x224BE33F
__strlcpy_chk: 0xCF86EA38
__strncat_chk: 0x33EE298B
@@ -299,12 +304,15 @@ modules:
__vsnprintf_chk: 0xCBF64DF6
__vsnprintf_internal: 0xE38E7605
look_ctype_table: 0xCDF7F155
+ lshift: 0x72D31F9D
memchr: 0x60DAEA30
memcmp: 0xF939E83D
+ memcmp_consttime: 0xB5A4D745
memcpy: 0x40C88316
memmove: 0x6CC9C1A1
memset: 0x0AB9BF5C
- rshift: 0x1D89F6C0
+ rshift: 0xE46C47E6
+ rshift_fast: 0x1D89F6C0
snprintf: 0xAE7A8981
strchr: 0x38463759
strcmp: 0x0B33BC43
@@ -314,16 +322,18 @@ modules:
strncat: 0xA1D1C32C
strncmp: 0x12CEE649
strncpy: 0x6D286146
+ strncpy_fast: 0xFE39AEAC
strnlen: 0xCD4BD884
strrchr: 0x7F0E0835
strstr: 0x1304A69D
strtol: 0xAB77C5AA
strtoll: 0x87AAAFA2
strtoul: 0x4E5042DA
- timingsafe_memcmp: 0xB5A4D745
tolower: 0x0021DAF9
toupper: 0xA685DCB1
vsnprintf: 0x3DDBE2E1
+ variables:
+ __stack_chk_guard: 0x99EEBD1F
SceSysmem:
nid: 0x37FE725A
functions: