DevHlp SysTrace

DevHlp_SysTrace function provides a service for device drivers to add information to the System Trace buffer.

C
DevHlp_SysTrace ( USHORT Major, USHORT Minor, USHORT Size, PBYTE Datar )

Assembler
Calling Sequence in Assembler  MOV   AX, Major Code MOV   BX, Length MOV   CX, Minor Code

LDS   SI, Data

MOV   DL, 28H

CALL  [Device_Help] 

C

 * Major (USHORT) : Major trace event code (240 255).
 * Minor (USHORT) : Minor trace event code (0 255).
 * Size(USHORT) : Length of the variable length area to be recorded (0 512).
 * Data (PBYTE) : Pointer to the area to be traced.

Assembler
MOV   AX, Major Code MOV   BX, Length MOV   CX, Minor Code

C

 * Success indicator 0.

Possible errors
 * Data not traced, e.g., major event code is not currently selected for tracing.

Assembler

 * If CF = 0, trace record placed in trace buffer
 * Else data not traced.

Possible errors
 * Tracing suspended
 * Minor code not being traced
 * PID not being traced
 * Trace overrun

Remarks
The trace facility maintains an array of 32 bytes (256 bits), in which each bit represents a major event code. This array is updated each time the user enables or disables tracing of a major event. The device driver must check this array before calling DevHlp_SysTrace to ensure that the major event specified is currently enabled for tracing. This array is located in the Global InfoSegAll registers are preserved.

Interrupts are disabled while the trace data is saved and then re-enabled if they were initially enabled.

DevHlp_SysTrace is synonymous with DevHlp_RAS.

C

 * 1) include "dhcalls.h"

USHORT APIENTRY DevHlp_SysTrace ( USHORT Major, USHORT Minor, USHORT Size, PBYTE Datar ) 

Assembler
 MOV   AX, Major Code MOV   BX, Length MOV   CX, Minor Code

LDS   SI, Data

MOV   DL, 28H

CALL  [Device_Help] 