Jump to content

PDDREF:Device Helper (DevHlp) Services: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 3: Line 3:
Many of the functions of an OS/2 physical device driver are related to system operations rather than to hardware operations. An interface to operating system services is available to physical device drivers through the DevHlp Interface.
Many of the functions of an OS/2 physical device driver are related to system operations rather than to hardware operations. An interface to operating system services is available to physical device drivers through the DevHlp Interface.


The Device Helper (DevHlp) services are listed alphabetically with explanations of the purpose, parameters, and calling conventions of each function.  
The Device Helper (DevHlp) services are listed alphabetically with explanations of the purpose, parameters, and calling conventions of each function.


==Using DevHlp Services==
==Using DevHlp Services==
Access to these system services is obtained during device driver initialization. The request packet for the INIT command contains a pointer to the entry point for the DevHlp interface. This pointer is saved.  
Access to these system services is obtained during device driver initialization. The request packet for the INIT command contains a pointer to the entry point for the DevHlp interface. This pointer is saved.
====Calling the DevHlp Interface Routine from Assembler====
 
===Calling the DevHlp Interface Routine from Assembler===
A Device Helper service is started by:
A Device Helper service is started by:
* Setting up the appropriate registers. Notice that the DevHlp services pass parameters in registers, as opposed to on the stack.
* Setting up the appropriate registers. Notice that the DevHlp services pass parameters in registers, as opposed to on the stack.
* Loading a function code into the DL register.
* Loading a function code into the DL register.
* Making a Far Call to the DevHlp interface routine (whose address was supplied at device driver initialization time), as in:
* Making a Far Call to the DevHlp interface routine (whose address was supplied at device driver initialization time), as in:
CALL  [Device_Help]


        CALL  [Device_Help]
===Register Usage===
 
====Register Usage====
All registers except the Flags register are preserved across calls to DevHlp services unless specified as containing return parameters. The segment registers and the extended portion of the 32-bit registers are also preserved.
All registers except the Flags register are preserved across calls to DevHlp services unless specified as containing return parameters. The segment registers and the extended portion of the 32-bit registers are also preserved.


====State of the Interrupt Flag====
===State of the Interrupt Flag===
The physical device driver can assume that the state of the interrupt flag is preserved, and that the DevHlp routine does not enable interrupts unless stated otherwise in the functional description for each routine. The only exceptions apply to functions that allow the physical device driver to relinquish control of the CPU. Therefore, during calls to functions such as Yield and TCYield, it cannot be assumed that interrupts will remain disabled.  
The physical device driver can assume that the state of the interrupt flag is preserved, and that the DevHlp routine does not enable interrupts unless stated otherwise in the functional description for each routine. The only exceptions apply to functions that allow the physical device driver to relinquish control of the CPU. Therefore, during calls to functions such as Yield and TCYield, it cannot be assumed that interrupts will remain disabled.


====Constant Definitions====
===Constant Definitions===
In the syntax examples in the following references, the DevHlp functions are called by placing a defined constant into the DL register, as in:
In the syntax examples in the following references, the DevHlp functions are called by placing a defined constant into the DL register, as in:
 
MOV  DL, DevHlp_ABIOSCall
    MOV  DL, DevHlp_ABIOSCall
These DevHlp_* constants are defined in the DEVHLP.INC header file.
 
These DevHlp_* constants are defined in the DEVHLP.INC header file.  


====Calling the DevHlp Interface Routine from C====
====Calling the DevHlp Interface Routine from C====
Line 33: Line 30:


   extern PFN Device_Help; 1x far pointer to devhlp functions */
   extern PFN Device_Help; 1x far pointer to devhlp functions */
   Device_Help=PRPH�DevHlpEP;
   Device_Help=PRPH►DevHlpEP;


   /*INIT Command Request Packet Structure */
   /*INIT Command Request Packet Structure */
Line 46: Line 43:


====16:16 Virtual Address Conversion====  
====16:16 Virtual Address Conversion====  
Some of the DevHlp services require 32-bit linear (flat) addresses. The DevHlp service VirtToLin must be called to convert a 16:16 virtual address to a 32-bit linear address. Refer to the appropriate DevHlp service for the type of addressing mode required.  
Some of the DevHlp services require 32-bit linear (flat) addresses. The DevHlp service VirtToLin must be called to convert a 16:16 virtual address to a 32-bit linear address. Refer to the appropriate DevHlp service for the type of addressing mode required.


