⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mps.s

📁 winNT技术操作系统,国外开放的原代码和LIUX一样
💻 S
字号:
/* $Id: mps.S 21261 2006-03-08 23:26:25Z audit $
 *
 * COPYRIGHT:       See COPYING in the top level directory
 * PROJECT:         ReactOS kernel
 * FILE:            ntoskrnl/hal/x86/mps.S
 * PURPOSE:         Intel MultiProcessor specification support
 * PROGRAMMER:      Casper S. Hornstrup (chorns@users.sourceforge.net)
 * UPDATE HISTORY:
 *                  Created 12/04/2001
 */

/* INCLUDES ******************************************************************/

#include <ndk/asm.h>

/* FUNCTIONS *****************************************************************/

#define BEFORE \
  cld; \
  pusha; \
  pushl %ds; \
  pushl %es; \
  pushl %fs; \
  pushl %gs; \
  movl  $(KGDT_R0_DATA), %eax; \
  movl  %eax, %ds; \
  movl  %eax, %es; \
  movl  %eax, %gs; \
  movl  $(KGDT_R0_PCR), %eax; \
  movl  %eax, %fs;
  
#define AFTER \
  popl  %gs; \
  popl  %fs; \
  popl  %es; \
  popl  %ds; \
  popa;

.global _MpsIpiInterrupt
_MpsIpiInterrupt:
  /* Save registers */	
  BEFORE

  /* Call the C handler */
  call  _MpsIpiHandler

	/* Return to the caller */
  AFTER
  iret
  
  
.globl _MpsErrorInterrupt
_MpsErrorInterrupt:
  /* Save registers */	
  BEFORE

  /* Call the C handler */
  call  _MpsErrorHandler

	/* Return to the caller */
  AFTER
  iret


.globl _MpsSpuriousInterrupt
_MpsSpuriousInterrupt:
  /* Save registers */	
  BEFORE

  /* Call the C handler */
  call  _MpsSpuriousHandler

	/* Return to the caller */
  AFTER
  iret

.global _MpsTimerInterrupt
_MpsTimerInterrupt:
	cld
	pusha	
	movl	$0xef,%ebx		
  	pushl 	%ds
  	pushl 	%es
  	pushl 	%fs
  	pushl	%gs
  	movl	$0xceafbeef,%eax
  	pushl 	%eax
  	movl	$(KGDT_R0_DATA),%eax
  	movl	%eax,%ds
  	movl	%eax,%es
  	movl	%eax,%gs
  	movl	$(KGDT_R0_PCR),%eax
  	movl	%eax,%fs
  	pushl 	%esp
  	pushl 	%ebx
  	call	_MpsTimerHandler
    	popl	%eax
  	popl	%eax
  	popl	%eax
  	popl	%gs
  	popl	%fs
  	popl	%es
  	popl	%ds
  	popa
  	iret
  
  
  
/* EOF */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -