xref: /haiku/headers/private/kernel/arch/mipsel/arch_cpu.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2  * Copyright 2009 Haiku Inc.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef _KERNEL_ARCH_MIPSEL_CPU_H
6 #define _KERNEL_ARCH_MIPSEL_CPU_H
7 
8 
9 #warning IMPLEMENT arch_cpu.h
10 
11 
12 #include <arch/mipsel/arch_thread_types.h>
13 #include <kernel.h>
14 
15 
16 struct iframe {
17 #warning struct iframe
18 	uint32 r31;
19 	uint32 r30;
20 	uint32 r29;
21 	uint32 r28;
22 	uint32 r27;
23 	uint32 r26;
24 	uint32 r25;
25 	uint32 r24;
26 	uint32 r23;
27 	uint32 r22;
28 	uint32 r21;
29 	uint32 r20;
30 	uint32 r19;
31 	uint32 r18;
32 	uint32 r17;
33 	uint32 r16;
34 	uint32 r15;
35 	uint32 r14;
36 	uint32 r13;
37 	uint32 r12;
38 	uint32 r11;
39 	uint32 r10;
40 	uint32 r9;
41 	uint32 r8;
42 	uint32 r7;
43 	uint32 r6;
44 	uint32 r5;
45 	uint32 r4;
46 	uint32 r3;
47 	uint32 r2;
48 	uint32 r1;
49 	uint32 r0;
50 };
51 
52 typedef struct arch_cpu_info {
53 	int null;
54 } arch_cpu_info;
55 
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 
62 extern long long get_time_base(void);
63 
64 void __mipsel_setup_system_time(vint32 *cvFactor);
65 	// defined in libroot: os/arch/system_time.c
66 
67 int64 __mipsel_get_time_base(void);
68 	// defined in libroot: os/arch/system_time_asm.S
69 
70 extern void mipsel_context_switch(void **_oldStackPointer,
71 	void *newStackPointer);
72 
73 extern bool mipsel_set_fault_handler(addr_t *handlerLocation, addr_t handler)
74 	__attribute__((noinline));
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 
81 /* TODO */
82 enum mipsel_processor_version {
83 	FAKE1		= 0x0001,
84 	FAKE2		= 0x0002,
85 	FAKE3		= 0x0003,
86 };
87 
88 
89 #endif	/* _KERNEL_ARCH_MIPSEL_CPU_H */
90 
91