==DevHlp Services and Function Codes==
==DevHlp Services and Function Codes==
All the DevHlp services, listed by function codes, are shown below:
All the DevHlp services, listed by function codes, are shown below:
<PRE>
{|class="wikitable"
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
!DevHlp Service||Code||Description
³DevHlp Service       ³Code ³Description                      ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHlp_SchedClock|SchedClock]]||0||Get system clock routine
³SchedClock          ³  0 ³Get system clock routine         ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_DevDone|DevDone]]||1||Complete Device I/O
³DevDone              ³  1 ³Complete Device I/O               ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_Yield|Yield]]||2||Yield the CPU
³Yield                ³  2 ³Yield the CPU                     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_TCYield|TCYield]]||3||Yield the CPU to time-critical threads
³TCYield              ³  3 ³Yield the CPU to time-critical   ³
|-
³                    ³    ³threads                          ³
|[[DevHelp_ProcBlock|ProcBlock]]||4||Block thread on event
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³ProcBlock            ³  4 ³Block thread on event             ³
|[[DevHelp_ProcRun|ProcRun]]||5||Unblock thread
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³ProcRun              ³  5 ³Unblock thread                   ³
|[[DevHelp_SemRequest|SemRequest]]||6||Claim a semaphore
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³SemRequest          ³  6 ³Claim a semaphore                 ³
|[[DevHelp_SemClear|SemClear]]||7||Release a semaphore
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³SemClear            ³  7 ³Release a semaphore               ³
|[[DevHelp_SemHandle|SemHandle]]||8||Get a semaphore handle
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³SemHandle            ³  8 ³Get a semaphore handle           ³
|[[DevHelp_PushRequest|PushRequest]]||9||Add request to list
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PushRequest          ³  9 ³Add request to list               ³
|[[DevHelp_PullRequest|PullRequest]]||A||Remove request from list
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PullRequest          ³  A ³Remove request from list         ³
|[[DevHelp_PullParticular|PullParticular]]||B||Remove a specific request from list
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PullParticular      ³  B ³Remove a specific request from   ³
|[[DevHelp_SortRequest|SortRequest]]||C||Insert request in sorted order to list
³                    ³    ³list                              ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_AllocReqPacket|AllocReqPacket]]||D||Get a request packet
³SortRequest          ³  C ³Insert request in sorted order to ³
|-
³                    ³    ³list                              ³
|[[DevHelp_FreeReqPacket|FreeReqPacket]]||E||Free request packet
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³AllocReqPacket      ³  D ³Get a request packet             ³
|[[DevHelp_QueueInit|QueueInit]]||F||Initialize character queue
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³FreeReqPacket        ³  E ³Free request packet               ³
|[[DevHelp_QueueFlush|QueueFlush]]||10||Clear character queue
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³QueueInit            ³  F ³Initialize character queue       ³
|[[DevHelp_QueueWrite|QueueWrite]]||11||Put a character in the queue
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³QueueFlush          ³ 10 ³Clear character queue             ³
|[[DevHelp_QueueRead|QueueRead]]||12||Get a character from the queue
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³QueueWrite          ³ 11 ³Put a character in the queue     ³
|[[DevHelp_Lock|Lock]]||13||Lock memory segment
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³QueueRead            ³ 12 ³Get a character from the queue   ³
|[[DevHelp_UnLock|UnLock]]||14||Unlock memory segment
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³Lock                ³ 13 ³Lock memory segment               ³
|[[DevHelp_PhysToVirt|PhysToVirt]]||15||Map a physical-to-virtual address
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³Unlock              ³ 14 ³Unlock memory segment             ³
|[[DevHelp_VirtToPhys|VirtToPhys]]||16||Map a virtual-to-physical address
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PhysToVirt          ³ 15 ³Map a physical-to-virtual address ³
|[[DevHelp_PhysToUVirt|PhysToUVirt]]||17||Map a physical address to an application's address space
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³VirtToPhys          ³ 16 ³Map a virtual-to-physical address ³
|[[DevHelp_AllocPhys|AllocPhys]]||18||Allocate physical memory
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PhysToUVirt          ³ 17 ³Map a physical address to an     ³
|[[DevHelp_FreePhys|FreePhys]]||19||Free physical memory
³                    ³    ³application's address space       ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_SetROMVector|SetROMVector]]*||1A||Set software interrupt vector
³AllocPhys            ³ 18 ³Allocate physical memory         ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_SetIRQ|SetIRQ]]||1B||Set a hardware interrupt handler
³FreePhys            ³ 19 ³Free physical memory             ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_UnSetIRQ|UnSetIRQ]]||1C||Reset a hardware interrupt handler
³SetROMVector*       ³ 1A ³Set software interrupt vector     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_SetTimer|SetTimer]]||1D||Set a timer handler
³SetIRQ              ³ 1B ³Set a hardware interrupt handler ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_ResetTimer|ResetTimer]]||1E||Remove a timer handler
³UnSetIRQ            ³ 1C ³Reset a hardware interrupt handler³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_MonitorCreate|MonitorCreate]]||1F||Create a monitor
³SetTimer            ³ 1D ³Set a timer handler               ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_Register|Register]]||20||Install a monitor
³ResetTimer          ³ 1E ³Remove a timer handler           ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_DeRegister|DeRegister]]||21||Remove a monitor
³MonitorCreate        ³ 1F ³Create a monitor                 ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_MonWrite|MonWrite]]||22||Pass data records to monitor
³Register            ³ 20 ³Install a monitor                 ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_MonFlush|MonFlush]]||23||Remove all data from data stream
³DeRegister          ³ 21 ³Remove a monitor                 ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_GetDOSVar|GetDOSVar]]||24||Return pointer to DOS variable
³MonWrite            ³ 22 ³Pass data records to monitor     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_SendEvent|SendEvent]]||25||Indicate an event
³MonFlush            ³ 23 ³Remove all data from data stream ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_ROMCritSection|ROMCritSection]]*||26||Flag ROM BIOS critical section
³GetDOSVar            ³ 24 ³Return pointer to DOS variable   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_VerifyAccess|VerifyAccess]]||27||Verify memory access
³SendEvent            ³ 25 ³Indicate an event                 ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|Reserved||28||
³ROMCritSection*     ³ 26 ³Flag ROM BIOS critical section   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|Reserved||29||
³VerifyAccess        ³ 27 ³Verify memory access             ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_AttachDD|AttachDD]]||2A||Obtain a device driver's IDC entry point
³Reserved            ³ 28 ³                                  ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_InternalError|InternalError]]||2B||Signal an internal error
³Reserved            ³ 29 ³                                  ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|Reserved||2C||
³AttachDD            ³ 2A ³Obtain a device driver's IDC entry³
|-
³                    ³    ³point                            ³
|[[DevHelp_AllocGDTSelector|AllocGDTSelector]]||2D||Allocate GDT descriptors
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³InternalError        ³ 2B ³Signal an internal error         ³
|[[DevHelp_PhysToGDTSelector|PhysToGDTSelector]]||2E||Map a physical to virtual address in GDT
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³Reserved            ³ 2C ³                                  ³
|[[DevHelp_RealToProt|RealToProt]]*||2F||Switch from real mode to protect mode
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³AllocGDTSelector    ³ 2D ³Allocate GDT descriptors         ³
|[[DevHelp_ProtToReal|ProtToReal]]*||30||Switch from protect mode to real mode
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PhysToGDTSelector    ³ 2E ³Map a physical to virtual address ³
|[[DevHelp_EOI|EOI]]||31||Issue an End-Of-Interrupt
³                    ³    ³in GDT                           ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_UnPhysToVirt|UnPhysToVirt]]||32||Mark PhysToVirt complete
³RealToProt*         ³ 2F ³Switch from real mode to protect ³
|-
³                    ³    ³mode                              ³
|[[DevHelp_TickCount|TickCount]]||33||Modify timer
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³ProtToReal*         ³ 30 ³Switch from protect mode to real ³
|[[DevHelp_GetLIDEntry|GetLIDEntry]]||34||Get Logical ID
³                    ³    ³mode                              ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_FreeLIDEntry|FreeLIDEntry]]||35||Release Logical ID
³EOI                  ³ 31 ³Issue an End-Of-Interrupt         ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_ABIOSCall|ABIOSCall]]||36||Invoke ABIOS function
³UnPhysToVirt        ³ 32 ³Mark PhysToVirt complete         ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_ABIOSCommonEntry|ABIOSCommonEntry]]||37||Invoke ABIOS common entry point
³TickCount            ³ 33 ³Modify timer                     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_GetDeviceBlock|GetDeviceBlock]]||38||Get ABIOS device block
³GetLIDEntry          ³ 34 ³Get Logical ID                   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_RegisterStackUsage|RegisterStackUsage]]||3A||Indicate stack usage
³FreeLIDEntry        ³ 35 ³Release Logical ID               ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_VideoPause|VideoPause]]||3C||Suspend/resume video active threads
³ABIOSCall            ³ 36 ³Invoke ABIOS function             ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_Save_Message|Save_Message]]||3D||Display message (for base device drivers)
³ABIOSCommonEntry    ³ 37 ³Invoke ABIOS common entry point   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_RegisterDeviceClass|RegisterDeviceClass]]||43||Register a physical device driver' direct call command handler entry point with kernel
³GetDeviceBlock      ³ 38 ³Get ABIOS device block           ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_RegisterPDD|RegisterPDD]]||50||Register a 16:16 physical device driver for PDD/VDD communication
³RegisterStackUsage  ³ 3A ³Indicate stack usage             ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_RegisterBeep|RegisterBeep]]||51||Register a physical device driver's Beep service entry point
³VideoPause          ³ 3C ³Suspend/resume video active       ³
|-
³                    ³    ³threads                          ³
|[[DevHelp_Beep|Beep]]||52||Generate a beep
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³Save_Message        ³ 3D ³Display message (for base device ³
|[[DevHelp_FreeGDTSelector|FreeGDTSelector]]||53||Free selector allocated with AllocateGDTSelector
³                    ³    ³drivers)                         ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_PhysToGDTSel|PhysToGDTSel]]||54||Map a physical address to a GDT selector
³RegisterDeviceClass  ³ 43 ³Register a physical device driver'³
|-
³                    ³    ³direct call command handler entry ³
|[[DevHelp_VMLock|VMLock]]||55||Lock a linear address range of memory within a segment
³                    ³    ³point with kernel                 ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_VMUnLock|VMUnLock]]||56||Unlock a linear address range of memory within a segment
³RegisterPDD          ³ 50 ³Register a 16:16 physical device ³
|-
³                    ³    ³driver for PDD/VDD communication ³
|[[DevHelp_VMAlloc|VMAlloc]]||57||Allocate a block of physical memory
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³RegisterBeep        ³ 51 ³Register a physical device       ³
|[[DevHelp_VMFree|VMFree]]||58||Free memory or a mapping
³                    ³    ³driver's Beep service entry point ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_VMProcessToGlobal|VMProcessToGlobal]]||59||Map a process address into global address space
³Beep                ³ 52 ³Generate a beep                   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_VMGlobalToProcess|VMGlobalToProcess]]||5A||Map a global address into process address space
³FreeGDTSelector      ³ 53 ³Free selector allocated with     ³
|-
³                    ³    ³AllocateGDTSelector              ³
|[[DevHelp_VirtToLin|VirtToLin]]||5B||Convert a selector:offset to a linear address
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³PhysToGDTSel        ³ 54 ³Map a physical address to a GDT   ³
|[[DevHelp_LinToGDTSelector|LinToGDTSelector]]||5C||Convert a linear address to a virtual address
³                    ³    ³selector                          ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_GetDescInfo|GetDescInfo]]||5D||Get information on the contents of a descriptor
³VMLock              ³ 55 ³Lock a linear address range of   ³
|-
³                    ³    ³memory within a segment           ³
|[[DevHelp_LinToPageList|LinToPageList]]||5E||Get the physical pages mapped by a linear range
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³VMUnLock            ³ 56 ³Unlock a linear address range of ³
|[[DevHelp_PageListToLin|PageListToLin]]||5F||Map given physical address to a linear address
³                    ³    ³memory within a segment           ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_PageListToGDTSelector|PageListToGDTSelector]]||60||Map given physical addresses to a selector
³VMAlloc              ³ 57 ³Allocate a block of physical     ³
|-
³                    ³    ³memory                            ³
|[[DevHelp_RegisterTmrDD|RegisterTmrDD]]||61||Get the kernel address of Timer value and rollover count
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³VMFree              ³ 58 ³Free memory or a mapping         ³
|[[DevHelp_AllocateCtxHook|AllocateCtxHook]]||63||Allocate a context hook
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³VMProcessToGlobal    ³ 59 ³Map a process address into global ³
|[[DevHelp_FreeCtxHook|FreeCtxHook]]||64||Free a context hook
³                    ³    ³address space                     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_ArmCtxHook|ArmCtxHook]]||65||Arm a context hook
³VMGlobalToProcess    ³ 5A ³Map a global address into process ³
|-
³                    ³    ³address space                     ³
|[[DevHelp_VMSetMem|VMSetMem]]||66||Commit or decommit physical memory
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³VirtToLin            ³ 5B ³Convert a selector:offset to a   ³
|[[DevHelp_OpenEventSem|OpenEventSem]]||67||Open a 32-bit shared event semaphore
³                    ³    ³linear address                   ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_CloseEventSem|CloseEventSem]]||68||Close a 32-bit shared event semaphore
³LinToGDTSelector    ³ 5C ³Convert a linear address to a     ³
|-
³                    ³    ³virtual address                   ³
|[[DevHelp_PostEventSem|PostEventSem]]||69||Post a 32-bit shared event semaphore
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
³GetDescInfo          ³ 5D ³Get information on the contents of³
|[[DevHelp_ResetEventSem|ResetEventSem]]||6A||Reset a 32-bit shared event semaphore
³                    ³    ³a descriptor                     ³
|-
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|[[DevHelp_DynamicAPI|DynamicAPI]]||6C||Dynamically add a Ring 0 system API
³LinToPageList        ³ 5E ³Get the physical pages mapped by
|-
³                    ³    ³linear range                     ³
|[[DevHelp_RegisterKrnlExit|RegisterKrnlExit]]||6F||
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|}
³PageListToLin        ³ 5F ³Map given physical address to a   ³
*No longer used in OS/2 2.x.
³                    ³    ³linear address                   ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³PageListToGDTSelector³ 60 ³Map given physical addresses to a ³
³                    ³    ³selector                          ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³RegisterTmrDD        ³ 61 ³Get the kernel address of Timer   ³
³                    ³    ³value and rollover count         ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³AllocateCtxHook      ³ 63 ³Allocate a context hook           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FreeCtxHook          ³ 64 ³Free a context hook               ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ArmCtxHook          ³ 65 ³Arm a context hook               ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³VMSetMem            ³ 66 ³Commit or decommit physical memory³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³OpenEventSem        ³ 67 ³Open a 32-bit shared event       ³
³                    ³    ³semaphore                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³CloseEventSem        ³ 68 ³Close a 32-bit shared event       ³
³                    ³    ³semaphore                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³PostEventSem        ³ 69 ³Post a 32-bit shared event       ³
³                    ³    ³semaphore                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ResetEventSem        ³ 6A ³Reset a 32-bit shared event       ³
³                    ³    ³semaphore                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³DynamicAPI          ³ 6C ³Dynamically add a Ring 0 system   ³
³                    ³    ³API                              ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³RegisterKrnlExit    ³ 6F  ³                                  ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


