API Reference: Libraries

 Top

halK

NAME

halK - KONTRON KTGM45 Hal

ROUTINES

halRegister( ) - register hal driver
halInstInit( ) - first level initialization routine
halInstInit2( ) - second level initialization routine of timer device
halInstConnect( ) - third level initialization routine of timer device
halDrvCtrlShow( ) - show routine
vxbusHalBoardInfoGet( ) - method to retrieve the board info
halBoardInfoGet( ) - retrieve the board info
halBoardInfoShow( ) - print the board info
halTopMemGet( ) - get the top of the memory
find_freq_from_fid( ) - get the CPU frequency

DESCRIPTION

    KONTRON KTGM45 Hal.
    This driver serves as an abstraction layer to obtain hardware specific information 
    about the board in use. For some boards additional functions to handle hardware 
    dependent features are available. The provided functions and information are individual 
    for each board or board family. 

    The board information is encapsulated in the BOARD_INFO structure. 
    If a particular piece of information is not available for a board, the item 
    of the board info structure is set to UNSUPPORTED.


API Reference: Routines

 Top

halRegister( )

NAME

halRegister( ) - register hal driver

DESCRIPTION

This routine registers the hal driver with the VxBus subsystem.

This routine contains the first instructions of the device driver that are ever executed within a VxWorks system. This function registers the driver with VxBus by providing pointers to the data structures listed previously. Once this step is complete, VxWorks is able to associate this driver with appropriate hardware within the system to form an instance.

RETURNS

N/A

ERRNO

Not Available

SEE ALSO

halK


API Reference: Routines

 Top

halInstInit( )

NAME

halInstInit( ) - first level initialization routine

DESCRIPTION

This is the function called to perform the first level initialization of the template timer device.

NOTE

This routine is called early during system initialization, and *MUST NOT* make calls to OS facilities such as memory allocation and I/O.

RETURNS

N/A

ERRNO

Not Available

SEE ALSO

halK


API Reference: Routines

 Top

halInstInit2( )

NAME

halInstInit2( ) - second level initialization routine of timer device

DESCRIPTION

This routine performs the second level initialization of the timer device.

NOTE

This routine is called later during system initialization. OS features such as memory allocation are available at this time.

Timer interrupt source must be connencted here since system clock timer will be enabled right after the VxBus second level initialization is done and can not wait till the third level initialization in case this timer is assigned to the system clock timer.

RETURNS

N/A

ERRNO

SEE ALSO

halK


API Reference: Routines

 Top

halInstConnect( )

NAME

halInstConnect( ) - third level initialization routine of timer device

DESCRIPTION

This is the function called to perform the third level initialization of the timer device.

RETURNS

N/A

ERRNO

SEE ALSO

halK


API Reference: Routines

 Top

halDrvCtrlShow( )

NAME

halDrvCtrlShow( ) - show routine

DESCRIPTION

 This routine prints information about the instance to to system
 console.  This is integrated with vxBusShow.

 RETURNS: 0, always

RETURNS

Not Available

ERRNO

Not Available

SEE ALSO

halK


API Reference: Routines

 Top

vxbusHalBoardInfoGet( )

NAME

vxbusHalBoardInfoGet( ) - method to retrieve the board info

DESCRIPTION

This function is the driver method used to retrieve the board info.

RETURNS

OK, or ERROR if functionality is not retrieved.

ERRNO

SEE ALSO

halK


API Reference: Routines

 Top

halBoardInfoGet( )

NAME

halBoardInfoGet( ) - retrieve the board info

DESCRIPTION

This function utilizes the driver method used to retrieve the board info.

RETURNS

OK, or ERROR if functionality is not retrieved.

ERRNO

SEE ALSO

halK


API Reference: Routines

 Top

halBoardInfoShow( )

NAME

halBoardInfoShow( ) - print the board info

DESCRIPTION

This function utilizes the driver method used to console print the board info.

RETURNS

OK, or ERROR if functionality is not retrieved.

ERRNO

Not Available

SEE ALSO

halK


API Reference: Routines

 Top

halTopMemGet( )

NAME

halTopMemGet( ) - get the top of the memory

DESCRIPTION

This routine gets the top of the lower memory below 4GB.

RETURNS

top of the memory

ERRNO

Not Available

SEE ALSO

halK


API Reference: Routines

 Top

find_freq_from_fid( )

NAME

find_freq_from_fid( ) - get the CPU frequency

DESCRIPTION

This function gets FID from K8 MSR and calculates CPU frequency.

RETURNS

CPU frequency

ERRNO

Not Available

SEE ALSO

halK