2008-09-04 19:11:19 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: ntoskrnl/hal/amd64/generic/mps.S
|
|
|
|
* PURPOSE: Intel MultiProcessor specification support
|
|
|
|
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
#include <asm.inc>
|
|
|
|
|
|
|
|
#include <ksamd64.inc>
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
#define BEFORE \
|
|
|
|
cld; \
|
2010-02-04 04:58:09 +00:00
|
|
|
push rax; \
|
|
|
|
push rbx; \
|
|
|
|
push rcx; \
|
|
|
|
push rdx; \
|
|
|
|
push rsi; \
|
|
|
|
push rdi; \
|
|
|
|
push fs; \
|
|
|
|
push gs; \
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
#define AFTER \
|
2010-02-04 04:58:09 +00:00
|
|
|
pop gs; \
|
|
|
|
pop fs; \
|
|
|
|
pop rdi; \
|
|
|
|
pop rsi; \
|
|
|
|
pop rdx; \
|
|
|
|
pop rcx; \
|
|
|
|
pop rbx; \
|
|
|
|
pop rax; \
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
2010-02-04 04:58:09 +00:00
|
|
|
PUBLIC MpsIpiInterrupt
|
|
|
|
MpsIpiInterrupt:
|
2008-09-04 19:11:19 +00:00
|
|
|
/* Save registers */
|
|
|
|
BEFORE
|
|
|
|
|
|
|
|
/* Call the C handler */
|
2010-02-04 04:58:09 +00:00
|
|
|
call MpsIpiHandler
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
/* Return to the caller */
|
|
|
|
AFTER
|
|
|
|
iret
|
|
|
|
#endif
|
|
|
|
|
2010-02-04 04:58:09 +00:00
|
|
|
PUBLIC MpsErrorInterrupt
|
|
|
|
MpsErrorInterrupt:
|
2008-09-04 19:11:19 +00:00
|
|
|
/* Save registers */
|
|
|
|
BEFORE
|
|
|
|
|
|
|
|
/* Call the C handler */
|
2010-02-04 04:58:09 +00:00
|
|
|
call MpsErrorHandler
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
/* Return to the caller */
|
|
|
|
AFTER
|
|
|
|
iret
|
|
|
|
|
|
|
|
|
2010-02-04 04:58:09 +00:00
|
|
|
PUBLIC MpsSpuriousInterrupt
|
|
|
|
MpsSpuriousInterrupt:
|
2008-09-04 19:11:19 +00:00
|
|
|
/* Save registers */
|
|
|
|
BEFORE
|
|
|
|
|
|
|
|
/* Call the C handler */
|
2010-02-04 04:58:09 +00:00
|
|
|
call MpsSpuriousHandler
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
/* Return to the caller */
|
|
|
|
AFTER
|
|
|
|
iret
|
|
|
|
|
2010-02-04 04:58:09 +00:00
|
|
|
PUBLIC MpsTimerInterrupt
|
|
|
|
MpsTimerInterrupt:
|
2008-09-04 19:11:19 +00:00
|
|
|
/* Save registers */
|
|
|
|
BEFORE
|
|
|
|
|
2010-02-04 04:58:09 +00:00
|
|
|
mov ebx, 0xef
|
|
|
|
mov eax, 0xceafbeef
|
|
|
|
push rax
|
|
|
|
push rsp
|
|
|
|
push rbx
|
|
|
|
call MpsTimerHandler
|
|
|
|
pop rax
|
|
|
|
pop rax
|
|
|
|
pop rax
|
2008-09-04 19:11:19 +00:00
|
|
|
|
|
|
|
/* Return to the caller */
|
|
|
|
AFTER
|
|
|
|
iret
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
END
|
2008-09-04 19:11:19 +00:00
|
|
|
/* EOF */
|