*No longer used in OS/2 2.x.
</PRE>
==DevHlp Services and Device Contexts==
==DevHlp Services and Device Contexts==
As discussed in the section on physical device driver architecture, device driver code can run in one of the following contexts:
As discussed in the section on physical device driver architecture, device driver code can run in one of the following contexts:
Line 279: Line 241:
!DevHlp Service||Code||Kernel||Interrupt||INIT
!DevHlp Service||Code||Kernel||Interrupt||INIT
|-
|-
|ABIOSCall||36||X||X||X
|[[DevHelp_ABIOSCall|ABIOSCall]]||36||X||X||X
|-
|-
|ABIOSCommonEntry||37||X||X||X
|[[DevHelp_ABIOSCommonEntry|ABIOSCommonEntry]]||37||X||X||X
|-
|-
|AllocateCtxHook||63||X|| ||X
|[[DevHelp_AllocateCtxHook|AllocateCtxHook]]||63||X|| ||X
|-
|-
|AllocGDTSelector||2D|| || ||X
|[[DevHelp_AllocGDTSelector|AllocGDTSelector]]||2D|| || ||X
|-
|-
|AllocPhys||18||X|| ||X
|[[DevHelp_AllocPhys|AllocPhys]]||18||X|| ||X
|-
|-
|AllocReqPacket||D||X|| ||
|[[DevHelp_AllocReqPacket|AllocReqPacket]]||D||X|| ||
|-
|-
|ArmCtxHook||65||X||X|| X
|[[DevHelp_ArmCtxHook|ArmCtxHook]]||65||X||X|| X
|-
|-
|AttachDD|| 2A||X|| || X
|[[DevHelp_AttachDD|AttachDD]]|| 2A||X|| || X
|-
|-
|Beep|| 52||X||X|| X
|[[DevHelp_Beep|Beep]]|| 52||X||X|| X
|-
|-
|CloseEventSem|| 68||X|| ||
|[[DevHelp_CloseEventSem|CloseEventSem]]|| 68||X|| ||
|-
|-
|DeRegister|| 21||X|| ||
|[[DevHelp_DeRegister|DeRegister]]|| 21||X|| ||
|-
|-
|DevDone|| 1||X||X||
|[[DevHelp_DevDone|DevDone]]|| 1||X||X||
|-
|-
|DynamicAPI|| 6C||X|| || X
|[[DevHelp_DynamicAPI|DynamicAPI]]|| 6C||X|| || X
|-
|-
|EOI|| 31|| ||X|| X
|[[DevHelp_EOI|EOI]]|| 31|| ||X|| X
|-
|-
|FreeCtxHook|| 64||X|| || X
|[[DevHelp_FreeCtxHook|FreeCtxHook]]|| 64||X|| || X
|-
|-
|FreeGDTSelector|| 53||X|| || X
|[[DevHelp_FreeGDTSelector|FreeGDTSelector]]|| 53||X|| || X
|-
|-
|FreeLIDEntry|| 35||X|| || X
|[[DevHelp_FreeLIDEntry|FreeLIDEntry]]|| 35||X|| || X
|-
|-
|FreePhys||19||X|| || X
|[[DevHelp_FreePhys|FreePhys]]||19||X|| || X
|-
|-
|FreeReqPacket|| E||X|| ||
|[[DevHelp_FreeReqPacket|FreeReqPacket]]||E||X|| ||
|-
|-
|GetDescInfo|| 5D||X||Note 2||X
|[[DevHelp_GetDescInfo|GetDescInfo]]|| 5D||X||Note 2||X
|-
|-
|GetDeviceBlock|| 38|| || ||X
|[[DevHelp_GetDeviceBlock|GetDeviceBlock]]|| 38|| || ||X
|-
|-
|GetDOSVar||24||X|| || X
|[[DevHelp_GetDOSVar|GetDOSVar]]||24||X|| || X
|-
|-
|GetLIDEntry||34||X|| || X
|[[DevHelp_GetLIDEntry|GetLIDEntry]]||34||X|| || X
|-
|-
|InternalError||2B||X|| X|| X
|[[DevHelp_InternalError|InternalError]]||2B||X|| X|| X
|-
|-
|LinToGDTSelector|| 5C||X|| X|| X
|[[DevHelp_LinToGDTSelector|LinToGDTSelector]]|| 5C||X|| X|| X
|-
|-
|LinToPageList|| 5E||X|| X|| X  
|[[DevHelp_LinToPageList|LinToPageList]]|| 5E||X|| X|| X
|-
|-
|Lock|| 13||X|| || X
|[[DevHelp_Lock|Lock]]|| 13||X|| || X
|-
|-
|MonFlush|| 23||X|| ||
|[[DevHelp_MonFlush|MonFlush]]|| 23||X|| ||
|-
|-
|MonitorCreate|| 1F||X|| ||X
|[[DevHelp_MonitorCreate|MonitorCreate]]|| 1F||X|| ||X
|-
|-
|MonWrite|| 22||X|| X||
|[[DevHelp_MonWrite|MonWrite]]|| 22||X|| X||
|-
|-
|OpenEventSem|| 67||X|| ||
|[[DevHelp_OpenEventSem|OpenEventSem]]|| 67||X|| ||
|-
|-
|PageListToGDTSelector|| 60||X||X|| X
|[[DevHelp_PageListToGDTSelector|PageListToGDTSelector]]|| 60||X||X|| X
|-
|-
|PageListToLin|| 5F||X|| X|| X  
|[[DevHelp_PageListToLin|PageListToLin]]|| 5F||X|| X|| X
|-
|-
|PhysToGDTSel|| 54||X|| X|| X
|[[DevHelp_PhysToGDTSel|PhysToGDTSel]]|| 54||X|| X|| X
|-
|-
|PhysToGDTSelector|| 2E||X|| X|| X
|[[DevHelp_PhysToGDTSelector|PhysToGDTSelector]]|| 2E||X|| X|| X
|-
|-
|PhysToUVirt|| 17||X|| || X
|[[DevHelp_PhysToUVirt|PhysToUVirt]]|| 17||X|| || X
|-
|-
|PhysToVirt|| 15||X|| X|| X
|[[DevHelp_PhysToVirt|PhysToVirt]]|| 15||X|| X|| X
|-
|-
|PostEventSem|| 69||X|| ||
|[[DevHelp_PostEventSem|PostEventSem]]|| 69||X|| ||
|-
|-
|ProcBlock||4||X|| ||
|[[DevHelp_ProcBlock|ProcBlock]]||4||X|| ||
|-
|-
|ProcRun||5||X|| X||
|[[DevHelp_ProcRun|ProcRun]]||5||X|| X||
|-
|-
|ProtToReal|| 30||X|| X||
|[[DevHelp_ProtToReal|ProtToReal]]|| 30||X|| X||
|-
|-
|PullParticular||B||X||X||
|[[DevHelp_PullParticular|PullParticular]]||B||X||X||
|-
|-
|PullRequest||A||X|| X||
|[[DevHelp_PullRequest|PullRequest]]||A||X|| X||
|-
|-
|PushRequest|| 9||X|| ||
|[[DevHelp_PushRequest|PushRequest]]|| 9||X|| ||
|-
|-
|QueueFlush||10||X|| X||
|[[DevHelp_QueueFlush|QueueFlush]]||10||X|| X||
|-
|-
|QueueInit|| F||X|| X|| X
|[[DevHelp_QueueInit|QueueInit]]|| F||X|| X|| X
|-
|-
|QueueRead||12||X|| X||
|[[DevHelp_QueueRead|QueueRead]]||12||X|| X||
|-
|-
|QueueWrite||11||X|| X||
|[[DevHelp_QueueWrite|QueueWrite]]||11||X|| X||
|-
|-
|RealToProt||2F||X|| X||
|[[DevHelp_RealToProt|RealToProt]]||2F||X|| X||
|-
|-
|Register||20||X|| ||
|[[DevHelp_Register|Register]]||20||X|| ||
|-
|-
|RegisterBeep||51||X|| ||X
|[[DevHelp_RegisterBeep|RegisterBeep]]||51||X|| ||X
|-
|-
|RegisterDeviceClass||43|| || ||X
|[[DevHelp_RegisterDeviceClass|RegisterDeviceClass]]||43|| || ||X
|-
|-
|RegisterKrnlExit|| 6F||X|| ||X
|[[DevHelp_RegisterKrnlExit|RegisterKrnlExit]]|| 6F||X|| ||X
|-
|-
|RegisterPDD||50||X|| ||X
|[[DevHelp_RegisterPDD|RegisterPDD]]||50||X|| ||X
|-
|-
|RegisterStackUsage||3A|| || ||X
|[[DevHelp_RegisterStackUsage|RegisterStackUsage]]||3A|| || ||X
|-
|-
|RegisterTmrDD||61|| || ||X
|[[DevHelp_RegisterTmrDD|RegisterTmrDD]]||61|| || ||X
|-
|-
|ResetEventSem||6A||X|| ||
|[[DevHelp_ResetEventSem|ResetEventSem]]||6A||X|| ||
|-
|-
|ResetTimer||1E||X||X||X
|[[DevHelp_ResetTimer|ResetTimer]]||1E||X||X||X
|-
|-
|ROMCritSection||26||Note 1|| ||
|[[DevHelp_ROMCritSection|ROMCritSection]]||26||Note 1|| ||
|-
|-
|Save_Message||3D|| || ||X
|[[DevHelp_Save_Message|Save_Message]]||3D|| || ||X
|-
|-
|SchedClock||0||X|| ||X
|[[DevHlp_SchedClock|SchedClock]]||0||X|| ||X
|-
|-
|SemClear||7||X||X||
|[[DevHelp_SemClear|SemClear]]||7||X||X||
|-
|-
|SemHandle||8||X||X||
|[[DevHelp_SemHandle|SemHandle]]||8||X||X||
|-
|-
|SemRequest||6||X|| ||
|[[DevHelp_SemRequest|SemRequest]]||6||X|| ||
|-
|-
|SendEvent||25||X||X||
|[[DevHelp_SendEvent|SendEvent]]||25||X||X||
|-
|-
|SetIRQ||1B||X|| ||X
|[[DevHelp_SetIRQ|SetIRQ]]||1B||X|| ||X
|-
|-
|SetROMVector||1A||X|| ||X
|[[DevHelp_SetROMVector|SetROMVector]]||1A||X|| ||X
|-
|-
|SetTimer||1D||X|| ||X
|[[DevHelp_SetTimer|SetTimer]]||1D||X|| ||X
|-
|-
|SortRequest||C||X|| ||
|[[DevHelp_SortRequest|SortRequest]]||C||X|| ||
|-
|-
|TCYield||3||X|| ||
|[[DevHelp_TCYield|TCYield]]||3||X|| ||
|-
|-
|TickCount||33||X||X||X
|[[DevHelp_TickCount|TickCount]]||33||X||X||X
|-
|-
|UnLock||14||X|| ||X
|[[DevHelp_UnLock|UnLock]]||14||X|| ||X
|-
|-
|UnPhysToVirt||32||X||X||X
|[[DevHelp_UnPhysToVirt|UnPhysToVirt]]||32||X||X||X
|-
|-
|UnSetIRQ||1C||X||X||X
|[[DevHelp_UnSetIRQ|UnSetIRQ]]||1C||X||X||X
|-
|-
|VerifyAccess||27||X|| ||
|[[DevHelp_VerifyAccess|VerifyAccess]]||27||X|| ||
|-
|-
|VideoPause||3C||X||X||X
|[[DevHelp_VideoPause|VideoPause]]||3C||X||X||X
|-
|-
|VirtToLin||5B||X||X||X
|[[DevHelp_VirtToLin|VirtToLin]]||5B||X||X||X
|-
|-
|VirtToPhys||16||X|| ||X
|[[DevHelp_VirtToPhys|VirtToPhys]]||16||X|| ||X
|-
|-
|VMAlloc||57||X|| ||X
|[[DevHelp_VMAlloc|VMAlloc]]||57||X|| ||X
|-
|-
|VMFree||58||X|| ||X
|[[DevHelp_VMFree|VMFree]]||58||X|| ||X
|-
|-
|VMGlobalToProcess||5A||X|| ||
|[[DevHelp_VMGlobalToProcess|VMGlobalToProcess]]||5A||X|| ||
|-
|-
|VMLock||55||X|| ||X
|[[DevHelp_VMLock|VMLock]]||55||X|| ||X
|-
|-
|VMProcessToGlobal||59||X|| ||
|[[DevHelp_VMProcessToGlobal|VMProcessToGlobal]]||59||X|| ||
|-
|-
|VMSetMem||66||X|| ||X
|[[DevHelp_VMSetMem|VMSetMem]]||66||X|| ||X
|-
|-
|VMUnLock||56||X|| ||X
|[[DevHelp_VMUnLock|VMUnLock]]||56||X|| ||X
|-
|-
|Yield||2||X|| ||
|[[DevHelp_Yield|Yield]]||2||X|| ||
|}
|}
Note:
Note:
Line 540: Line 502:
* [[DevHelp_SemRequest]]
* [[DevHelp_SemRequest]]
====System Clock Management====
====System Clock Management====
* [[DevHelp_SchedClock]]
* [[DevHlp_SchedClock]]
====System Services====
====System Services====
* [[DevHelp_Beep]]
* [[DevHelp_Beep]]
Line 558: Line 520:
* [[DevHelp_SetTimer]]
* [[DevHelp_SetTimer]]
* [[DevHelp_TickCount]]
* [[DevHelp_TickCount]]
[[Category:PDDREF]]

