use the -newos toolchain even if -elf is present.
[newos.git] / include / arch / sh4 / vcpu.h
blob92dd61129731f1e489fd1e66e44dd4b0eef82ad3
1 /*
2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _VCPU_H
6 #define _VCPU_H
8 #include <boot/stage2.h>
10 // layout of the iframe is defined in boot/sh4/vcpu.S
11 struct iframe {
12 unsigned int page_fault_addr;
13 unsigned int excode;
14 unsigned int spc;
15 unsigned int ssr;
16 unsigned int sgr;
17 unsigned int pr;
18 unsigned int macl;
19 unsigned int mach;
20 unsigned int gbr;
21 unsigned int fpscr;
22 unsigned int fpul;
24 float fr15_1;
25 float fr14_1;
26 float fr13_1;
27 float fr12_1;
28 float fr11_1;
29 float fr10_1;
30 float fr9_1;
31 float fr8_1;
32 float fr7_1;
33 float fr6_1;
34 float fr5_1;
35 float fr4_1;
36 float fr3_1;
37 float fr2_1;
38 float fr1_1;
39 float fr0_1;
41 float fr15_0;
42 float fr14_0;
43 float fr13_0;
44 float fr12_0;
45 float fr11_0;
46 float fr10_0;
47 float fr9_0;
48 float fr8_0;
49 float fr7_0;
50 float fr6_0;
51 float fr5_0;
52 float fr4_0;
53 float fr3_0;
54 float fr2_0;
55 float fr1_0;
56 float fr0_0;
58 unsigned int r7;
59 unsigned int r6;
60 unsigned int r5;
61 unsigned int r4;
62 unsigned int r3;
63 unsigned int r2;
64 unsigned int r1;
65 unsigned int r0;
66 unsigned int r14;
67 unsigned int r13;
68 unsigned int r12;
69 unsigned int r11;
70 unsigned int r10;
71 unsigned int r9;
72 unsigned int r8;
75 // page table structures
76 struct pdent {
77 unsigned int v:1;
78 unsigned int unused0:11;
79 unsigned int ppn:17;
80 unsigned int unused1:3;
83 struct ptent {
84 unsigned int v:1;
85 unsigned int d:1;
86 unsigned int sh:1;
87 unsigned int sz:2;
88 unsigned int c:1;
89 unsigned int tlb_ent:6;
90 unsigned int ppn:17;
91 unsigned int pr:2;
92 unsigned int wt:1;
95 // soft faults
96 #define EXCEPTION_PAGE_FAULT_READ 0xfe
97 #define EXCEPTION_PAGE_FAULT_WRITE 0xff
99 // can only be used in stage2
100 int vcpu_init(kernel_args *ka);
102 #endif