Rev 136 | Rev 141 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 136 | Rev 137 | ||
---|---|---|---|
Line 26... | Line 26... | ||
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 | ## very low and hardware-level functions |
29 | ## very low and hardware-level functions |
30 | 30 | ||
- | 31 | # Mask for interrupts 0 - 31 (bits 0 - 31) where 0 means that int has no error word |
|
- | 32 | # and 1 means interrupt with error word |
|
31 | #define ERROR_WORD_INTERRUPT_LIST 0x00027D00 |
33 | #define ERROR_WORD_INTERRUPT_LIST 0x00027D00 |
32 | 34 | ||
33 | .text |
35 | .text |
34 | 36 | ||
35 | .global cpu_halt |
37 | .global cpu_halt |
Line 111... | Line 113... | ||
111 | addl $8,%esp |
113 | addl $8,%esp |
112 | 114 | ||
113 | pop %es |
115 | pop %es |
114 | pop %ds |
116 | pop %ds |
115 | 117 | ||
- | 118 | ||
- | 119 | # Test if this is interrupt with error word or not |
|
116 | mov $\i,%cl; |
120 | mov $\i,%cl; |
117 | movl $1,%eax; |
121 | movl $1,%eax; |
118 | test $0xe0,%cl; |
122 | test $0xe0,%cl; |
119 | jnz 0f; |
123 | jnz 0f; |
120 | and $0x1f,%cl; |
124 | and $0x1f,%cl; |
121 | shl %cl,%eax; |
125 | shl %cl,%eax; |
122 | and $ERROR_WORD_INTERRUPT_LIST,%eax; |
126 | and $ERROR_WORD_INTERRUPT_LIST,%eax; |
123 | jz 0f; |
127 | jz 0f; |
124 | 128 | ||
- | 129 | ||
- | 130 | # Return with error word |
|
125 | popa; |
131 | popa; |
126 | pop %ebp; |
132 | pop %ebp; |
127 | add $4,%esp; |
133 | add $4,%esp; # Skip error word |
128 | iret; |
134 | iret; |
129 | 135 | ||
130 | 0: |
136 | 0: |
131 | - | ||
- | 137 | # Return with no error word |
|
132 | popa |
138 | popa |
133 | pop %ebp |
139 | pop %ebp |
134 | iret |
140 | iret |
135 | 141 | ||
136 | .if (\n-\i)-1 |
142 | .if (\n-\i)-1 |