135 lines
3.1 KiB
Plaintext
135 lines
3.1 KiB
Plaintext
;++
|
|
;
|
|
; Copyright (c) 2000 Microsoft Corporation
|
|
;
|
|
; Module Name:
|
|
;
|
|
; sysstubs.asm
|
|
;
|
|
; Abstract:
|
|
;
|
|
; This module implements the system service dispatch stub procedures.
|
|
;
|
|
; Author:
|
|
;
|
|
; David N. Cutler (davec) 10-Jul-2000
|
|
;
|
|
; Environment:
|
|
;
|
|
; User or kernel mode.
|
|
;
|
|
;--
|
|
|
|
include ksamd64.inc
|
|
|
|
STUBS_BEGIN1 macro t
|
|
title t
|
|
endm
|
|
|
|
STUBS_BEGIN2 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN3 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN4 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN5 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN6 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN7 macro t
|
|
endm
|
|
|
|
STUBS_BEGIN8 macro t
|
|
endm
|
|
|
|
STUBS_END macro t
|
|
end
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY1 macro ServiceNumber, Name, NumArgs
|
|
extern KiServiceLinkage:proc
|
|
extern KiSystemService:proc
|
|
NESTED_ENTRY Zw&Name, _TEXT$00
|
|
cli ; disable interrupts
|
|
mov rax, rsp ; save stack address
|
|
sub rsp, 16 ; alignment and dummy SS selector
|
|
pushq rax ; save previous stack pointer
|
|
pushfd ; push EFLAGS on stack
|
|
pushq KGDT64_R0_CODE ; push CS selector
|
|
lea rax, KiServiceLinkage ; push service linkage RIP
|
|
pushq rax ; push return address
|
|
mov rax, ServiceNumber ; set service number
|
|
jmp KiSystemService ; finish in service dispatcher
|
|
push_frame ; mark machine frame push
|
|
END_PROLOGUE
|
|
NESTED_END Zw&Name, _TEXT$00
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY2 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY3 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY4 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY5 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY6 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY7 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
SYSSTUBS_ENTRY8 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
|
|
USRSTUBS_ENTRY1 macro ServiceNumber, Name, NumArgs
|
|
altentry Nt&Name
|
|
endm
|
|
|
|
USRSTUBS_ENTRY2 macro ServiceNumber, Name, NumArgs
|
|
LEAF_ENTRY Zw&Name, _TEXT$00
|
|
ALTERNATE_ENTRY Nt&Name
|
|
mov r10, rcx
|
|
mov eax, ServiceNumber
|
|
syscall
|
|
ret
|
|
LEAF_END Zw&Name, _TEXT$00
|
|
endm
|
|
|
|
USRSTUBS_ENTRY3 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
USRSTUBS_ENTRY4 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
USRSTUBS_ENTRY5 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
USRSTUBS_ENTRY6 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
USRSTUBS_ENTRY7 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
USRSTUBS_ENTRY8 macro ServiceNumber, Name, NumArgs
|
|
endm
|
|
|
|
STUBS_BEGIN1 <"System Service Stub Procedures">
|
|
STUBS_BEGIN2 <"System Service Stub Procedures">
|
|
STUBS_BEGIN3 <"System Service Stub Procedures">
|
|
STUBS_BEGIN4 <"System Service Stub Procedures">
|
|
STUBS_BEGIN5 <"System Service Stub Procedures">
|
|
STUBS_BEGIN6 <"System Service Stub Procedures">
|
|
STUBS_BEGIN7 <"System Service Stub Procedures">
|
|
STUBS_BEGIN8 <"System Service Stub Procedures">
|