Latest revision as of 19:04, 23 May 2025

Physical Device Driver Reference
  1. Introduction
  2. Physical Device Driver Overview
  3. Physical Device Driver Architecture and Structure
  4. OS/2 Physical Device Driver Operations
  5. OS/2 Physical Device Driver Design Issues
  6. Character Device Monitors
  7. Installation of External Loadable Device Drivers
  8. Physical Device Driver Strategy Commands
  9. Device Helper (DevHlp) Services
  10. Resource Management
  11. Linking Resource Manager Services
  12. Generic IOCtl Commands
Appendixes
OS/2 Version Compatibility Considerations
Running OS/2 Version 1.3 16-Bit PDDs on OS/2
Using Advanced Bios
Notices
Glossary

Many of the functions of an OS/2 physical device driver are related to system operations rather than to hardware operations. An interface to operating system services is available to physical device drivers through the DevHlp Interface.

The Device Helper (DevHlp) services are listed alphabetically with explanations of the purpose, parameters, and calling conventions of each function.

Using DevHlp Services

Access to these system services is obtained during device driver initialization. The request packet for the INIT command contains a pointer to the entry point for the DevHlp interface. This pointer is saved.

Calling the DevHlp Interface Routine from Assembler

A Device Helper service is started by:

  • Setting up the appropriate registers. Notice that the DevHlp services pass parameters in registers, as opposed to on the stack.
  • Loading a function code into the DL register.
  • Making a Far Call to the DevHlp interface routine (whose address was supplied at device driver initialization time), as in:
