Subversion Repositories HelenOS-historic

Rev

Rev 630 | Rev 663 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 630 Rev 634
Line 25... Line 25...
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
/**
29
/**
30
 * This file contains two trap tables. First, trap_table, is the one
30
 * This file contains two trap tables.
-
 
31
 * First, trap_table, is the one wich contains handlers implemented by
-
 
32
 * kernel. During initialization, these handlers are copied out to
-
 
33
 * the second trap table, trap_table_save, and the first table is
31
 * to wich kernel copies OFW's own trap table and patches it with
34
 * overwritten with copy of OFW's own trap table. The copy is then patched
-
 
35
 * from the trap_table_save.
-
 
36
 *
32
 * kernel-provided handlers from the second trap table, trap_table_kernel.
37
 * This arrangement is beneficial because kernel handlers stay on their
-
 
38
 * link-time addresses which is good for debugging.
33
 */
39
 */
34
 
40
 
35
.text
41
.text
36
 
42
 
37
#include <arch/trap/trap_table.h>
43
#include <arch/trap/trap_table.h>
38
#include <arch/trap/regwin.h>
44
#include <arch/trap/regwin.h>
39
 
45
 
40
#define TABLE_SIZE	TRAP_TABLE_SIZE
46
#define TABLE_SIZE	TRAP_TABLE_SIZE
41
#define ENTRY_SIZE	TRAP_TABLE_ENTRY_SIZE
47
#define ENTRY_SIZE	TRAP_TABLE_ENTRY_SIZE
42
 
48
 
43
 
-
 
44
/*
49
/*
45
 * Trap table for copy of OFW's own trap table.
50
 * Kernel trap table.
46
 */
51
 */
47
.align TABLE_SIZE
52
.align TABLE_SIZE
48
.global trap_table
53
.global trap_table
49
trap_table:
54
trap_table:
50
	.space TABLE_SIZE, 0
-
 
51
 
-
 
52
 
-
 
53
/*
-
 
54
 * Kernel-provided trap handlers.
-
 
55
 */
-
 
56
.global trap_table_kernel
-
 
57
trap_table_kernel:
-
 
58
 
55
 
59
/* TT = 0x24, TL = 0 *, clean_window handler */
56
/* TT = 0x24, TL = 0 *, clean_window handler */
60
.org trap_table_kernel + TT_CLEAN_WINDOW*ENTRY_SIZE
57
.org trap_table + TT_CLEAN_WINDOW*ENTRY_SIZE
61
.global clean_window_handler
58
.global clean_window_handler
62
clean_window_handler:
59
clean_window_handler:
63
	CLEAN_WINDOW_HANDLER
60
	CLEAN_WINDOW_HANDLER
64
 
61
 
65
/* TT = 0x80, TL = 0 *, spill_0_normal handler */
62
/* TT = 0x80, TL = 0 *, spill_0_normal handler */
66
.org trap_table_kernel + TT_SPILL_0_NORMAL*ENTRY_SIZE
63
.org trap_table + TT_SPILL_0_NORMAL*ENTRY_SIZE
67
.global spill_0_normal
64
.global spill_0_normal
68
spill_0_normal:
65
spill_0_normal:
69
	SPILL_NORMAL_HANDLER
66
	SPILL_NORMAL_HANDLER
70
 
67
 
71
/* TT = 0xc0, TL = 0 *, fill_0_normal handler */
68
/* TT = 0xc0, TL = 0 *, fill_0_normal handler */
72
.org trap_table_kernel + TT_FILL_0_NORMAL*ENTRY_SIZE
69
.org trap_table + TT_FILL_0_NORMAL*ENTRY_SIZE
73
fill_0_normal:
70
fill_0_normal:
74
	FILL_NORMAL_HANDLER
71
	FILL_NORMAL_HANDLER
75
 
72
 
76
/*
73
/*
77
 * Software traps for TL=0.
74
 * Software traps for TL=0.
78
 */
75
 */
79
.org trap_table_kernel + 256*ENTRY_SIZE
76
.org trap_table + 256*ENTRY_SIZE
80
tl_0_software_traps:
77
tl_0_software_traps:
81
 
78
 
82
/* Reserved area. */
79
/* Reserved area. */
83
.org trap_table_kernel + 384*ENTRY_SIZE
80
.org trap_table + 384*ENTRY_SIZE
84
.space 128*ENTRY_SIZE, 0
81
.space 128*ENTRY_SIZE, 0
85
 
82
 
86
/*
83
/*
87
 * Hardware interrupts for TL>0.
84
 * Hardware interrupts for TL>0.
88
 */
85
 */
89
.org trap_table_kernel + 512*ENTRY_SIZE
86
.org trap_table + 512*ENTRY_SIZE
90
tl_non_0_hardware_traps:
87
tl_non_0_hardware_traps:
91
 
88
 
92
/*
89
/*
93
 * Register window spill/fill traps for TL>0.
90
 * Register window spill/fill traps for TL>0.
94
 */
91
 */
95
.org trap_table_kernel + 640*ENTRY_SIZE
92
.org trap_table + 640*ENTRY_SIZE
96
tl_non_0_regwin_traps:
93
tl_non_0_regwin_traps:
97
 
94
 
98
/*
95
/*
99
 * Software traps for TL>0.
96
 * Software traps for TL>0.
100
 */
97
 */
101
.org trap_table_kernel + 768*ENTRY_SIZE
98
.org trap_table + 768*ENTRY_SIZE
102
tl_non_0_software_traps:
99
tl_non_0_software_traps:
103
 
100
 
104
/* Reserved area. */
101
/* Reserved area. */
105
.org trap_table_kernel + 896*ENTRY_SIZE
102
.org trap_table + 896*ENTRY_SIZE
106
.space 128*ENTRY_SIZE, 0
103
.space 128*ENTRY_SIZE, 0
-
 
104
 
-
 
105
 
-
 
106
/*
-
 
107
 * Save trap table.
-
 
108
 */
-
 
109
.global trap_table_save
-
 
110
trap_table_save:
-
 
111
	.space TABLE_SIZE, 0