1/*
2 * Copyright 2019, Haiku, Inc. All Rights Reserved
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <asm_defs.h>
8#include <arch_cpu_defs.h>
9
10
11.text
12
13
14#warning TODO: Fix overly simplistic IRQ
15
16/* void arch_int_enable_interrupts(void) */
17FUNCTION(arch_int_enable_interrupts):
18	li	t0, ARCH_SR_SIE
19	csrrs	zero, sstatus, t0
20	ret
21FUNCTION_END(arch_int_enable_interrupts)
22
23
24/* int arch_int_disable_interrupts(void)
25 */
26FUNCTION(arch_int_disable_interrupts):
27	li	t0, ARCH_SR_SIE
28	csrrc	zero, sstatus, ARCH_SR_SIE
29	ret
30FUNCTION_END(arch_int_disable_interrupts)
31
32
33/* void arch_int_restore_interrupts(int oldState)
34 */
35FUNCTION(arch_int_restore_interrupts):
36	// TODO
37	ret
38FUNCTION_END(arch_int_restore_interrupts)
39
40
41/* bool arch_int_are_interrupts_enabled(void) */
42FUNCTION(arch_int_are_interrupts_enabled):
43	// TODO
44	ret
45FUNCTION_END(arch_int_are_interrupts_enabled)
46
47
48/* status_t arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr_t *faultHandler) */
49FUNCTION(_arch_cpu_user_memcpy):
50	// TODO
51	ret
52FUNCTION_END(_arch_cpu_user_memcpy)
53
54
55/* status_t arch_cpu_user_memset(void *to, char c, size_t count, addr_t *faultHandler) */
56FUNCTION(_arch_cpu_user_memset):
57	// TODO
58	ret
59FUNCTION_END(_arch_cpu_user_memset)
60
61
62/* ssize_t arch_cpu_user_strlcpy(void *to, const void *from, size_t size, addr_t *faultHandler) */
63FUNCTION(_arch_cpu_user_strlcpy):
64	// TODO
65	ret
66FUNCTION_END(_arch_cpu_user_strlcpy)
67