CALL  [Device_Help]

Register Usage

All registers except the Flags register are preserved across calls to DevHlp services unless specified as containing return parameters. The segment registers and the extended portion of the 32-bit registers are also preserved.

State of the Interrupt Flag

The physical device driver can assume that the state of the interrupt flag is preserved, and that the DevHlp routine does not enable interrupts unless stated otherwise in the functional description for each routine. The only exceptions apply to functions that allow the physical device driver to relinquish control of the CPU. Therefore, during calls to functions such as Yield and TCYield, it cannot be assumed that interrupts will remain disabled.

Constant Definitions

In the syntax examples in the following references, the DevHlp functions are called by placing a defined constant into the DL register, as in:

MOV  DL, DevHlp_ABIOSCall

These DevHlp_* constants are defined in the DEVHLP.INC header file.

Calling the DevHlp Interface Routine from C

The address of the device helper routine is supplied at device driver initialization time in the request packet. The INIT command acts as a pointer to the entry point of the DevHlp services. This pointer must be saved as in the following example:

 extern PFN Device_Help; 1x far pointer to devhlp functions */
 Device_Help=PRPH►DevHlpEP;
 /*INIT Command Request Packet Structure */
   typedef struct_RPINIT {
   RPH rph;
   UCHAR Unit;
   PFN DevHlpEP;
   PS InitArgs;
   UCHAR DriveNum;
   }RPINITIN, FAR *PRPINITIN;
   PRPINITIN PRPH;

