Share via


g_oalIoCtlTable (Compact 2013)

10/16/2014

This global variable specifies entries for the global I/O control (IOCTL) table defined in the hardware platform code.

Syntax

extern const OAL_IOCTL_HANDLER g_oalIoCtlTable[];

Parameters

None.

Return Value

None.

Remarks

Each entry in the global IOCTL table is an OAL_IOCTL_HANDLER that maps each OAL IOCTL to the appropriate handler function. The oal_ioctl_tab.h header file partially defines the IOCTL configuration table. The ioctl_tab.h header file can include the oal_ioctl_tab.h header file, and is itself included in the platform I/O control code to form the definition of the global table.

Example

The following code example shows the format of the entries in the oal_ioctl_tab.h header file.

{ IOCTL_HAL_TRANSLATE_IRQ,                 OALIoCtlHalRequestSysIntr   },
{ IOCTL_HAL_REQUEST_SYSINTR,               OALIoCtlHalRequestSysIntr   },
{ IOCTL_HAL_RELEASE_SYSINTR,               OALIoCtlHalReleaseSysIntr   },
{ IOCTL_HAL_REQUEST_IRQ,                   OALIoCtlHalRequestIrq       },
{ IOCTL_HAL_INITREGISTRY,                  OALIoCtlHalInitRegistry     },
{ IOCTL_HAL_INIT_RTC,                      OALIoCtlHalInitRTC          },
{ IOCTL_HAL_REBOOT,                        OALIoCtlHalReboot           },
{ IOCTL_HAL_DDK_CALL,                      OALIoCtlHalDdkCall          },
{ IOCTL_HAL_DISABLE_WAKE,                  OALIoCtlHalDisableWake      },
{ IOCTL_HAL_ENABLE_WAKE,                   OALIoCtlHalEnableWake       },
{ IOCTL_HAL_GET_WAKE_SOURCE,               OALIoCtlHalGetWakeSource    },
{ IOCTL_HAL_GET_CACHE_INFO,                OALIoCtlHalGetCacheInfo     },
{ IOCTL_HAL_GET_DEVICEID,                  OALIoCtlHalGetDeviceId      },
{ IOCTL_HAL_GET_DEVICE_INFO,               OALIoCtlHalGetDeviceInfo    },
{ IOCTL_HAL_GET_UUID,                      OALIoCtlHalGetUUID          },
{ IOCTL_HAL_GET_RANDOM_SEED,               OALIoCtlHalGetRandomSeed    },
{ IOCTL_PROCESSOR_INFORMATION,             OALIoCtlProcessorInfo       },
{ IOCTL_HAL_GETREGSECUREKEYS,              OALIoCtlHalGetRegSecureKeys },

The following code example shows how the ioctl_tab.h header file then includes the oal_ioctl_tab.h header file to add those entries to its own.

#include <oal_ioctl_tab.h>

{ IOCTL_HAL_ILTIMING,                    0,  OALIoCtlHalILTiming         },
{ IOCTL_HAL_POSTINIT,                    0,  OALIoCtlHalPostInit         },
{ IOCTL_HAL_PRESUSPEND,                  0,  OALIoCtlHalPresuspend       },
{ IOCTL_HAL_QUERY_DISPLAYSETTINGS,       0,  OALIoCtlQueryDispSettings   },
{ IOCTL_HAL_GET_HWENTROPY,               0,  OALIoCtlHalGetHWEntropy     },
{ IOCTL_HAL_IRQ2SYSINTR,                 0,  OALIoCtlHalIrq2Sysintr      },
{ IOCTL_HAL_FORCE_IRQ,                   0,  OALIoCtlHalForceIrq         },
{ IOCTL_HAL_UNFORCE_IRQ,                 0,  OALIoCtlHalUnforceIrq       },
{ IOCTL_HAL_QUERY_SI_VERSION,            0,  OALIoCtlQuerySiVersion      },
{ IOCTL_HAL_QUERY_BOARD_ID,              0,  OALIoCtlQueryBoardId        },
{ IOCTL_KITL_GET_INFO,                   0,  OALIoCtlKitlGetInfo         },
{ IOCTL_KITL_POWER_CALL,                 0,  KITLIoctl                   },
{ IOCTL_HAL_GET_POWER_DISPOSITION,       0,  OALIoCtlHalGetPowerDisposition },
// Required Termination
{ 0,                                     0,  NULL                        }

The following code example shows how the platform code then includes the ioctl_tab.h header file to complete the definition.

//------------------------------------------------------------------------------
//
//  Global:  g_oalIoCtlTable[]    
//
//  IOCTL handler table. This table includes the IOCTL code/handler pairs  
//  defined in the IOCTL configuration file. This global array is exported 
//  via oal_ioctl.h and is used by the OAL IOCTL component.
//
const OAL_IOCTL_HANDLER g_oalIoCtlTable[] = {
#include "ioctl_tab.h"
};

Requirements

Header

oal_ioctl.h

Library

Developer Implemented

See Also

Reference

IOCTL Global Variables