:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / hal / halx86 / mps.S
1 /* $Id$
2  *
3  * COPYRIGHT:       See COPYING in the top level directory
4  * PROJECT:         ReactOS kernel
5  * FILE:            ntoskrnl/hal/x86/mps.S
6  * PURPOSE:         Intel MultiProcessor specification support
7  * PROGRAMMER:      Casper S. Hornstrup (chorns@users.sourceforge.net)
8  * UPDATE HISTORY:
9  *                  Created 12/04/2001
10  */
11
12 /* INCLUDES ******************************************************************/
13
14 #include <internal/i386/segment.h>
15
16 /* FUNCTIONS *****************************************************************/
17
18 #define BEFORE \
19   pusha; \
20   pushl %ds; \
21   pushl %es; \
22   pushl %fs; \
23   pushl %gs; \
24   movl  $(KERNEL_DS), %eax; \
25   movl  %eax, %ds; \
26   movl  %eax, %es; \
27   movl  %eax, %gs; \
28   movl  $(PCR_SELECTOR), %eax; \
29   movl  %eax, %fs;
30   
31 #define AFTER \
32   popl  %gs; \
33   popl  %fs; \
34   popl  %es; \
35   popl  %ds; \
36   popa;
37
38 .globl _MpsTimerInterrupt
39 _MpsTimerInterrupt:
40   /* Save registers */  
41   BEFORE
42
43   /* Call the C handler */
44   call  _MpsTimerHandler
45
46         /* Return to the caller */
47   AFTER
48   iret
49
50
51 .globl _MpsErrorInterrupt
52 _MpsErrorInterrupt:
53   /* Save registers */  
54   BEFORE
55
56   /* Call the C handler */
57   call  _MpsErrorHandler
58
59         /* Return to the caller */
60   AFTER
61   iret
62
63
64 .globl _MpsSpuriousInterrupt
65 _MpsSpuriousInterrupt:
66   /* Save registers */  
67   BEFORE
68
69   /* Call the C handler */
70   call  _MpsSpuriousHandler
71
72         /* Return to the caller */
73   AFTER
74   iret
75
76 /* EOF */