16:16 Virtual Address Conversion

Some of the DevHlp services require 32-bit linear (flat) addresses. The DevHlp service VirtToLin must be called to convert a 16:16 virtual address to a 32-bit linear address. Refer to the appropriate DevHlp service for the type of addressing mode required.

DevHlp Services and Function Codes

All the DevHlp services, listed by function codes, are shown below:

DevHlp Service Code Description
SchedClock 0 Get system clock routine
DevDone 1 Complete Device I/O
Yield 2 Yield the CPU
TCYield 3 Yield the CPU to time-critical threads
ProcBlock 4 Block thread on event
ProcRun 5 Unblock thread
SemRequest 6 Claim a semaphore
SemClear 7 Release a semaphore
SemHandle 8 Get a semaphore handle
PushRequest 9 Add request to list
PullRequest A Remove request from list
PullParticular B Remove a specific request from list
SortRequest C Insert request in sorted order to list
AllocReqPacket D Get a request packet
FreeReqPacket E Free request packet
QueueInit F Initialize character queue
QueueFlush 10 Clear character queue
QueueWrite 11 Put a character in the queue
QueueRead 12 Get a character from the queue
Lock 13 Lock memory segment
UnLock 14 Unlock memory segment
PhysToVirt 15 Map a physical-to-virtual address
VirtToPhys 16 Map a virtual-to-physical address
PhysToUVirt 17 Map a physical address to an application's address space
AllocPhys 18 Allocate physical memory
FreePhys 19 Free physical memory
SetROMVector* 1A Set software interrupt vector
SetIRQ 1B Set a hardware interrupt handler
UnSetIRQ 1C Reset a hardware interrupt handler
SetTimer 1D Set a timer handler
ResetTimer 1E Remove a timer handler
MonitorCreate 1F Create a monitor
Register 20 Install a monitor
DeRegister 21 Remove a monitor
MonWrite 22 Pass data records to monitor
MonFlush 23 Remove all data from data stream
GetDOSVar 24 Return pointer to DOS variable
SendEvent 25 Indicate an event
ROMCritSection* 26 Flag ROM BIOS critical section
VerifyAccess 27 Verify memory access
Reserved 28
Reserved 29
AttachDD 2A Obtain a device driver's IDC entry point
InternalError 2B Signal an internal error
Reserved 2C
AllocGDTSelector 2D Allocate GDT descriptors
PhysToGDTSelector 2E Map a physical to virtual address in GDT
RealToProt* 2F Switch from real mode to protect mode
ProtToReal* 30 Switch from protect mode to real mode
EOI 31 Issue an End-Of-Interrupt
UnPhysToVirt 32 Mark PhysToVirt complete
TickCount 33 Modify timer
GetLIDEntry 34 Get Logical ID
FreeLIDEntry 35 Release Logical ID
ABIOSCall 36 Invoke ABIOS function
ABIOSCommonEntry 37 Invoke ABIOS common entry point
GetDeviceBlock 38 Get ABIOS device block
RegisterStackUsage 3A Indicate stack usage
VideoPause 3C Suspend/resume video active threads
Save_Message 3D Display message (for base device drivers)
RegisterDeviceClass 43 Register a physical device driver' direct call command handler entry point with kernel
RegisterPDD 50 Register a 16:16 physical device driver for PDD/VDD communication
RegisterBeep 51 Register a physical device driver's Beep service entry point
Beep 52 Generate a beep
FreeGDTSelector 53 Free selector allocated with AllocateGDTSelector
PhysToGDTSel 54 Map a physical address to a GDT selector
VMLock 55 Lock a linear address range of memory within a segment
VMUnLock 56 Unlock a linear address range of memory within a segment
VMAlloc 57 Allocate a block of physical memory
VMFree 58 Free memory or a mapping
VMProcessToGlobal 59 Map a process address into global address space
VMGlobalToProcess 5A Map a global address into process address space
VirtToLin 5B Convert a selector:offset to a linear address
LinToGDTSelector 5C Convert a linear address to a virtual address
GetDescInfo 5D Get information on the contents of a descriptor
LinToPageList 5E Get the physical pages mapped by a linear range
PageListToLin 5F Map given physical address to a linear address
PageListToGDTSelector 60 Map given physical addresses to a selector
RegisterTmrDD 61 Get the kernel address of Timer value and rollover count
AllocateCtxHook 63 Allocate a context hook
FreeCtxHook 64 Free a context hook
ArmCtxHook 65 Arm a context hook
VMSetMem 66 Commit or decommit physical memory
OpenEventSem 67 Open a 32-bit shared event semaphore
CloseEventSem 68 Close a 32-bit shared event semaphore
PostEventSem 69 Post a 32-bit shared event semaphore
ResetEventSem 6A Reset a 32-bit shared event semaphore
DynamicAPI 6C Dynamically add a Ring 0 system API
RegisterKrnlExit 6F
  • No longer used in OS/2 2.x.

