Deleted Added
sdiff udiff text old ( 5903:3d7f94358641 ) new ( 5911:8d6e40f38063 )
full compact
1# Copyright (c) 2008 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 110 unchanged lines hidden (view full) ---

119 ##
120 ## Point of no return.
121 ## We're now going to irrevocably modify visible state.
122 ## Anything bad that's going to happen should have happened by now or will
123 ## happen right now.
124 ##
125 wrip t0, t9, dataSize=8
126
127 #
128 # Set up the target code segment. Do this now so we have the right
129 # permissions when setting up the stack frame.
130 #
131 srli t5, t4, 16, dataSize=8
132 andi t5, t5, 0xFF, dataSize=8
133 wrdl cs, t3, t5, dataSize=8
134 # Tuck away the old CS for use below
135 limm t10, 0, dataSize=8
136 rdsel t10, cs, dataSize=2
137 wrsel cs, t5, dataSize=2
138
139
140 #
141 # Build up the interrupt stack frame
142 #
143
144
145 # Write out the contents of memory
146 %(errorCodeCode)s
147 st t7, hs, [1, t0, t6], %(errorCodeSize)d, dataSize=8, addressSize=8
148 st t10, hs, [1, t0, t6], 8 + %(errorCodeSize)d, dataSize=8, addressSize=8
149 rflags t10, dataSize=8
150 st t10, hs, [1, t0, t6], 16 + %(errorCodeSize)d, dataSize=8, addressSize=8
151 st rsp, hs, [1, t0, t6], 24 + %(errorCodeSize)d, dataSize=8, addressSize=8
152 rdsel t5, ss, dataSize=2
153 st t5, hs, [1, t0, t6], 32 + %(errorCodeSize)d, dataSize=8, addressSize=8
154
155 # Set the stack segment
156 mov rsp, rsp, t6, dataSize=8
157 wrsel ss, t11, dataSize=2
158
159 #
160 # Adjust rflags which is still in t10 from above
161 #
162
163 # Set IF to the lowest bit of the original gate type.
164 # The type field of the original gate starts at bit 40.
165
166 # Set the TF, NT, and RF bits. We'll flip them at the end.
167 limm t6, (1 << 8) | (1 << 14) | (1 << 16)

--- 45 unchanged lines hidden ---