You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.6 KiB
75 lines
2.6 KiB
0 // 8 is the actual number of argument registers
|
|
//++
|
|
//
|
|
// Copyright (c) 1989 Microsoft Corporation
|
|
//
|
|
// Module Name:
|
|
//
|
|
// systable.s
|
|
//
|
|
// Abstract:
|
|
//
|
|
// This module implements the system service dispatch table.
|
|
//
|
|
// Author:
|
|
//
|
|
// David N. Cutler (davec) 29-Apr-1989
|
|
//
|
|
// Environment:
|
|
//
|
|
// Kernel mode only.
|
|
//
|
|
// Revision History:
|
|
//
|
|
//--
|
|
|
|
//
|
|
// To add a system service simply add the name of the service to the below
|
|
// table. If the system service has in memory arguments, then immediately
|
|
// follow the name of the serice with a comma and following that the number
|
|
// of bytes of in memory arguments, e.g. CreateObject,40.
|
|
//
|
|
// N.B. Note that the gp corresponding to KiServiceTable must be placed
|
|
// just before KiServiceTable.
|
|
// Given that code must be at least 16-byte aligned, bits 1-3 are used
|
|
// used to encode number of arguments up to a value of 7. The following
|
|
// forumal is used numargs > 8 ? (((numargs - 8 + 1)/2) + 8) : numargs
|
|
//
|
|
|
|
#define TABLE_BEGIN1( t ) .##sdata
|
|
#define TABLE_BEGIN2( t ) .##align 8
|
|
#define TABLE_BEGIN3( t ) .##global W32pServiceTableGp
|
|
#define TABLE_BEGIN4( t ) W32pServiceTableGp: data8 _gp
|
|
#define TABLE_BEGIN5( t ) .##global W32pServiceTable
|
|
#define TABLE_BEGIN6( t ) W32pServiceTable:
|
|
#define TABLE_BEGIN7( t )
|
|
#define TABLE_BEGIN8( t )
|
|
|
|
#define TABLE_ENTRY( l,bias,numargs ) .##global Nt##l; .##type Nt##l, @function; data8 Nt##l+(((numargs%9)>>((numargs/9)*4))+((8+((numargs-7)/2))*(((numargs/9)+1)>>1)))
|
|
|
|
#define TABLE_END( n ) .##sdata ; .##global W32pServiceLimit ; W32pServiceLimit: data4 n + 1
|
|
|
|
|
|
#define ARGTBL_BEGIN .##sdata ; .##align 4 ; .##global W32pArgumentTable ; W32pArgumentTable:
|
|
|
|
#define ARGTBL_ENTRY( e0,e1,e2,e3,e4,e5,e6,e7 ) \
|
|
data1 e0,e1,e2,e3,e4,e5,e6,e7
|
|
#define ARGTBL_END
|
|
|
|
#define ERRTBL_BEGIN
|
|
|
|
#define ERRTBL_ENTRY( e0,e1,e2,e3,e4,e5,e6,e7 ) \
|
|
data1 e0,e1,e2,e3,e4,e5,e6,e7
|
|
#define ERRTBL_END
|
|
|
|
#define DECLARE_DISPATCH_COUNT( ServiceCount, ArgsCount) .##sdata ; .##align 4 ; .##global gDispatchTableValues ; gDispatchTableValues: data4 ServiceCount, ArgsCount
|
|
|
|
|
|
TABLE_BEGIN1( "System Service Dispatch Table" )
|
|
TABLE_BEGIN2( "System Service Dispatch Table" )
|
|
TABLE_BEGIN3( "System Service Dispatch Table" )
|
|
TABLE_BEGIN4( "System Service Dispatch Table" )
|
|
TABLE_BEGIN5( "System Service Dispatch Table" )
|
|
TABLE_BEGIN6( "System Service Dispatch Table" )
|
|
TABLE_BEGIN7( "System Service Dispatch Table" )
|
|
TABLE_BEGIN8( "System Service Dispatch Table" )
|