DevHlp Services and Device Contexts

As discussed in the section on physical device driver architecture, device driver code can run in one of the following contexts:

Kernel mode
Context in which the physical device driver strategy routine runs. Also called task time.
Interrupt mode
Context in which the physical device driver hardware interrupt handler runs.
INIT mode
Context in which the physical device driver strategy routine runs when it is called with the INIT request packet.

Certain restrictions apply to when individual DevHlp services can be used. The table below shows the contexts in which each DevHlp service can be called: Referenced notes are at the end of the table.

DevHlp Service Modes
DevHlp Service Code Kernel Interrupt INIT
ABIOSCall 36 X X X
ABIOSCommonEntry 37 X X X
AllocateCtxHook 63 X X
AllocGDTSelector 2D X
AllocPhys 18 X X
AllocReqPacket D X
ArmCtxHook 65 X X X
AttachDD 2A X X
Beep 52 X X X
CloseEventSem 68 X
DeRegister 21 X
DevDone 1 X X
DynamicAPI 6C X X
EOI 31 X X
FreeCtxHook 64 X X
FreeGDTSelector 53 X X
FreeLIDEntry 35 X X
FreePhys 19 X X
FreeReqPacket E X
GetDescInfo 5D X Note 2 X
GetDeviceBlock 38 X
GetDOSVar 24 X X
GetLIDEntry 34 X X
InternalError 2B X X X
LinToGDTSelector 5C X X X
LinToPageList 5E X X X
Lock 13 X X
MonFlush 23 X
MonitorCreate 1F X X
MonWrite 22 X X
OpenEventSem 67 X
PageListToGDTSelector 60 X X X
PageListToLin 5F X X X
PhysToGDTSel 54 X X X
PhysToGDTSelector 2E X X X
PhysToUVirt 17 X X
PhysToVirt 15 X X X
PostEventSem 69 X
ProcBlock 4 X
ProcRun 5 X X
ProtToReal 30 X X
PullParticular B X X
PullRequest A X X
PushRequest 9 X
QueueFlush 10 X X
QueueInit F X X X
QueueRead 12 X X
QueueWrite 11 X X
RealToProt 2F X X
Register 20 X
RegisterBeep 51 X X
RegisterDeviceClass 43 X
RegisterKrnlExit 6F X X
RegisterPDD 50 X X
RegisterStackUsage 3A X
RegisterTmrDD 61 X
ResetEventSem 6A X
ResetTimer 1E X X X
ROMCritSection 26 Note 1
Save_Message 3D X
SchedClock 0 X X
SemClear 7 X X
SemHandle 8 X X
SemRequest 6 X
SendEvent 25 X X
SetIRQ 1B X X
SetROMVector 1A X X
SetTimer 1D X X
SortRequest C X
TCYield 3 X
TickCount 33 X X X
UnLock 14 X X
UnPhysToVirt 32 X X X
UnSetIRQ 1C X X X
VerifyAccess 27 X
VideoPause 3C X X X
VirtToLin 5B X X X
VirtToPhys 16 X X
VMAlloc 57 X X
VMFree 58 X X
VMGlobalToProcess 5A X
VMLock 55 X X
VMProcessToGlobal 59 X
VMSetMem 66 X X
VMUnLock 56 X X
Yield 2 X

Note:

  • The function is no longer supported.
  • The function has limitations executing at interrupt time. See the description of this function for details.

Related DevHlp Services

Related DevHlp services can be grouped together into the following categories:

Advanced BIOS Services

Character Queue Management

PDD-VDD Communications Services

Context Hook Services

Interrupt Management

Memory Management

Monitor Management

Process Management

Processor Mode Services - No longer used in OS/2 2.X.

Request Queue Management

Semaphore Management

System Clock Management

System Services

Timer Services