some code cleanups

This commit is contained in:
Stefan Lankes 2011-07-15 09:22:31 +02:00
parent a61607d2e7
commit 18ce8eff11
2 changed files with 12 additions and 79 deletions

View file

@ -70,16 +70,6 @@ typedef unsigned int wint_t;
* All the interrupt handler routines use this type for their only parameter.
*/
struct state {
/*
* We switched from software- to hardwaree-based multitasking
* Therefore, we do not longer save the registers by hand.
*/
/*unsigned int gs, fs, es, ds; */ /* pushed the segs last */
/*
* Commented this out to write it out in a longer form for HTML-documentation
*/
//unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; /* pushed by 'pusha' */
//unsigned int int_no, err_code; /* our 'push byte #' and ecodes do this */
/// EDI register
unsigned int edi;
/// ESI register
@ -99,9 +89,8 @@ struct state {
/// Interrupt number
unsigned int int_no;
/// Error code
unsigned int err_code; /* our 'push byte #' and ecodes do this */
/*unsigned int eip, cs, eflags, useresp, ss;*/ /* pushed by the processor automatically */
/// pushed by the processor automatically
unsigned int eip, cs, eflags, useresp, ss;
};
/** @brief Read out APIC CPU ID

View file

@ -155,7 +155,6 @@ isr0:
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 0
jmp irq_common_stub
; 1: Debug Exception
@ -163,7 +162,6 @@ isr1:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 1
jmp irq_common_stub
@ -172,7 +170,6 @@ isr2:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 2
jmp irq_common_stub
@ -181,7 +178,6 @@ isr3:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 3
jmp irq_common_stub
@ -190,7 +186,6 @@ isr4:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 4
jmp irq_common_stub
@ -199,7 +194,6 @@ isr5:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 5
jmp irq_common_stub
@ -208,7 +202,6 @@ isr6:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 6
jmp irq_common_stub
@ -217,7 +210,6 @@ isr7:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 7
jmp irq_common_stub
@ -234,7 +226,6 @@ isr9:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 9
jmp irq_common_stub
@ -283,7 +274,6 @@ isr15:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 15
jmp irq_common_stub
@ -292,7 +282,6 @@ isr16:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 16
jmp irq_common_stub
@ -301,7 +290,6 @@ isr17:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 17
jmp irq_common_stub
@ -310,7 +298,6 @@ isr18:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 18
jmp irq_common_stub
@ -319,7 +306,6 @@ isr19:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 19
jmp irq_common_stub
@ -328,7 +314,6 @@ isr20:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 20
jmp irq_common_stub
@ -337,7 +322,6 @@ isr21:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 21
jmp irq_common_stub
@ -346,7 +330,6 @@ isr22:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 22
jmp irq_common_stub
@ -355,7 +338,6 @@ isr23:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 23
jmp irq_common_stub
@ -364,7 +346,6 @@ isr24:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 24
jmp irq_common_stub
@ -373,7 +354,6 @@ isr25:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 25
jmp irq_common_stub
@ -382,7 +362,6 @@ isr26:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 26
jmp irq_common_stub
@ -391,7 +370,6 @@ isr27:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 27
jmp irq_common_stub
@ -400,7 +378,6 @@ isr28:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 28
jmp irq_common_stub
@ -409,7 +386,6 @@ isr29:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 29
jmp irq_common_stub
@ -418,7 +394,6 @@ isr30:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 30
jmp irq_common_stub
@ -427,7 +402,6 @@ isr31:
; isr0 - isr31 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 31
jmp irq_common_stub
@ -435,10 +409,10 @@ extern syscall_handler
; used to realize system calls
isrsyscall:
push ds
push fs
push gs
push es
;push ds
;push fs
;push gs
;push es
push ebp
push edi
push esi
@ -455,10 +429,10 @@ isrsyscall:
pop esi
pop edi
pop ebp
pop es
pop gs
pop fs
pop ds
;pop es
;pop gs
;pop fs
;pop ds
iret
global irq0
@ -528,7 +502,6 @@ irq0:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 32
Lirq0:
@ -555,7 +528,7 @@ hack2:
no_task_switch2:
popa
add esp, 8
add esp, 4
iret
; 33: IRQ1
@ -563,7 +536,6 @@ irq1:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 33
jmp irq_common_stub
@ -572,7 +544,6 @@ irq2:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 34
jmp irq_common_stub
@ -581,7 +552,6 @@ irq3:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 35
jmp irq_common_stub
@ -590,7 +560,6 @@ irq4:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 36
jmp irq_common_stub
@ -599,7 +568,6 @@ irq5:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 37
jmp irq_common_stub
@ -608,7 +576,6 @@ irq6:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 38
jmp irq_common_stub
@ -617,7 +584,6 @@ irq7:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 39
jmp irq_common_stub
@ -626,7 +592,6 @@ irq8:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 40
jmp irq_common_stub
@ -635,7 +600,6 @@ irq9:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 41
jmp irq_common_stub
@ -644,7 +608,6 @@ irq10:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 42
jmp irq_common_stub
@ -653,7 +616,6 @@ irq11:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 43
jmp irq_common_stub
@ -662,7 +624,6 @@ irq12:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 44
jmp irq_common_stub
@ -671,7 +632,6 @@ irq13:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 45
jmp irq_common_stub
@ -680,7 +640,6 @@ irq14:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 46
jmp irq_common_stub
@ -689,7 +648,6 @@ irq15:
; irq0 - irq15 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 47
jmp irq_common_stub
@ -698,7 +656,6 @@ irq16:
; irq16 - irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 48
jmp irq_common_stub
@ -707,7 +664,6 @@ irq17:
; irq16- irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 49
jmp irq_common_stub
@ -716,7 +672,6 @@ irq18:
; irq16 - irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 50
jmp irq_common_stub
@ -725,7 +680,6 @@ irq19:
; irq16 - irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 51
jmp irq_common_stub
@ -734,7 +688,6 @@ irq20:
; irq16- irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 52
jmp irq_common_stub
@ -743,7 +696,6 @@ irq21:
; irq16 - irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 53
jmp irq_common_stub
@ -752,7 +704,6 @@ irq22:
; irq16- irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 54
jmp irq_common_stub
@ -761,7 +712,6 @@ irq23:
; irq16 - irq23 are registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 55
jmp irq_common_stub
@ -769,16 +719,13 @@ apic_timer:
; apic timer is registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 123
; we reuse code of the "traditional" timer interrupt (PIC)
jmp Lirq0
apic_lint0:
; lint0 is registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 124
jmp irq_common_stub
@ -786,7 +733,6 @@ apic_lint1:
; lint1 is registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 125
jmp irq_common_stub
@ -794,7 +740,6 @@ apic_error:
; LVT error interrupt is registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 126
jmp irq_common_stub
@ -802,7 +747,6 @@ apic_svr:
; SVR is registered as "Interrupt Gate"
; Therefore, the interrupt flag (IF) is already cleared.
; cli
push byte 0
push byte 127
jmp irq_common_stub
@ -814,7 +758,7 @@ irq_common_stub:
add esp, 4
popa
add esp, 8
add esp, 4
iret
SECTION .note.GNU-stack noalloc noexec nowrite progbits